animated

Terminal

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

Install

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

Preview

[ SHELL ]

a session, scripted

<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

PropTypeDefaultDescription
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 28Milliseconds per character (typing). Default 28.
streamMs number 14Milliseconds per character (streaming output). Default 14.
holdMs number 1600Milliseconds to hold the fully-revealed script before restarting. Default 1600.
loop boolean trueLoop the session. Default true.
animated boolean trueAnimate the typing and streaming. Default true. Reduced motion shows full script.
label string 'a session, scripted'Short caption under the art.
class string ''

API

  • class forwarded to the outer element
  • motion runs live; set animated={false} to freeze
  • a11y honours prefers-reduced-motion

Types

NameKindDescription
TerminalLineinterface
Seginterface

Theming

CSS custom properties this component reads.

  • --font-sans
  • --graph-accent
  • --text-primary
  • --text-secondary

Related

Built from

src/lib/components/animated/GraphTerminal.svelte

machines-ui