shadcn.io is an independent project built on shadcn/ui
The badge is a circle with the number 3, bordered and unfilled. One digit keeps it round.
It fits unread totals and pending items that inform rather than warn. A clickable count belongs on a Button. In React, Base UI keeps a single digit circular at this size.
Installation
Anatomy

Usage
<Badge pill size="lg" variant="outline">
3
</Badge>FAQ
How does the number become a circle in React?
pill sets rounded-full, and size="lg" adds h-6.5 and min-w-6.5, so one digit has a matching height and minimum width. A longer number widens past that minimum.
What does variant outline change on the circle?
variant="outline" sets a border-border edge and text-foreground, and leaves the background unset. The circle classes in this file stay as they are.
How do I make the number make sense to a screen reader?
A bare number does not say what is counted. Put the noun in the badge, such as 3 unread, or set aria-label to 3 unread messages.
How do I make the circle smaller?
size also takes sm, which sets h-5 and min-w-5. Keep pill so the ends stay round.
Is the count a button?
No. The count is the text of a span. Place the badge next to the thing it counts. A control that does something is a Button.
API Reference
Badge
Sets pill, size="lg" and variant="outline". The rest is on the Badge page.


