Stable @dashfi/svelte/ui/badge

When to use

Use Badge for WHAT something IS or HOW it is categorized — tier markers ("DEBIT", "CORPORATE"), count indicators ("3", "99+"), category tags ("Software", "Marketing"), visual emphasis on a known label ("Default", "AI", "New"). For semantic STATE (Active / Pending / Failed / Frozen) use Pill instead. Badge encodes category with visual style; Pill encodes condition with semantic color.

Variants — ordered by visual emphasis
Default Brand Secondary Yellow Outline
Sizes
xs sm md
In context — card tier markers
DEBIT CORPORATE DAILY NET 60
In context — emphasis ladder
PRIMARY ACTION PRODUCT NEW MARKETING LIMITED DEFAULT TAG

Badge vs Pill

Badge encodes WHAT something IS (category, visual style). Pill encodes WHAT CONDITION something is in (semantic state). The two components live side by side — pick based on meaning, not appearance.

BadgePill
Encodescategory / decorationsemantic state
ExamplesDEBIT CORPORATE PARTNER LIMITED 99+Active Pending Failed Connected
Variantsdefault · brand · secondary · yellow · outline (visual emphasis ladder)base · info · success · warning · danger (semantic)
Typographymono uppercase, tracked wider, code-stylesentence case, body sans
Radiusrounded-md (6px)rounded-sm (4px)