Badge
A small status indicator with multiple semantic variants.
Import
import { Badge } from "@retents/ui/badge"Usage Guidelines
When to use
- To display a short status label such as "Active", "Pending", or "Error" next to an item.
- To categorize or tag content with a visual indicator (e.g., feature labels, plan tiers).
- To communicate severity or state using semantic variants —
defaultfor neutral,successfor positive,destructivefor errors.
When NOT to use
- For interactive actions — use Button instead. Badges are display-only.
- For longer descriptive messages — use Alert instead.
- For counts or notifications that overlay an icon — consider a custom notification dot.
Preview
Default
Secondary
Destructive
Success
Outline
Variants
<Badge>Default</Badge>
<Badge variant="secondary">Secondary</Badge>
<Badge variant="destructive">Destructive</Badge>
<Badge variant="success">Success</Badge>
<Badge variant="outline">Outline</Badge>Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "destructive" | "success" | "outline" | "default" | Visual style variant |