Badge
Interactive badge used to display status, tags, or trigger actions in the interface.
StrongDefaultSoft
Installation
npx @glass-ui-kit/cli add badgeUsage
Examples
Weights
Demonstrates the built-in surface variants. Reach for variant before falling back to custom classes.
StrongDefaultSoftTransparent
With Icon
You can easily incorporate icons inside the badge to provide more visual context.
Pending
With Spinner
A badge can display a loading state by including a spinner animation.
Sending
Link
The badge can be rendered as a clickable element.
Custom Colors
Use className as an escape hatch when you need custom semantic colors on top of the default badge surface.
BlueGreenYellowRedPurple
Styling
Badge now follows the same small prop-first direction as the other migrated form and action primitives. Start with variant and size, then use className for one-off overrides.
API Reference
| Prop | Type |
|---|---|
variant | "default" | "soft" | "strong" | "transparent" |
size | "sm" | "md" | "lg" |
className | string |