Skip to contentSkip to Content
ComponentsTerminalSession

TerminalSession

Render a command with prompt context, optional output, and a compact status marker. Most guide command snippets should use plain fenced bash blocks. Reserve TerminalSession for cases where prompt context, exact output, or status state matters to the reader.

Avoid invented success logs in guide pages. Use output only for exact text the reader should recognize, such as a version check, error message, or URL printed by a command. For setup commands, omit output so the command stays easy to copy.

The header copy button copies only the command value, not the prompt, output, or notes.

API

PropTypeDefaultDescription
commandstringCommand shown after the prompt.
outputstring | string[]Terminal output shown below the command.
cwdstringOptional working directory label.
titlestring"Terminal"Header label.
promptstring"$"Prompt marker before the command.
status"neutral" | "success" | "error""neutral"Header status color.
childrenReactNodeOptional explanatory note below the terminal block.

Example

Check version
$ folio --version
folio 0.1.0
<TerminalSession title="Check version" command="folio --version" status="success" output="folio 0.1.0" />