1Sponsor

App Shell

Full-screen TUI layout with header, tip bar, full-width input, scrollable content, and hints footer

Terminal

Installation

pnpm dlx shadcn@latest add https://termcn.dev/r/app-shell.json

Usage

import { AppShell } from "@/components/ui/app-shell";
<AppShell>
  <AppShell.Header>
    <AppShell.Tip>Press Tab to autocomplete commands</AppShell.Tip>
  </AppShell.Header>
  <AppShell.Input
    placeholder="Enter a command..."
    prefix="$"
    onSubmit={(value) => console.log(value)}
  />
  <AppShell.Content height={16}>
    {/* scrollable output area */}
  </AppShell.Content>
  <AppShell.Hints items={["↑↓ scroll", "enter submit", "esc quit"]} />
</AppShell>

API Reference

AppShell

PropTypeDefault
childrenReactNoderequired
fullscreenbooleanundefined

AppShell.Header

PropTypeDefault
childrenReactNoderequired

AppShell.Tip

PropTypeDefault
childrenReactNoderequired

AppShell.Input

PropTypeDefault
valuestringundefined
onChange(value: string) => voidundefined
onSubmit(value: string) => voidundefined
placeholderstring"Type something..."
borderStyle"single" | "double" | "round" | "bold""single"
borderColorstringundefined
prefixstring">"

AppShell.Content

PropTypeDefault
childrenReactNoderequired
autoscrollbooleanundefined
heightnumber20

AppShell.Hints

PropTypeDefault
itemsstring[]undefined
childrenReactNodeundefined