A streaming terminal surface for ANSI build and agent logs — copy, clear, and an optional streaming caret.
Streaming
ANSI-colored build output streams in while isStreaming is true. Copy and clear sit in the header.
Loading…
Installation
CLI
Also needs
npx @sonojs/ui@latest add button spinner && npm i ansi-to-react lucide-reactUsage
terminal.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| output | string | — | Full terminal text (ANSI escapes supported). |
| isStreaming | boolean | false | Shows status + caret while true. |
| autoScroll | boolean | true | Keep the viewport pinned to the latest line. |
| onClear | () => void | — | Enables the clear action in the header. |
| children | ReactNode | — | Compose `TerminalHeader` / `TerminalContent`, or omit for the default chrome. |