NumericBadge
A compact count, ! / ? glyph, or icon attached to a tab, button, menu item, or step.
type sets the visual weight and color sets the meaning. Supported combinations:
solid:brand,dangersecondary:neutral,neutral-alt,info,success,danger,brandoutline:neutral,success,danger,brand
The default is secondary / neutral. With type="solid", the default color is brand.
size="default" corresponds to Medium (20px tall, 16px icon); size="small" is 16px tall with a 12px icon. Pass content as children and give an icon-only badge an accessible name when it conveys meaning.
Hover and focus states apply to clickable badges. Use asChild with a native button or link when the badge is an action or navigation target.
Migration from the removed flat type API:
Usage
Examples
Sizes
Two heights, chosen to sit inside the control they are attached to rather than beside it.
Types
Every supported Type × Color combination, in Medium and Small.
Content
Numbers, short glyphs, and icons share the same badge heights.
Clickable
Use a native button for an action; Tab, Enter, and Space work as expected.