1Sponsor

Info Box

Bordered info panel with header, key-value rows, and tree-prefix rows

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

PropTypeDefault
borderStyle"single" | "round" | "double" | "bold""single"
borderColorstringundefined
padding[number, number][0, 1]
widthnumber | "full"undefined
childrenReactNoderequired

InfoBox.Header

PropTypeDefault
iconstringundefined
iconColorstring"green"
labelstringrequired
descriptionstringundefined
versionstringundefined
versionColorstring"cyan"

InfoBox.Row

PropTypeDefault
labelstringrequired
valuestringundefined
valueDetailstringundefined
valueColorstringundefined
boldbooleanfalse
treebooleanfalse
colorstringundefined

InfoBox.TreeRow

Same props as InfoBox.Row except tree is always true.