Component packs › Slate › Eraser Undo
A felt eraser sweeps along a deleted line and wipes it to dust; Undo writes it back in, left to right.
Eraser Undo is an undo from Slate, a component pack with 6 chalkboard components: Controls written in chalk on a slate: strokes that draw themselves and rub out to dust. Price: $2 for the whole pack.
Built with: eraser sweep, chalk write-back, undo window.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
items | string[] | ||
undoFor | number | 6 | Seconds Undo stays available. Default 6. |
width | number | 380 | Board width in px. Default 380. |
dark | boolean | ||
onRemove | (text: string) => void | ||
onUndo | (text: string) => void | ||
autoplay | number | false | Showcase mode: erases and restores lines every N ms while visible. |
readonly items: string[]remove(index: number): voidundo(): voiddestroy(): voidimport EraserUndo from './EraserUndo';
<EraserUndo />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Checkboxes.