Use concise markers like beta, deprecated, new.
Badge
Compact status marker for lifecycle, intent, and short counters.
- .source-badge Root badge element
- data-palette Color intent — semantic (`neutral`, `accent`, `success`, `warning`, `danger`, `info`) or categorical (`blue`, `green`, `red`, `orange`, `yellow`, `pink`, `purple`, `teal`)
- data-variant Visual style (`subtle`, `solid`, `outline`)
States
Design intent
Badge answers the question 'what is this?' at a glance. It is purely informational and non-interactive. The moment the user needs to act on the information it carries, reach for a Button or Chip instead. Keep it short, one or two words, and pick a palette that reflects the actual severity.
Example labels
The examples are semantic placeholders: Beta for release stage, Deprecated for lifecycle state, and v2 for compact version markers.
When to use
Prefer solid for high-priority states.
Limit labels to one or two words.
Do not use Badge as an interactive filter control.
Avoid full sentences inside badges.
Never rely on color alone for critical semantics.
Semantic palettes
Categorical palettes
Use these when color is a category signal rather than a status signal — for instance, color-coded labels in a kanban board or topic tags in a list. All eight work with the three variants.
Designer checklist
- Palette reflects actual severity, not decoration.
- Status is conveyed by text, not color alone.
- Badge is not placed inside a focusable element unless the whole element is the call to action.
- Label is one or two words maximum.
Props
Usage
import '@pierredelattre/source-tokens';
import '@pierredelattre/source-react/styles';
import { Badge } from '@pierredelattre/source-react';
Beta
Deprecated
v2
Component tokens
Accessibility
Badge is non-interactive (`span`). If a status is critical, pair visual color with explicit text. Do not rely on color only.