SCXML 1.0 · ECMAScript data model
Statecharts you can run, see and step through
scxmljs is a correctness-first SCXML interpreter that passes every mandatory W3C test, with two custom elements that render running charts in any framework: <scxml-view> draws a whole chart, <scxml-explorer> explores whole systems level by level.
npm install @tinyactors/scxmljs
<scxml-view src="traffic-light.scxml">More charts
<scxml-explorer> on a three-machine order system. Full-resolution video · try itWhy scxmljs
Conformant
Every mandatory W3C SCXML test passes, in both data models. The algorithm follows the spec's Appendix D procedure by procedure.
Safe for user charts
Each session gets its own QuickJS context: no access to the page, other sessions, or the network, and runaway scripts are stopped.
Or trusted and tiny
For your own charts, the trusted entry runs on the page's engine with the same semantics and no WebAssembly download.
Playback built in
A PlaybackClock pauses, steps and speeds up whole systems: machines, delayed events and simulated services together.
Custom elements
Plain web components with properties, events, slots and ::part(). Tested with React, Vue, Svelte and Angular.
Keyboard and screen readers
Tree navigation, live announcements, WCAG AA contrast in both themes, and zero axe violations in three browser engines.