# Toast with undo

Toast with undo: a free component, built on your design tokens, to use for reversible actions such as archive, move or remove, instead of asking 'Are you sure?' first. A toast that confirms an archive and offers Undo, which puts the item back where it was. It stays until it's used or closed.

Prompt: Add the OpenDesigner component toast-undo to this project: https://opendesigner.dev/library/toast-undo.html. Keep its markup and states; map its --ds-* variables to my tokens.

States: archived, restored, closed, hover, focus.

Accessibility: A polite live region that is always on the page reads what was archived; after Archive, focus moves to Undo so keyboard users can reach it, and returns to the restored row or the list after Undo or close. Escape closes the toast. There is no timer, so nobody loses the chance to undo.

File: https://opendesigner.dev/library/toast-undo.html

Catalog entry (parts, data limits, states, tokens): https://opendesigner.dev/library/toast-undo.json

Download: `curl -fsSLo toast-undo.html https://opendesigner.dev/library/toast-undo.html`
