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
info-box-demo
No opentui live preview is registered for this example yet.
Installation
$ pnpm dlx shadcn@latest add @termcn/info-box
Usage
import { InfoBox } from "@/components/ui/info-box";<InfoBox borderStyle="round" width={40}>
<InfoBox.Header icon="📦" label="my-package" version="v2.4.1" />
<InfoBox.Row label="License" value="MIT" />
<InfoBox.Row label="Engine" value="node" valueDetail=">=18.0.0" />
<InfoBox.TreeRow label="Platform" value="darwin-arm64" />
</InfoBox>API Reference
InfoBox
| Prop | Type | Default |
|---|---|---|
borderStyle | "single" | "round" | "double" | "bold" | "single" |
borderColor | string | - |
padding | [number, number] | [0, 1] |
width | number | "full" | - |
children | ReactNode | required |
InfoBox.Header
| Prop | Type | Default |
|---|---|---|
icon | string | - |
iconColor | string | "green" |
label | string | required |
description | string | - |
version | string | - |
versionColor | string | "cyan" |
InfoBox.Row
| Prop | Type | Default |
|---|---|---|
label | string | required |
value | string | - |
valueDetail | string | - |
valueColor | string | - |
bold | boolean | false |
tree | boolean | false |
color | string | - |
InfoBox.TreeRow
Same props as InfoBox.Row except tree is always true.