Shell

A command transcript and prompt with command history. Bring the commands and their effects.

pulls inclass-variance-authority@afterglow/theme
afterglow shell
Type help, status, or clear.

Installation

npx shadcn@latest add @afterglow/shell

Composition

Component structure.

Shell
├── ShellOutput
│   ├── ShellCommand
│   └── ShellLine
└── ShellPrompt

API Reference

Shell

The bordered shell surface. It accepts section props and labels itself Shell unless aria-label says otherwise.

ShellOutput

A scrolling role=log transcript that announces added lines politely.

ShellCommand

A submitted command with its prompt.

PropTypeDefault
promptstring"$"

ShellLine

One output line with an optional status tone.

PropTypeDefault
tone"command" | "default" | "error" | "muted" | "warning""default"

ShellPrompt

The command field. It trims submitted text, clears after submission and recalls the last 40 commands with Arrow Up and Arrow Down.

PropTypeDefault
labelstring"Command"
onSubmit(command: string) => void-
placeholderstring-
promptstring"$"