Components
Badge
Display-only pill for contextual metadata - status, category, or counts.
Pass label+value for a split badge; compose BadgeDot/BadgeButton as children.
Usage
Best practices
Badge is display-only - never attach
onClick; useTag(interactive) or wrap aButton.For a notification count use
mode="count"(circular, tabular figures), notradius="full"+ manual classes.A standalone count needs an
accessibleLabel("3 unread"); inside an icon-only trigger, mark the badgearia-hiddenand fold the count into the trigger'saria-label.A badge overlapping a corner of another surface takes
ringso a 2pxbackground-coloured ring separates it from what's beneath; set it only where the badge truly overlaps, and the page surface should bebackground.
Props
Badge
BadgeButton
Also exports
- interface
BadgeButtonProps - component
BadgeDot - type
BadgeDotProps - type
BadgeEmphasis - interface
BadgeProps - type
BadgeSize - type
BadgeTone - const
pillVariants
Composition
Builds on
Used by