Skip to Content
zjkm-ui-ai-elements

Terminal

Display streaming console output with full ANSI color support.

The Terminal component displays console output with ANSI color support, streaming indicators, and auto-scroll functionality.

Loading preview…

Installation

npm i zjkm-ui-ai-elements
import {  TerminalHeader,  TerminalTitle,  TerminalStatus,  TerminalActions,  TerminalCopyButton,  TerminalClearButton,  TerminalContent,  Terminal,} from "zjkm-ui-ai-elements/terminal";

First time? Add the package's styles: see Setup.

Features

  • Full ANSI color support (256 colors, bold, italic, underline)
  • Streaming mode with cursor animation
  • Auto-scroll to latest output
  • Copy output to clipboard
  • Clear button support
  • Dark terminal theme

ANSI Support

The Terminal uses ansi-to-react to parse ANSI escape codes:

\x1b[32m✓\x1b[0m Success    # Green checkmark
\x1b[31m✗\x1b[0m Error      # Red X
\x1b[33mwarn\x1b[0m Warning   # Yellow text
\x1b[1mBold\x1b[0m           # Bold text

Examples

Basic Usage

Loading preview…

Streaming Mode

Loading preview…

With Clear Button

Loading preview…

Props

<Terminal />

Prop

Type

<TerminalCopyButton />

Prop

Type

<TerminalHeader />

Prop

Type

<TerminalTitle />

Prop

Type

<TerminalStatus />

Prop

Type

<TerminalActions />

Prop

Type

<TerminalClearButton />

Prop

Type

<TerminalContent />

Prop

Type

On this page