Skip to content

Destructive actions

Undo when you can, confirm when you must, and make irreversible actions deliberately hard to trigger by accident.

Deleting, revoking and resetting destroy work. The goal is to make recovery easy — and, where recovery is impossible, to make the mistake hard.

Undo over confirmation

A confirmation dialog on every delete trains people to click Yes without reading. If an action can be reversed, do it immediately and offer undo in a toast. It's faster for the 99% who meant it and safer for the 1% who didn't.

Invoice #2041 is ready
Ada commented on “Homepage v3”
Weekly usage report

Confirm what can't be undone

When an action is irreversible — deleting a project, revoking keys, removing a member's access — confirm with an AlertDialog:

  • Name the object in the title: Delete “acme-web”?
  • State the consequence in the description: what will be lost, and that it can't be undone.
  • Label buttons with verbs. Delete project and Keep project — never Yes and No.
  • Use the destructive variant only on the confirming button.
  • For high-stakes actions, require typing the name. It turns a reflexive click into a deliberate act.

Placement

  • Keep destructive actions away from frequent ones. A Delete button next to Save will eventually be clicked by mistake.
  • In menus, put destructive items last, after a separator, using variant="destructive".
  • On settings pages, group them in a danger zone at the end of the page.

Delete “acme-web”?

14 deployments will be removed. This can’t be undone.

Do.The consequence is explicit and the button says what it does.

Are you sure?

Please confirm.

Don’t.“Are you sure?” asks people to reread the screen to find out what they’re confirming.