A team building a B2B web app starts with confirmation dialogs because they are easy to ship. Six months in, the app has a confirmation dialog for every destructive action, power users are dismissing them all without reading, and the team is back to square one on safety. The dialogs are not the wrong tool; they are the wrong default.
The three real patterns for protecting destructive actions are confirmation dialogs, undo windows, and soft delete. Each one solves a different shape of problem, and most actions in a real app should not use confirmation dialogs at all. This is a decision framework for picking the right pattern for each action.

Photo by Startup Stock Photos on Pexels
Start with the action's reversibility
Every destructive action sits somewhere on a reversibility spectrum.
- Truly irreversible. The state change cannot be reversed by anyone after it commits. Email sent to a real inbox. Payment captured against a real card. Hard delete of regulated PII. SMS message dispatched. API key revoked at an external provider.
- Reversible by the user. The user who took the action can reverse it within some window using normal permissions. Most application-level delete actions belong here.
- Reversible by an admin. The action can be reversed, but only by someone with elevated permissions. Important for B2B apps with role separation.
- Reversible with effort. The action is technically reversible but expensive: restoring from a backup, re-running a long pipeline, reissuing keys. Treat these like irreversible for UX purposes.
Map every destructive action in the product onto this spectrum. The pattern choice flows from where the action sits.
When confirmation dialogs are the right answer
Confirmation dialogs work well for genuinely irreversible actions, used infrequently, where the user can recognize the mistake when interrupted. That is a narrower category than most apps end up using dialogs for.
The dialogs in this category should be specific. Body text should describe the exact consequence: "Send this email to 1,247 recipients. This cannot be cancelled once sent." Generic copy ("Are you sure?") trains users to dismiss without reading, which defeats the purpose.
For the most severe cases (deleting an account, dropping a database, sending a mass communication), add typed confirmation: the user types a specific word or the name of the affected entity before the action commits. This forces engagement that a clickable button cannot. The Nielsen Norman Group has good background reading on when typed confirmation pays for itself.
For the destructive option, use a visually distinct button: a different color, a distinct icon, or both. Make the safe option the default focus. Accessibility matters here: the Web Accessibility Initiative maintains specific guidance on dialog patterns for keyboard and screen reader users.
When undo windows are the right answer
Undo wins for most user-reversible actions. The action commits immediately, a toast offers undo for a few seconds, and the user sees the result of the action before deciding.
The pattern is psychologically less expensive than confirmation. Users are willing to take destructive actions faster when they know undo is available. Power users do not develop dismiss-without-reading reflexes against undo toasts because clicking undo is rare and meaningful when it happens.
Three sizing decisions on the undo window:
- Duration. Five to ten seconds is the right range. Shorter and users miss the toast; longer and the toast becomes ambient noise.
- Bulk vs per-item. If the user can perform many destructive actions in a row, batch them into a single undo toast rather than spamming the screen.
- Persistence on navigation. Decide whether the toast disappears when the user navigates away (most do) or persists across navigation (more durable but harder to implement).
The Mozilla Developer Network maintains useful documentation on Web APIs that help implement undo well (notably the History API for navigation-persistent state and the ServiceWorker API for background restoration).
When soft delete is the right answer
Soft delete is the longer-window backstop. The action commits and removes the item from the user's normal view, but the item stays recoverable from a trash for a retention window (commonly 7 to 30 days).
Soft delete works well when:
- The user might need to recover days or weeks after the action.
- A different user (an admin, a teammate) might need to recover what the original user deleted.
- The action has cascading effects that the user might not realize at the time and might want to walk back later.
- Compliance or audit requirements demand recoverability.
The pattern requires a real trash view. A trash that is invisible or buried is a trash users do not use; a trash that is first-class UI gets used routinely and catches the slower mistakes.
When to combine patterns
Many real actions need more than one pattern layered together. Common combinations:
- Undo plus soft delete. Delete commits immediately, toast offers 5-second undo, item stays in trash for 30 days. This is the default for most application-level deletes.
- Confirmation plus undo. Severe irreversible action (sending email blast, dispatching a campaign) shows a confirmation dialog, then once confirmed, a short undo window where the action stages before actually committing. Common in marketing platforms.
- Soft delete plus permission gate. Some users can soft-delete; only admins can hard-delete from the trash. This separates the easy case from the irreversible one.
The pattern stack should be visible in the design. A user looking at a destructive action should be able to tell at a glance whether they can undo it, recover it, or only confirm it. The team at 137Foundry uses a one-page reference per product engagement that lists every destructive action and the patterns layered for each. Building that reference is usually a week of work and saves months of UX debt later.

Photo by Ketut Subiyanto on Pexels
The action audit
For a product that has accumulated dialogs over time, the cleanup process looks like this:
Inventory every destructive action in the product. Walk the UI, list every action that creates a state change a user might regret. Include not just deletes but bulk updates, role changes, account closures, integration disconnects.
Map each action onto the reversibility spectrum. Be honest. Most actions in B2B apps are user-reversible, but the dialogs in front of them suggest otherwise.
Pick the right pattern per action. Apply the framework above. Most actions move from "confirmation dialog" to "undo plus soft delete." A small handful stay on confirmation dialogs, usually with sharper copy and typed confirmation.
Build the missing infrastructure. If the product does not have soft delete, build it. If the trash view does not exist, build it. If undo cannot be triggered from a toast, build the mechanism.
Remove the redundant dialogs. Once the infrastructure is in place, the dialogs that no longer add value can be removed.
The work usually takes a sprint or two depending on product size. The product gets faster for power users, safer for new users, and the team stops adding dialogs as the default response to safety complaints.
The Smashing Magazine archives have several useful case studies on this kind of UX cleanup work. For more on the underlying decision framework, the longer guide on how to design confirmation patterns without annoying power users covers the principles in more depth. The work itself is the kind of engagement 137Foundry does as part of the web development service, and the broader services hub covers how that work fits into a product engagement.
A short pre-design checklist
For each destructive action you are about to ship:
- Is the action truly irreversible? If no, default to undo plus soft delete.
- If yes, is the dialog body text specific to this action?
- Is the destructive button visually distinct, with safe-option default focus?
- For severe cases, is typed confirmation in place?
- For reversible cases, does the toast fire reliably, persist long enough, and support bulk undo?
- Is there a trash view that is first-class UI, not buried?
Picking the right pattern at design time is much cheaper than removing extra dialogs later. The framework above is the first thing to bring to any new destructive action.
Top comments (0)