Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/info-box.json
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 | undefined |
padding | [number, number] | [0, 1] |
width | number | "full" | undefined |
children | ReactNode | required |
InfoBox.Header
| Prop | Type | Default |
|---|---|---|
icon | string | undefined |
iconColor | string | "green" |
label | string | required |
description | string | undefined |
version | string | undefined |
versionColor | string | "cyan" |
InfoBox.Row
| Prop | Type | Default |
|---|---|---|
label | string | required |
value | string | undefined |
valueDetail | string | undefined |
valueColor | string | undefined |
bold | boolean | false |
tree | boolean | false |
color | string | undefined |
InfoBox.TreeRow
Same props as InfoBox.Row except tree is always true.