Themes
- Default
- Catppuccin
- Dracula
- High Contrast
- High Contrast Light
- Monokai
- Nord
- One Dark
- Solarized
- Tokyo Night
- AMOLED
- Aura
- Ayu
- Carbonfox
- Catppuccin Frappe
- Catppuccin Macchiato
- Cobalt2
- Cursor
- Everforest
- Flexoki
- GitHub
- Gruvbox
- Kanagawa
- Lucent Orng
- Material
- Matrix
- Mercury
- Night Owl
- OC-2
- One Dark Pro
- OpenCode
- Orng
- Osaka Jade
- Palenight
- Rose Pine
- Shades of Purple
- Synthwave '84
- Vercel
- Vesper
- Zenburn
Utility
AI
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/badge
Usage
import { Badge } from "@/components/ui/badge";<Badge variant="success">Active</Badge>Examples
Basic
A basic default badge.
Terminal
import { Badge } from "@/components/ui/badge";
export function BadgeBasic() {
return <Badge>Default</Badge>;
}Bold Without Border
Use bold and bordered={false} for an inline label style.
Terminal
import { Badge } from "@/components/ui/badge";
export function BadgeBold() {
return (
<Badge bold bordered={false}>
Inline Label
</Badge>
);
}Custom Border Style
Customize the border style and padding.
Terminal
import { Badge } from "@/components/ui/badge";
export function BadgeCustomBorder() {
return (
<Badge variant="info" borderStyle="double" paddingX={2}>
Important
</Badge>
);
}API Reference
Badge
| Prop | Type | Default |
|---|---|---|
children | string | required |
variant | "default" | "success" | "warning" | "error" | "info" | "secondary" | "default" |
color | string | - |
bold | boolean | false |
bordered | boolean | true |
borderStyle | "single" | "double" | "round" | "bold" | "singleDouble" | "doubleSingle" | "classic" | "round" |
paddingX | number | 1 |