Badge
v0.16.1Status tones as foreground on subtle tint, plus outline; CountBadge for a count and ResultBadge for a pass, a fail or too few samples.
Badge tones
Install
npx shadcn add @syncrobotic/badge Also installs: class-variance-authority, lucide-react, radix-ui, @syncrobotic/cn
Overview
A short label or count in a status tone.
When to use
- A count next to a title (3 alarms).
- A state word in a header, like Production or Offline.
Use something else
- A state in a list row: Status eyebrow (InlineStatus).
- A message that needs a sentence: Alert.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Badge with status and count
Badge count
Badge outline
Badge with icon
Badge test results
Badge test results in table
Badge in heading
Badge as link
Usage rules
- Counts and short states. In list rows prefer Status eyebrow's InlineStatus.
- Test and audit results: Passed is the neutral badge with CircleCheck; Failed is tone="outline" with text-danger ring-danger and CircleAlert; Not enough samples is tone="outline" with text-muted-foreground and CircleDashed. Never a green pass.
Changelog
- 0.16.12026-11-19ResultBadge: the verdict of a test or an audit in one prop, result="passed" (grey with a check), "failed" (danger outline and text) or "insufficient" (grey outline, dashed circle), never a green pass.
- 0.10.02026-11-18tone="success" is neutral: a calm state is grey. Green stays for confirmations (Toast, Alert).
- 0.8.02026-11-17CountBadge: the one way to draw a count, danger on its tint or neutral, 99+.