Badge
A small label for status, count, or category — inline with text or attached to another element.
Overview
- Semantic variants: info, success, warning, destructive and invert, in solid,
-lightand-outlinestyles. - Neutral:
muted/muted-outlinefor inactive or pending states. - Brand:
brand,brand-light,brand-outlineandbrand-dotin the theme's second identity color, for identity labels ("New", "AI", "Pro"), never for status. - Dots: a
*-dotfamily (primary, secondary, brand, success, warning, info, destructive, muted) that shows a colored dot before plain text, for select items and dense lists. - Shape: size and radius options.
Can also render as a link.
Installation
CLI
Manual
- 1
Register the @fma-ds namespace in components.json (once)
- 2
Add the item
Files land in
components/fma-ds/badge.tsx; npm and registry dependencies are installed along with them.
Dependencies
- npm
- class-variance-authority@^0.7.1cn@^0.5.0
- Registry
- None