Follow recorded console output
$ pnpm test Running composer tests PASS sends a complete prompt PASS retains the draft on failure 2 tests passed in 428 ms
Renders streamed console output with incremental ANSI attributes and optional original colors.
$ pnpm test Running composer tests PASS sends a complete prompt PASS retains the draft on failure 2 tests passed in 428 ms
$ pnpm test Running composer tests PASS sends a complete prompt PASS retains the draft on failure 2 tests passed in 428 ms
npm install @noorddev/vlak-react
Load the stylesheet once at your app root, then import the components you use.
import "@noorddev/vlak-react/css";
import { Terminal } from "@noorddev/vlak-react";Per-component imports are available at @noorddev/vlak-react/components/terminal.
npx @noorddev/vlak-cli add terminal
Adds the component and its dependencies to components/vlak/. Follow the StyleX setup to compile the source in your application.
npx shadcn add https://vlak.dev/r/terminal.json
Installs the same source through the shadcn CLI.
import { Terminal } from "@noorddev/vlak-react";
<Terminal output={"\u001b[1m2 tests passed\u001b[0m\n"} streaming={false} />See the integration example to compose these components with your application's model and data.
Streaming console output with incremental ANSI attributes; not a shell or terminal emulator.
| Prop | Type | Default | Description |
|---|---|---|---|
outputrequired | string | ||
title | ReactNode | "Terminal" | |
streaming | boolean | false | |
autoScroll | boolean | true | |
ansiColors | boolean | false | Explicitly opt into original ANSI colors. The default retains text attributes in monochrome. |
onClear | () => void | ||
onCopy | (output: string) => void | Promise<void> | ||
maxHeight | Property.MaxHeight<string | number> | "24rem" | |
maxCharacters | number | 100000 | Maximum visible source characters. Copy retains the complete original output. |
Also accepts Omit<HTMLAttributes<HTMLElement>, "onCopy" | "title">.
The ref reaches HTMLElement.
| Keys | Does |
|---|---|
| Tab | Tab reaches copy, optional clear, jump-to-latest and the output region. |
| Enter, Space | Enter or Space activates the focused button. Scroll keys move the focused output region. |
The same styles are available as CSS. Native HTML provides the static presentation; React or application code supplies state updates and actions.
npm install @noorddev/vlak
import "@noorddev/vlak/css";
<section class="rs-terminal" aria-label="Terminal"><header class="rs-terminal-header"><span class="rs-terminal-title">Terminal</span><span class="rs-terminal-status" role="status">Output complete</span></header><div class="rs-terminal-content" tabindex="0" role="group" aria-label="Terminal output"><pre class="rs-terminal-pre"><span class="rs-terminal-run rs-terminal-bold">2 tests passed</span></pre></div></section>