Badge
Labels an item with a short status or category.
Installation
pnpm dlx shadcn@latest add @paneui/badgeUsage
Examples
Badge
Also accepts every prop of span.
- variant= "chip"
- "chip" | "primary" | "success" | "warning" | "destructive" | "outline"
- Visual style.
chipis neutral; the tinted variants carry status. - size= "default"
- "default" | "sm"
- Height, padding and text size.
defaultis 28px tall andsm20px; icons are 14px, or 12px atsm. - render
- ReactElement | (props, state) => ReactElement
- Replace the rendered
<span>, e.g. with<a />or a routerLink.
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "chip" | "primary" | "success" | "warning" | "destructive" | "outline" | "chip" | Visual style. chip is neutral; the tinted variants carry status. |
| size | "default" | "sm" | "default" | Height, padding and text size. default is 28px tall and sm 20px; icons are 14px, or 12px at sm. |
| render | ReactElement | (props, state) => ReactElement | — | Replace the rendered <span>, e.g. with <a /> or a router Link. |