Confirmation dialog demo (destructive action)
Why this matters
Not all destructive actions should be interrupted—only those that are truly irreversible (cannot be easily undone).
For most deletes, consider offering Undo instead: it’s faster, reduces errors, and improves flow.
- Use a confirmation dialog only when the damage is permanent and severe (data loss, funds, etc.).
- Ideally, offer Undo for reversible actions.
- Dialog should be robust: proper a11y (focus trap, content hidden from a11y tree, Escape always cancels, outcome is announced, Cancel is default focus).
- Related: When to use confirmation dialogs vs Undo.
Demo: delete items with confirm dialog
- Item Alpha
- Item Bravo
- Item Charlie