Badge
badgeA small label for status, counts and metadata, in five quiet variants and two sizes. The colour lives in the tint so the text stays readable at eleven pixels, and an icon or a dot inside the badge carries the state at a glance.
import { CircleDot, Sparkles } from "lucide-react";
import { Badge } from "@/components/forme/badge/badge";
export function BadgeDemo() {
return (
<div className="flex flex-col gap-8">
<div className="flex flex-wrap items-center gap-2">
<Badge>Neutral</Badge>
<Badge variant="brand">Brand</Badge>
<Badge variant="success">Success</Badge>
<Badge variant="warning">Warning</Badge>
<Badge variant="destructive">Destructive</Badge>
</div>
<div className="flex flex-wrap items-center gap-2">
<Badge variant="success">
<span className="size-1.5 rounded-full bg-success" aria-hidden="true" />
Operational
</Badge>
<Badge variant="warning">
<CircleDot className="text-warning" />2 degraded
</Badge>
<Badge variant="destructive">
<span className="size-1.5 rounded-full bg-destructive" aria-hidden="true" />
Build failed
</Badge>
<Badge variant="brand">
<Sparkles />
New
</Badge>
</div>
<div className="flex flex-wrap items-center gap-2">
<Badge size="sm">Small</Badge>
<Badge size="md">Medium</Badge>
<Badge size="sm" variant="brand">
Small brand
</Badge>
<Badge size="sm" variant="success">
Small success
</Badge>
</div>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Badge
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'success' | 'warning' | 'destructive' | 'neutral' | 'brand' | "neutral" | |
size | 'md' | 'sm' | "md" |
Also takes every prop of <span> attributes.
Related


Area Chart
A line or area chart in plain SVG with no chart library. A crosshair snaps to the nearest point and lists every series, arrow keys walk it, round tick values, a legend from two series up, and a hidden table so screen readers get the numbers.
data display

Avatar
A user image with a fallback that shows initials while the image loads, and when it never arrives at all. Built on the Base UI avatar primitive, so the image and the fallback swap without a flash of empty space.
data display

Bar Chart
A single or grouped column chart in plain SVG. Columns are capped at 24px with rounded tops and 2px gaps, the hovered category lifts while the rest recede, arrow keys read each category, and a hidden table carries every value.
data display