Badge

Small label for status, count, or metadata. Static — seven variants span from filled to link and a dotted indicator. Renders as a span by default; becomes an anchor when href is set.

Variants

defaultsecondarydestructivesuccesswarninginfooutlineghostlinkdot

With icon

Verified Pending Failed

Sizes

Three heights: sm (16px) for dense table rows, default (20px) for general status, and lg (24px) for hero labels or trend pills.

smdefaultlg

Trend — price up / down

Trend pills are a composition, not a dedicated primitive — pair a semantic variant (success / destructive) with a directional icon from Remix. The icon auto-sizes to the badge size scale.

12.4% 3.1% +$8,420 −$1,208

Dot status

The dot variant inherits the leading dot's color from text-current — set a status text color on the badge to tint the indicator. Useful for connection / availability / health rows.

Online Degraded Offline Syncing

API reference

Inherits every native HTML anchor attribute via spread. Switches to <a> when href is set; renders as <span> otherwise.

PropTypeDescription
'default' | 'secondary' | 'destructive' | 'success' | 'warning' | 'info' | 'outline' | 'ghost' | 'link' | 'dot'Visual style. Semantic variants (success/warning/info) pull from the status tokens. `dot` renders a leading filled circle; `link` drops the background for an inline text affordance.
'sm' | 'default' | 'lg'Height + text scale. 16px / 20px / 24px.
string | undefinedWhen set, the badge renders as an anchor and receives link semantics.
stringMerged onto the root via tailwind-merge.
HTMLElement | nullTwo-way-bindable element reference.