Badge
Status labels. Supports render like Button.
Installation
Usage
Examples
Status dot
Prefix the label with a dot span for live status indicators.
As a link
Use render to turn the badge into an anchor. Styles merge onto it.
Custom colors
Override with utilities for one-off status colors.
API reference
Badge
| Prop | Type | Default |
|---|---|---|
variantVisual style. | "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "default" |
childrenLabel content. Prefix with an icon or dot span for status badges. | ReactNode | - |
renderReplace the rendered span with a custom element, e.g. render={<a href="#">Changelog</a>}. Badge styling and data attributes are merged onto it. Replaces the old Radix asChild prop. | ReactElement | - |
classNameAdditional classes merged with the variant styles. | string | - |