Component · shippable

Rewind

An undo / redo history, done properly — a command-pattern stack, ⌘Z and ⇧⌘Z, a timeline you can scrub. Every action is reversible, so knock the coffee over the board and then take it back: the flood un-happens, right back into the cup. No dependencies.

History

Drag the cards to rearrange — or grab the mug and knock it over. Then press ⌘Z.

There's no editor state on a server here — the whole history lives in the browser so you can watch it. The stack is just an array of commands and an index; undo steps the index back and animates the top command in reverse, redo steps it forward. Wire the same do / undo / redo into a text editor, a canvas, a form, and ⌘Z does what it does everywhere — only here you can see it.