Back to compare picker

Undo vs Confirmation dialog

Undo keeps routine reversible actions fast after they happen. A confirmation dialog blocks the action beforehand when the consequence is high and recovery is weak or impossible.

Learn the decision

Match the interaction to the person's task

Undo keeps routine reversible actions fast after they happen. A confirmation dialog blocks the action beforehand when the consequence is high and recovery is weak or impossible.

Undo

Use it when: The action is common and mistakes are likely.

Make this state clear: Normal state before the user action.

Observe the result: Undo restores the deleted task to the list and reports Quarterly report restored.

Study the full pattern →

Confirmation dialog

Use it when: The action is destructive, irreversible, costly, security-sensitive, privacy-affecting, or externally visible.

Make this state clear: Pre-action state with an explicit consequential trigger.

Observe the result: Cancel, Escape, and Keep archive leave the archive unchanged and return focus to Delete archive.

Study the full pattern →

Practice the judgment: Imagine this situation: Using confirmation for every routine action creates habituation and makes the dialog less protective when a serious decision appears. Write the person's goal, choose one of these patterns, and show the state that helps the person continue. Use the decision rules and source trail below to explain your choice.

Review the underlying principle →

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.Help the person reach a clear task outcome.
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 Undo action disappears before users can activate it.The red destructive action is enabled immediately and sits where users expect the routine primary button.
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 The UI promises undo for a side effect that has already notified external recipients.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 Recovery would restore only part of the user's lost work.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 Restoring only part of the prior state while implying full recovery.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
Undo action disappears before users can activate it.
Good UX
Undo restores the deleted task to the list and reports Quarterly report restored.
Bad UX
The UI promises undo for a side effect that has already notified external recipients.
Best fit
The action is common and mistakes are likely.
Avoid when
Recovery would restore only part of the user's lost work.
Required state
Normal state before the user action.
Accessibility burden
Make the undo control keyboard reachable and programmatically identifiable.
Common misuse
Restoring only part of the prior state while implying full recovery.

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
Help the person reach a clear task outcome.
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
The red destructive action is enabled immediately and sits where users expect the routine primary button.
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.

Saved items