Import
Description
A badge component for displaying labels, status indicators, or categorization tags. Supports multiple color schemes, variants, and sizes.Usage
Props
Badge color theme. Available colors:Semantic Colors:
primary- Primary brand colorsecondary- Secondary brand colorinfo- Information statessuccess- Success stateswarning- Warning statesdestructive- Destructive actions
gray,mauve,slate,sage,olive,sand
tomato,red,ruby,crimson,pink,plum,purple,violetiris,indigo,blue,cyan,teal,jade,green,grassbrown,orange,sky,mint,lime,yellow,amber,gold,bronze
Badge style variant:
solid: Filled background with contrasting textsoft: Subtle background with colored text
Badge size:
xs: Extra small (h-4, text-[11px])sm: Small (h-5, text-xs)md: Medium (h-6, text-sm)
Size Specifications
| Size | Height | Text Size | Icon Size | Padding | Border Radius |
|---|---|---|---|---|---|
xs | 16px | 11px | 12px | 6px | xs |
sm | 20px | 12px | 14px | 6px | xs |
md | 24px | 14px | 16px | 8px | sm |
Color Behavior
Solid Variant
Light colors (sky, mint, lime, yellow, amber, secondary) use dark text for contrast. Other colors use white text.Soft Variant
Uses a subtle background (color-3) with colored text (color-11) for all colors.Examples
Basic Badges
Variant Comparison
Size Variations
Badges with Icons
Status Indicators
Category Tags
Count Badges
Interactive Badge
Styling
The badge component is built on the<span> element and accepts all standard styling props: