Vector State Machine
A tiny, zero-dependency state machine for SVG. Author in your vector tool, scrub the timeline, drop markers โ states, wire triggers, and export a drop-in package. No WASM, no runtime renderer โ just clean SVG in the DOM.
๐ click the button โ the path morphs and the colour shifts, driven by the state machine
tip In the editor, hit Load sample to scrub this exact button, then โถ test and Export.
~2 KB core. Drop it on any page; it drives the SVG you already have.
default โ A โ default โ B, with triggers, conditions, and emitted events back to your app.
Vanilla JS, Vue, React โ same core. Local-cache persistence built in.
Import an Expressive Animator .eaf, scrub, mark states, export SVG + .vsm.json.
<!-- the editor exports a self-contained button.js (16 KB, 0 deps) --> <div id="btn"></div> <script type="module"> import mount from './button.js'; const m = mount('#btn', { persist: { key: 'btn' } }); m.on('onPress', () => addToCart()); btn.onclick = () => m.fire('press'); </script>