primitives · @awesome-ds/react
Badge
Compact status or category label.
State matrix
idle
Anatomy
- inline status container
- short label
Keyboard contract
Not focusable unless nested in an interactive owner.
Screen-reader contract
Text is read in document order; decorative badges must be hidden by the caller.
Content rules
- Use one or two short words.
- Do not place critical meaning only in tone.
Public API
| Prop | Type | required | Description |
|---|---|---|---|
tone | BadgeTone | — | Semantic visual tone |
children | ReactNode | required | Status text |
…native | HTMLAttributes<HTMLSpanElement> | — | Native span attributes |
Adaptation contracts
- RTL
- Preserve icon meaning, use logical spacing, and mirror only directional artwork.
- High contrast
- Keep native outlines and a visible text or border affordance in forced colors.
- Reduced motion
- Remove hover travel and loading flourish while retaining immediate state feedback.
Verification IDs
Live
Live
NeutralAccent
Copyable example
import { Badge } from "@awesome-ds/react";
<Badge tone="accent">New</Badge>