Badge
Displays the state a row or cell reports, such as online, queued, or fault.
Variants
Supported configurations for this component.
Variants
8 examplesAdd to your project
One command adds this component to your project.
Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.
npx shadcn@latest add @aicanvas/••••••••••••Light and dark both come with the install and follow the dark class on <html>, the shadcn dark mode setup (next-themes with attribute="class").
Props
Every prop this component accepts. Any other prop is forwarded to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default'|'accent'|'warning'|'fault'|'success'|'subtle'|'outline' | 'default' | One of: default, accent, warning, fault, success, subtle, outline. |
| size | 'sm'|'md'|'lg' | 'sm' | Rung on the LABEL ladder: 20, 24 or 28px tall (not the 28/32/40 control ladder). Defaults to sm, the inline density; pass md or lg to sit beside a field or button of that size. |
| icon | React.ComponentType | - | Phosphor icon component; replaces the dot and takes its per-variant color. The icon sizes with the label type. |
| children | React.ReactNode | - | Content rendered inside the component. |
| className | string | - | Additional CSS classes applied to the root element. |
| style | React.CSSProperties | - | Inline styles applied to the root element. |