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/divider
Usage
import { Divider } from "@/components/ui/divider";<Divider label="Section" />Examples
Vertical rule and label styling
Use dividerChar and height for vertical rules; titlePadding and labelColor adjust the labeled horizontal variant.
Terminal
import { Box, Text } from "ink";
import { Divider } from "@/components/ui/divider";
export function DividerCustom() {
return (
<Box flexDirection="column" gap={1}>
<Text dimColor>Vertical dividerChar</Text>
<Box flexDirection="row" gap={1}>
<Divider orientation="vertical" dividerChar=":" height={5} />
<Text>Beside rule</Text>
</Box>
<Divider
label="Labeled"
titlePadding={2}
labelColor="cyan"
color="gray"
/>
</Box>
);
}API Reference
Divider
| Prop | Type | Default |
|---|---|---|
variant | "single" | "double" | "bold" | "single" |
orientation | "horizontal" | "vertical" | "horizontal" |
color | string | - |
label | string | - |
labelColor | string | - |
dividerChar | string | - |
titlePadding | number | 1 |
padding | number | 0 |
height | number | 1 |
width | number | "auto" | "auto" |
On horizontal dividers, the rule still uses Ink’s top border on flex-grown segments; dividerChar applies to vertical orientation.