Installation
Theme
Mode

Data display

Badge & Tag

Small, high-density labels that carry meaning at a glance — status, priority, labels, counts. A semantic color system keeps them consistent everywhere they appear.

$npx shadcn@latest add @orbit/badge

Overview

Eight tones, four variants, status and priority presets, counts, and removable tags.

In progressDoneUrgentBetaFrontend8Online

Variants

The same tone in four weights of emphasis. soft is the everyday default.

Soft — tinted background, colored text. The default for status and labels.
In progressDoneBlocked
Solid — filled and loud. Save for the one thing that must stand out.
In progressDoneBlocked
Outline — quiet, on busy surfaces where a fill would be too heavy.
In progressDoneBlocked
Dot — neutral chip with a colored dot. Presence and live states.
In progressDoneBlocked

Sizes

md 22px for standalone use, sm 18px for inline-with-text and dense tables.

md · 22px
In progressHighBeta
sm · 18px
In progressHighBeta

Tones

Eight tones, each with a meaning. Use them consistently — green is always success, red always a problem.

ToneSoftSolidOutline
NeutralDefaultDefaultDefault
BlueInfoInfoInfo
GreenSuccessSuccessSuccess
AmberWarningWarningWarning
RedDangerDangerDanger
PurpleSpecialSpecialSpecial
TealAccentAccentAccent
PinkAccentAccentAccent

Status & priority presets

Named presets bake in the right tone, label, and glyph — so a task reads the same in a dropdown and on a card.

Status · status="…"
To doIn progressIn reviewDoneCanceledBlocked
Priority · priority="…"
No priorityLowMediumHighUrgent

Counts & indicators

Numeric badges for tallies and unread counts (clamped at 99+); a bare dot for a subtle “something changed”.

Counts · count="…"
Inbox 3Mentions 12Alerts 99+
Dot · variant="dot"
OnlineAwayOffline

Removable tags

With removable, a badge becomes a dismissible tag. Removal is callback-driven — the list owns its state.

Labels on this task
DesignFrontendBackendBugResearchDocs

Props

PropTypeDefaultDescription
labelReactNodeBadge text. children works too and wins over label.
tone"neutral" | "blue" | "green" | "amber" | "red" | "purple" | "teal" | "pink""blue"Semantic color. Count mode defaults to neutral. Overrides a preset's tone.
variant"soft" | "solid" | "outline" | "dot""soft"Visual treatment. dot forces the leading dot on a neutral chip.
status"todo" | "inprogress" | "review" | "done" | "canceled" | "blocked"Status preset — bakes in tone, label, and a leading dot.
priority"none" | "low" | "medium" | "high" | "urgent"Priority preset — bakes in tone, label, and a bars/urgent glyph.
size"sm" | "md""md"Height: 18 / 22px.
icon"tag" | "check" | "clock" | "flag" | "star" | "sparkle"Leading glyph, tinted with the tone accent.
dotbooleanfalseLeading status dot. Defaults on for status presets.
countnumber | stringCount mode — renders a numeric pill instead; values over 99 clamp to 99+.
removablebooleanfalseRenders a × button, turning the badge into a dismissible tag.
uppercasebooleanfalseUppercase micro-label treatment (font −1px, weight 600, tracked).
valuestringIdentifier passed to onRemove.
onRemove(value?: string) => voidCalled on × click. Without it the tag removes itself (uncontrolled).
…restHTMLAttributes<HTMLSpanElement>Everything else is forwarded to the root <span>, including ref.

Usage

Badges inform; they rarely act.

Do

Keep tone meanings fixed

Green = success, red = danger, everywhere. Consistent color is what makes badges scannable.

DoneBlocked
Don’t

Use a badge as a button

If it triggers an action, it should be a Button. Badges are for reading, not clicking.

Do

Keep labels to a word or two

“In progress”, “Urgent”, “Bug”. Long text defeats the at-a-glance purpose.

Don’t

Rely on color alone

Pair tone with a label or glyph so meaning survives for color-blind users.

Keyboard & accessibility

Text meets AA contrast on every tone. Add role='status' where the value updates live. The × on a removable tag is a real <button> named “Remove {label}” — Tab reaches it, Enter and Space activate it.

Tab to reach the remove buttons
FrontendDesign