fractalsvelte mascot fractalsvelte fractalsvelte

Svelte 5 component · machines-ui · Animated

GraphTerminal

A terminal session that types prompt lines and streams output, with optional looping animation.

Install

GraphTerminal is a Svelte 5 animated ASCII terminal component in @fractaldesign/machines-ui. It works in SvelteKit and in any Svelte 5 app.

pnpm add @fractaldesign/machines-ui

Import

import
import '@fractaldesign/machines-ui/style.css';
import { GraphTerminal } from '@fractaldesign/machines-ui';

Usage

Example
<GraphTerminal
  title="SHELL"
  lines={[
    { kind: 'prompt', text: 'pnpm dev' },
    { kind: 'output', text: '  VITE v5 ready in 312ms' },
    { kind: 'output', text: '  ➜  Local:   http://localhost:5173/' }
  ]}
/>

Props

NameTypeDefault
title string Caption on the frame's top edge as `[ TITLE ]`. Uppercase, 1–2 words.—
lines TerminalLine[] Scripted session: prompt lines get typed character-by-character; output lines stream.—
typeMs number Milliseconds per character (typing). Default 28.28
streamMs number Milliseconds per character (streaming output). Default 14.14
holdMs number Milliseconds to hold the fully-revealed script before restarting. Default 1600.1600
loop boolean Loop the session. Default true.true
animated boolean Animate the typing and streaming. Default true. Reduced motion shows full script.true
label string Short caption under the art.'a session, scripted'
class string ''