15 / 18

Principle 15

Undo beats confirm

Asking are you sure before every action teaches people to click yes without reading. Doing the action and offering Undo is faster for the common case and safer for the mistake.

In a real interface

✕ Avoid

Smoked tea

✓ Do

Smoked tea

01

Why

Jakob Nielsen warns that if you cry wolf too many times, people stop paying attention to the question. A confirmation that appears for everything protects nothing.

He also asks to offer undo whenever possible, as part of the user control and freedom heuristic. NN/g describes it as an emergency exit: people choose functions by mistake and need a clear way back.

02

How to apply it

For reversible actions, act at once and show Undo in place for a few seconds: deleting a message, archiving, moving. Keep the data until the window closes.

Save confirmations for actions with serious consequences that cannot be undone. Then label the buttons with the result, such as Delete project and Keep project, as Nielsen recommends, instead of Yes and No. Vercel's guidelines ask for exactly this choice: confirm or offer Undo with a safe window.

03

Edge cases

Some actions leave the system and cannot be pulled back, like sending a payment. Those need a confirmation that restates what will happen. Undo must be easy to find; a hidden gesture does not count.

✓ Do

  • Act first and offer Undo for reversible actions
  • Keep the data until Undo expires
  • Confirm only what cannot be undone
  • Label buttons with the outcome

✕ Avoid

  • Ask are you sure for every delete
  • Use Yes and No as answers
  • Hide undo behind a gesture
  • Confirm and then offer no way back

For agents · PRINCIPLE.md

## Undo beats confirm

 

- For reversible actions, act immediately and show Undo in place for a few seconds.

- Keep the data until the Undo window closes.

- Confirm only actions that cannot be reversed.

- Label confirmation buttons with the outcome, never Yes and No.

Enforced bykero-method undo instead of confirm for reversible actions