animated

State

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

Install

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

Preview

[ AGENT ]

state machine, stepping through

<GraphState title="AGENT" />

Props

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

API

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

Types

NameKindDescription
Stateinterface
Transitioninterface
Seginterface

Theming

CSS custom properties this component reads.

  • --graph-accent
  • --text-primary
  • --text-secondary

Related

Built from

src/lib/components/animated/GraphState.svelte

machines-ui