Basic Usage
Variants
Eight variants cover the most common use cases — five base styles from shadcn plus three semantic colors for status indicators.Examples
Badges pair well with cards and other layout components as inline status indicators. Badge is a container component, so you can compose children for richer content — icons, loaders, or custom ordering.API Reference
Badge Parameters
Badge text. Can be passed as a positional argument. When using children, omit the label and compose content directly.
Visual style:
"default", "secondary", "destructive", "outline", "ghost", "success", "warning", "info".Additional Tailwind CSS classes appended to the component’s built-in styles.
Protocol Reference
Badge