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
badge-demo
No opentui live preview is registered for this example yet.
Installation
$ pnpm dlx shadcn@latest add @termcn/opentui-badge
Usage
import { Badge } from "@/components/ui/badge";<Badge variant="success">Active</Badge>Examples
Basic
A basic default badge.
Terminal
badge-basic
No opentui live preview is registered for this example yet.
Bold Without Border
Use bold and bordered={false} for an inline label style.
Terminal
badge-bold
No opentui live preview is registered for this example yet.
Custom Border Style
Customize the border style and padding.
Terminal
badge-custom-border
No opentui live preview is registered for this example yet.
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 |