Badge
Status labels and tags. Free, MIT · Basics › Labels and tooltips
Installation
npx valyro-cli@latest add badge
npx shadcn@latest add https://valyro.xyz/r/badge.json
npm install valyro-ui
import 'valyro-ui/styles.css';
import { Badge } from 'valyro-ui';
Props
| Prop | Type | Default | |
|---|---|---|---|
color | BadgeColor | 'gray' | Hue of the fill, text and dot; inverted uses the page foreground as the fill in every variant. |
variant | 'subtle' | 'solid' | 'outline' | 'subtle' | subtle tinted fill, solid saturated fill with contrasting text, outline transparent with a tinted border. |
size | 'sm' | 'md' | 'lg' | 'md' | Badge height, padding and text size. |
icon | ReactNode | Icon before the label. | |
dot | boolean | false | Leading status dot in the badge color. |
Related components
- Avatar — User avatars
- Tooltip — Hover and focus hints
- Separator — Dividers
- Button — Buttons in every variant
- Icon Button — Icon-only button
- Button Group — Grouped buttons
- Copy to Clipboard — Copy with confirmation
- Skeleton — Loading placeholders
- Spinner — Loading indicator
- Progress Bar — Progress bars
Previous: Copy to Clipboard · Next: Avatar · All Basics