The live demo starts when it’s in view.Drag, recolour, resize, add and delete tiles · rename Dune: Neon’s size formula follows, one step · Ctrl Z / Ctrl Shift Z · click the history to jump
An undo/redo history whose steps carry a few words, so the buttons say “Undo Move ‘Dune’”; one drag or one typing session is one step, and so is a drag of a…
What it costs a frame
CPU
0.19 ms
02468101216.7 ms
GPU
not used
CPU, median
0.19 ms
CPU, 95th pct
1.06 ms
Draw calls
0
Weight
Light
Measured 3 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured exercising itself: every frame commits an edit (a move or a recolour) and re-renders the board, the bar and the history; every other frame undoes or redoes, and every 40 frames it jumps back through the history. Phones: tiers are being measured next.
apple · Apple A19 Proin a browser tab · 16 November 2026
not timed
0.78
1.80
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026
not timed
0.42
2.50
Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.
What it needs
Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages
What it’s for
Editors and design tools
Boards and canvases
Forms with many fields
Settings panels
Level and content editors
Property inspectors with sliders and colour pickers
Renaming a value that formulas read
Pitfalls, in brief
Every edit must make a new object: identity is what undo, redo and “unsaved” are built on, so a value mutated in place cannot be taken back.
Keep selection, hover and scroll out of the stack: undoing a click that only selected something feels broken.
Name a step when it ends, not when it starts: a rename is “Rename ‘Dune’ to ‘Dusk’” only once the typing is done (release(label)).
A merge window joins same-label commits only: give a run of nudges one label, and call stopMerging() where a run should break (a click elsewhere, a save).
Leave Ctrl Z in a text field to the field: its own undo is what the author means there, and the stack records the field as one step when it loses focus.
8 more in brief
A slider fires input for every value it passes, and Chrome fires change for every arrow-key press too: a slider that writes on either is a hundred steps a drag, or one per auto-repeat of a held key. bindField ends a slider’s step on pointer up (caught on the window, wherever the pointer is released), on key up, or on a change with no key or pointer down (a screen reader’s step).
A field that previews through the stack re-renders everything that reads the state on every value.
Chrome doesn’t repaint ::-webkit-slider-runnable-track when a custom property on the input changes, so a fill drawn there from --p lags the thumb.
Rename and rewrite in one commit (or inside one hold): two commits are two undo steps, and undoing only the second leaves formulas that name nothing.
Refuse a new name another value already has (renameWithRefs does, any capitals and spaces): every formula naming it would then read one or the other.
While a rename is typed in a hold, the formulas still name the old one: resolve the old name to the item until the hold ends (the demo does), or rewrite on every keystroke and refuse collisions as you go.
renameNamesIn leaves words in quotes, a card’s name before a dot, a field after one and a function’s name alone: if your formulas have other forms (a sheet’s A1, a {Name} template), rewrite those yourself.
With createHistory, an undo function that records its own change would record the undo: records made while a step is applied are ignored for that reason, so make the change inside the undo function, not in a later tick.
13 pitfalls in full, the hook-up guide, the module source and its tests come with the part.
A copy of a document kept by itself a few minutes into each stretch of changes, and named copies on demand; thinned as they age (every copy for two hours…
A gate an app copies, with no packages: one Node script opens the app in headless Chrome on a fresh profile at an exact viewport and fails the run when a budget breaks.