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
app-shell-demo
No opentui live preview is registered for this example yet.
Installation
$ pnpm dlx shadcn@latest add @termcn/app-shell
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
| Prop | Type | Default |
|---|---|---|
children | ReactNode | required |
fullscreen | boolean | - |
AppShell.Header
| Prop | Type | Default |
|---|---|---|
children | ReactNode | required |
AppShell.Tip
| Prop | Type | Default |
|---|---|---|
children | ReactNode | required |
AppShell.Input
| Prop | Type | Default |
|---|---|---|
value | string | - |
onChange | (value: string) => void | - |
onSubmit | (value: string) => void | - |
placeholder | string | "Type something..." |
borderStyle | "single" | "double" | "round" | "bold" | "single" |
borderColor | string | - |
prefix | string | ">" |
AppShell.Content
| Prop | Type | Default |
|---|---|---|
children | ReactNode | required |
autoscroll | boolean | - |
height | number | 20 |
AppShell.Hints
| Prop | Type | Default |
|---|---|---|
items | string[] | - |
children | ReactNode | - |