1Sponsor

Help Screen

Figlet banner + tagline + aligned Options/Commands help sections

Terminal

Installation

pnpm dlx shadcn@latest add https://termcn.dev/r/help-screen.json

Usage

import { HelpScreen } from "@/components/ui/help-screen";
<HelpScreen
  title="mycli"
  tagline="A blazing-fast task runner"
  usage="mycli <command> [options]"
>
  <HelpScreen.Section label="Commands">
    <HelpScreen.Row flag="init" description="Create a new project" />
    <HelpScreen.Row flag="build" description="Compile the source files" />
    <HelpScreen.Row flag="test" description="Run the test suite" />
  </HelpScreen.Section>
  <HelpScreen.Section label="Options">
    <HelpScreen.Row flag="--help, -h" description="Show this help message" />
    <HelpScreen.Row flag="--version, -v" description="Print version number" />
    <HelpScreen.Row flag="--verbose" description="Enable verbose logging" />
  </HelpScreen.Section>
</HelpScreen>

API Reference

HelpScreen

PropTypeDefault
titlestringrequired
font"block" | "simple" | "shade" | "slim""block"
titleColorstringundefined
taglinestringundefined
usagestringundefined
descriptionstringundefined
columnGapnumber4
flagWidthnumberundefined
childrenReactNoderequired

HelpScreen.Section

PropTypeDefault
labelstringrequired
labelColorstringundefined
childrenReactNoderequired

HelpScreen.Row

PropTypeDefault
flagstringrequired
descriptionstringrequired
flagColorstringundefined
descriptionColorstringundefined