Components
Badge
Small inline label for status, count, category, or priority indicators.
Import
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'default' | Colour variant |
size | 'sm' | 'md' | 'lg' | 'md' | Badge size |
dot | boolean | false | Show a coloured dot before the label |
children | React.ReactNode | — | Badge content |
className | string | — | Additional CSS classes |
Variants
| Variant | Semantic meaning |
|---|---|
default | Neutral / unclassified |
primary | Featured / highlighted |
success | Active, complete, healthy |
warning | Needs attention, degraded |
error | Failed, critical, over limit |
info | Informational, beta, new |
With dot indicator
Usage in lists
Accessibility
- Renders as
<span>— inline with text flow - Colour alone is never the only indicator — always include text
- For screen readers, the text content is the accessible name