Skip to content

Badge

SBadge is a compact status label (a counter, tag, or state). Plain CSS on semantic tokens, no dependencies.

Variants

NeutralPrimaryPositiveWarningNegative

Sizes

smmd

Color

The color prop sets a color from the palette (primary, teal, teal-10) and overrides the variant color. The filled primary variant also accepts text-color; for the soft variants the color applies to both the tint and the text.

tealdeep-purplesoft indigolight-blue-3

Icons

icon renders a leading icon, icon-right a trailing one (registry names).

DoneDraft

API

Props

NameTypeDefaultDescription
variant | "primary" | "positive" | "negative" | "warning" | "neutral""neutral"Color variant: neutral or semantic (primary/positive/warning/negative).
colorstringundefinedAccent color: a name from the palette (primary/teal/teal-10). Overrides the variant color.
text-colorstringundefinedText/icon color on the fill: a name from the palette. White by default (set it for light color values).
size"md" | "sm" | "lg""md"Size: sm, md or lg.
squarebooleanundefinedSquare corners: removes the border radius (rounded by default).
iconstringundefinedLeading icon: a registry name or a raw SVG path.
icon-rightstringundefinedTrailing icon: a registry name or a raw SVG path.

Slots

NameDescription
defaultBadge content (text, number).