Badge
Displays a small status descriptor, with default, secondary, destructive, outline, ghost, and link variants that can render as a link.
DefaultSecondaryOutlineDestructiveGhostLink
Installation
Bash
Usage
Examples
As link
Render the badge as a real anchor via the render prop — hover styles
for links are built into each variant.
With icon
A direct svg child is sized automatically.
Verified4.9Build failed
Processing
DeployingIndexing
API reference
Badge
Renders a span by default; swap the element with the Base UI render
prop (for example render={<a href="…" />} — link hover styles are
built in).
| Prop | Type | Default |
|---|---|---|
variant | "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "default" |
render | React.ReactElement | span |
badgeVariants is also exported for styling custom elements.