Skip to content

Data display

Badge

Badges are small labels for status, category and counts. Six tones in three variants cover everything from a quiet tag to a loud warning; add a dot or an icon so meaning never depends on color, or make them removable for filter chips. Corners follow the theme radius.

On this page
NeutralAccentSuccessWarningDangerInfo
NeutralAccentSuccessWarningDangerInfo
NeutralAccentSuccessWarningDangerInfo

Usage

components/ui/badge.tsx
import { Badge } from "@/components/ui/badge"; <Badge tone="success" dot>Paid</Badge>

Examples

Tones and variants

NeutralAccentSuccessWarningDangerInfo
NeutralAccentSuccessWarningDangerInfo
NeutralAccentSuccessWarningDangerInfo

Status with dot

Pair the tone with a word and a dot. Soft is the default variant and the right choice for most status columns.

PaidPendingOverdueScheduledDraft

Sizes and icons

sm (20 px) for tables and dense lists, md (24 px) next to headings. Icons are sized automatically.

NewNewPrivatePrivateBetaBeta

Removable

Pass onRemove for filter chips and tags. The remove button is labelled "Remove <label>" automatically.

Status: OverdueOwner: Ada MorenoAmount > $1,000Region: EU

In context

Status, priority and tags on an issue card, each in a different weight so the eye finds status first.

LED-482In reviewHigh priority

Reconcile March payouts for Fernhill Studio

billingpayoutsQ1 close

Props

  • tone"neutral" | "accent" | "success" | "warning" | "danger" | "info"default: "neutral"Color role. Success, warning, danger and info are reserved for status.
  • variant"soft" | "solid" | "outline"default: "soft"Soft tint, filled, or outlined.
  • size"sm" | "md"default: "sm"20 px or 24 px tall.
  • dotbooleandefault: falseLeading dot in the current color.
  • iconReactNodedefault: —Leading lucide icon, sized to the badge.
  • onRemove() => voiddefault: —Shows a remove button after the label.
  • removeLabelstringdefault: —Accessible name for the remove button. Defaults to "Remove <label>".
  • childrenrequiredReactNodedefault: —The label. Keep it to one or two words.

Accessibility

  • A badge is plain inline text, read in place with its label. Always use a word; never rely on the tone color alone.
  • Dots and icons are hidden from assistive tech because the label already says what they mean.
  • The remove button is a real button with an accessible name such as "Remove Region: EU", reachable with Tab and activated with Enter or Space.
  • After removing a chip, move focus somewhere sensible (the next chip or the filter input) if the list is long.
  • Soft and outline tones keep at least 4.5:1 text contrast on the surface in both themes; solid badges use the canvas color on the tone.

Suggested