fractalsvelte mascot fractalsvelte fractalsvelte

Svelte 5 component · machines-ui · Animated

GraphState

A four-state machine drawn in ASCII — ready, think, act, done — with the current state and its outgoing transition highlighted.

Install

GraphState is a Svelte 5 animated ASCII state 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 { GraphState } from '@fractaldesign/machines-ui';

Usage

Example
<GraphState title="AGENT" />

Props

NameTypeDefault
title string Caption drawn on the top edge as `[ TITLE ]`. Uppercase, 1–2 words.—
animated boolean Animate the state cycle. Default true. Reduced motion freezes on the start state.true
speedMs number Milliseconds per state step. Default 700.700
label string Short caption under the art; the chart itself is the message.'state machine, stepping through'
class string ''