Feedback

TerminalOutput

Render a read-only terminal stream with a bounded subset of ANSI SGR color and line-rewrite behavior.

import { TerminalOutput } from '@lostgradient/cinder/terminal-output';
terminalansioutput
01

Overview

Read-only ANSI process output. It supports SGR 16-color foregrounds, bold/reset, carriage-return rewrites, and erase-line control sequences. It does not own a PTY or accept terminal input. While followLatest is true (the default), appended output stays anchored to the latest line; scrolling away pauses following until the viewport reaches the end again.

svelte
<TerminalOutput aria-label="Build output" value={'\u001b[32mready\u001b[0m\n'} />
Live preview
PASS build
WARN cache miss
02

When to use

Use when
  • Showing command output or logs that include basic ANSI styling and carriage-return progress updates.
Avoid when
  • Hosting an interactive real PTY — use terminal-frame.
03

Examples

Basic terminal output

Render read-only output with ANSI colors and progress updates.

04

Props

Props for terminal-output
Name
Type
Default
Description
value text ''
followLatest bindable boolean true
children snippet