Badge
Compact labelling with seven tones, three appearances and an optional second, colour-independent signal.
Live preview
Source
The exact file rendered in the preview above.
components/demos/badge.tsx
components/ui/badge.tsx
lib/variants.ts
Demo source — adapt to your project. Foundry is not published as a package.
Usage
For categorising and counting. A badge describes what something *is*; Status describes what something is *doing*. Keeping them separate stops both from becoming a generic coloured pill.
- Use the dot when a badge is the only signal in a dense table — hue alone is not enough.
- Keep badge text to one or two words; it does not wrap gracefully by design.
- Solid badges are loud. One per row, at most.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Soft
- Outline
- Solid
- With dot
- With icon
- Two sizes
Accessibility
- Not a control
- Badges are non-interactive. If it can be clicked or removed, it is a button or a chip, and needs a label.
- Meaning
- The text carries the meaning; the colour is reinforcement.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsStatus
System state as icon plus label plus colour — never colour alone.
starter4 variantsAlert
A block-level message attached to a region, with tone-appropriate live-region politeness.
starterFeatured6 variantsTable
A semantic table with two responsive strategies, a focusable scroll region and a built-in empty state.
intermediateFeatured5 variants