🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

@gemeente-denhaag/badge-counter

Package Overview
Dependencies
Maintainers
2
Versions
421
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gemeente-denhaag/badge-counter

A Badge component

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
2
Created
Source

Badge (counter)

npm (scoped) GitHub Workflow Status (branch)

Counter badges are used to indicate that there is a notification and display the number of notifications. It is an update message that announces something new for the user to see. Badges are typically used to indicate a new message.

When to use

TODO: Not yet written.

Use Tag when you need to inform users about the status of an object, about an action or when you have data that helps categorize and organize things.

Anatomy

The badge consists of:

  • Dot indicator: shows that there is a notification
  • Count: displays the number of notifications
  • Container: the rectangle with the number in it

(Interactive) states

None.

Design properties

Colors

  • Dot: color Red/3, border color white
  • Count: text color Grey/4
  • Container: fill color Grey/1

Structure

  • Dot: overlaps container 25%, border 2px, height and width 8px
  • Count: padding-inline 6px, padding-block 4px
  • Container: height 24px

Accessibility

TODO: Not yet written.

Content guidelines

None.

Best practices

Do's

Badges should:

  • Be hidden when count is 0
  • Have a maximal count of 999. Once you reach higher than 999, the label becomes "999+".
  • Be used for counts of important information, close to the relevant item.
  • Notify or draw attention to changed values or states
  • Be used when there is an underlying message in the menu
  • Be used sparingly

Don'ts

Dot indicators should:

  • Not be used if you need a text label. Use Tag instead.

References

https://cultureamp.design/components/badge

FAQs

Package last updated on 25 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts