Back to compare picker

Undo vs Confirmation dialog

Use undo when the system can restore the exact prior state quickly, visibly, and without external side effects.

Decision dimensions

Dimension UndoConfirmation dialog
UI or UX UX - Post-action recovery behaviorUI + UX - Consequential alert decision
UI guidance Show a named recovery affordance after the completed action, such as Undo delete for a specific task, near the result or in a consistent status region.Render an alert-style modal decision with a specific title, consequence description, safe cancellation, and a destructive action label that names the object or scope.
UX guidance Let users move quickly through frequent reversible actions, then recover from mistakes after seeing the result.Interrupt users only when the action has a meaningful consequence that cannot be safely recovered afterward.
Good UI Deleting Quarterly report removes it from the list and shows a recovery panel saying Quarterly report deleted with an Undo task button.Delete Research archive? explains that 14 notes and shared links will be permanently removed, offers Keep archive, and labels the danger action Delete archive.
Bad UI A tiny x removes an item with no object-specific recovery label.A popup says Are you sure? with OK and Cancel but does not name the project, notes, or irreversible outcome.
Good UX Undo restores the deleted task to the list and reports Quarterly report restored.Cancel, Escape, and Keep archive leave the archive unchanged and return focus to Delete archive.
Bad UX A second delete overwrites the first recoverable item without explaining which action Undo affects.Every archive, filter, and dismiss action opens the same confirmation until users click through automatically.
Best fit The action is common and mistakes are likely.The action is destructive, irreversible, costly, security-sensitive, privacy-affecting, or externally visible.
Avoid when The action has external side effects that cannot be recalled.The action is routine and easily reversible.
Required state Normal state before the user action.Pre-action state with an explicit consequential trigger.
Accessibility burden Make the undo control keyboard reachable and programmatically identifiable.Use alertdialog semantics or platform equivalent when the decision is urgent and requires a response.
Common misuse Offering undo for an action that cannot actually be reversed.Asking users to confirm every routine action until they stop reading.

Undo

UI or UX
UX - Post-action recovery behavior
UI guidance
Show a named recovery affordance after the completed action, such as Undo delete for a specific task, near the result or in a consistent status region.
UX guidance
Let users move quickly through frequent reversible actions, then recover from mistakes after seeing the result.
Good UI
Deleting Quarterly report removes it from the list and shows a recovery panel saying Quarterly report deleted with an Undo task button.
Bad UI
A tiny x removes an item with no object-specific recovery label.
Good UX
Undo restores the deleted task to the list and reports Quarterly report restored.
Bad UX
A second delete overwrites the first recoverable item without explaining which action Undo affects.
Best fit
The action is common and mistakes are likely.
Avoid when
The action has external side effects that cannot be recalled.
Required state
Normal state before the user action.
Accessibility burden
Make the undo control keyboard reachable and programmatically identifiable.
Common misuse
Offering undo for an action that cannot actually be reversed.

Confirmation dialog

UI or UX
UI + UX - Consequential alert decision
UI guidance
Render an alert-style modal decision with a specific title, consequence description, safe cancellation, and a destructive action label that names the object or scope.
UX guidance
Interrupt users only when the action has a meaningful consequence that cannot be safely recovered afterward.
Good UI
Delete Research archive? explains that 14 notes and shared links will be permanently removed, offers Keep archive, and labels the danger action Delete archive.
Bad UI
A popup says Are you sure? with OK and Cancel but does not name the project, notes, or irreversible outcome.
Good UX
Cancel, Escape, and Keep archive leave the archive unchanged and return focus to Delete archive.
Bad UX
Every archive, filter, and dismiss action opens the same confirmation until users click through automatically.
Best fit
The action is destructive, irreversible, costly, security-sensitive, privacy-affecting, or externally visible.
Avoid when
The action is routine and easily reversible.
Required state
Pre-action state with an explicit consequential trigger.
Accessibility burden
Use alertdialog semantics or platform equivalent when the decision is urgent and requires a response.
Common misuse
Asking users to confirm every routine action until they stop reading.
Decision rules
  • Use undo when the system can restore the exact prior state quickly, visibly, and without external side effects.
  • Use confirmation when the action causes permanent data loss, financial cost, security exposure, privacy change, or an external effect that cannot be recalled.
  • Use undo for frequent list cleanup, archive, reorder, dismiss, and move actions where interruption would train users to click through.
  • Use confirmation for uncommon destructive actions where a user might plausibly cancel after seeing the named object, affected scope, and consequence.
  • Use a typed or extra-step confirmation when one accidental click could delete a workspace, account, production data set, or broad permission scope.
  • Use prevention or clearer command placement before either pattern when the dangerous action sits too close to routine controls.
  • Do not pair a pre-action confirmation and post-action undo for the same low-risk action unless policy or audit requirements demand both.
Inspect live examples
Failure modes
  • Using confirmation for every routine action creates habituation and makes the dialog less protective when a serious decision appears.
  • Using undo for irreversible external side effects gives users false confidence after the damage has already happened.
  • Making the confirmation vague, such as Are you sure, without naming what will be lost or changed.
  • Offering undo after an action that cannot actually restore permissions, money movement, emails, webhooks, or deleted production records.
  • Stacking multiple confirmations instead of redesigning the dangerous control placement or action flow.