Skip to content
The Product Guys
All patterns
Feedback4 min read

The Confirmation Dialog

A modal asking are you sure, which is usually a design failure undo would solve better.

The problem it solves

Some actions are destructive and irreversible. The reflex is to ask first. The reflex is wrong most of the time, and the dialog becomes a click people learn to make without reading.

When to confirm and when to build undo

Rare andreversible: justdo itFrequent andreversible: undotoastRare andirreversible: aspecific dialogFrequent andirreversible:typedconfirmation, orredesign itDelete a draftArchive a taskDelete aproductiondatabaseSend a payoutHow often the action happensHow reversible the action is
Only rare and irreversible actions earn a dialog. Frequent and irreversible actions need stronger friction than a button, and everything reversible should use undo instead.

Start from the position that a confirmation dialog is a failure. It appears because the action cannot be undone, or because nobody built undo. The first case justifies the dialog. The second case is a backlog item wearing a modal.

  1. 1Ask whether the action is reversible. If it is, build undo and delete the dialog.
  2. 2If it is not reversible, ask whether it could be made reversible, with a trash, a delay, or a soft delete.
  3. 3If it genuinely cannot, ask whether the action is frequent. Frequent plus irreversible means people will click through the dialog blind, so the protection has to be stronger than a button.
  4. 4Only then write the dialog, and make it specific enough that reading it is worth the two seconds.

Habituation is the reason generic dialogs do nothing. After the fifth identical are you sure, the dialog is part of the action rather than a check on it. The muscle memory is click, click, and the user has confirmed something they never read.

Dialogs people click through blind

  • Are you sure? Cancel / OK
  • This action cannot be undone. Continue? No / Yes
  • Delete item? Cancel / Delete

Dialogs that actually stop someone

  • Delete acme-production and its 14 databases? This cannot be undone. Keep / Delete forever
  • Type acme-production to confirm deletion. [ ] Delete forever
  • Remove Priya from Finance? They lose access to 32 documents immediately. Keep access / Remove

The specifics matter. Name the object and the consequence in the sentence. Label the buttons with the verbs rather than OK and Cancel, so the dialog can be resolved without reading the body. Make the safe option the default focus. For anything truly catastrophic, require typing the resource name, which defeats muscle memory because it cannot be done without reading.

One more trap: never use a confirmation dialog as a retention device. A modal that appears when someone tries to leave, asking whether they are sure they want to give up their benefits, is not a safety check. It is sludge: Friction added deliberately to stop someone doing a thing they are entitled to do. with a dialog's manners, and it belongs in the same category as an obstructed cancellation flow.

When it fits

  • The action is genuinely irreversible, such as permanently purging data or rotating a key that invalidates live sessions.
  • The blast radius is larger than the click suggests, like deleting a folder that contains other people's work.
  • The action is rare, so the interruption does not become habit.
  • The dialog can name the specific object and the specific consequence.

When it backfires

  • The action is reversible, in which case the dialog is a tax on everyone to protect against a mistake undo would have caught.
  • It appears often, so it becomes a reflex click and stops protecting anything.
  • The copy is generic, so nobody reads it and the words do no work.
  • It is used to obstruct an intentional action like cancelling or leaving, which is a dark pattern: An interface built to get an outcome the user would reject if it were stated plainly. regardless of the button labels.

Products using it

  • GitHub

    Requires typing the repository name before deletion, which forces the person to read what they are destroying.

  • Google Drive

    Moves files to Trash with an undo toast instead of confirming, and confirms only on permanent deletion.

  • Stripe

    Requires an explicit typed or re-authenticated confirmation for live-mode actions that cannot be reversed.

The psychology under it

The takeaway

Build undo first; reserve the dialog for actions that cannot be reversed, and make it name what it destroys.

Finished the teardown? Bank it and the day counts toward your run.