npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gemeente-denhaag/badge-counter

v2.0.0

Published

A Badge component

Downloads

3,096

Readme

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.

Alternatives and related components

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:

  1. Dot indicator: shows that there is a notification
  2. Count: displays the number of notifications
  3. 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