Skip to content
Design System
GitHub

Badge

v0.16.1

Status tones as foreground on subtle tint, plus outline; CountBadge for a count and ResultBadge for a pass, a fail or too few samples.

UpdatingPassedLow battery3 eventsOfflinev2.4.1

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

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Patrolling 18%Events 12

Badge with status and count

Alarms 2Unread messages 7Events 99+

Badge count

Firmware 4.8Hall BNight shift

Badge outline

Low battery Online 2 faults

Badge with icon

PassedFailedNot enough samples

Badge test results

CheckResult
Caption accuracy0.91 · n = 400Passed
Counting objects0.62 · n = 250Failed
Night images0.88 · n = 12Not enough samples
Safety refusals0.99 · n = 300Passed

Badge test results in table

North gate patrol Draft

Site map v12 · live

Badge in heading

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+.

How to upgrade