Code
Terminal
Terminal emulator component for displaying command output with ANSI color support and auto-scroll.
Terminal
$ pnpm install
Packages: +776
+++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 776, downloaded 776, added 776, done
$ pnpm build
> turbo build
@blastx/ui:build: ESM dist/index.js 42.36 KB
@blastx/ui:build: ESM ⚡️ Build success in 110ms
@blastx/ui-ai:build: ESM dist/index.js 292.45 KB
@blastx/ui-ai:build: ESM ⚡️ Build success in 530ms
Tasks: 5 successful, 5 total
Time: 12.4sProps
| Prop | Type | Default | Description |
|---|---|---|---|
| output | string | - | Terminal output content |
| isStreaming | boolean | false | Whether output is being streamed |
| autoScroll | boolean | true | Whether to auto-scroll to bottom |
| onClear | () => void | - | Callback when clear button is clicked |
| className | string | - | Additional CSS classes |
Import
import { Terminal } from '@blastx/ui-ai';