Confirm-before-destroy without the modal
Replace the 'are you sure?' modal with a two-step inline button that confirms in place — keeping users in flow and giving mistaken clicks a quiet way out.
The default pattern for destructive actions is a confirm modal: click Delete, get a modal asking "are you sure?", click again. It works, but it interrupts every flow — including the ones where the user is certain.
A better pattern: turn the button itself into the confirmation.
Before
The classic two-click flow:
- User clicks Delete
- Modal appears: "Are you sure you want to delete this row?"
- User clicks Confirm
- Modal dismisses, row is deleted
Every step costs attention. The modal forces a focus shift, often covers the thing being deleted, and trains users to click through warnings without reading.
After
Two-step inline confirmation:
- User clicks Delete → button transforms in place to Click again to confirm (red, with a 3-second auto-revert)
- User clicks again within the window → action executes
Try it — the demo below runs the exact code on the Code tab:
Invoice INV-2026-0042
€ 4,820.00 — Acme GmbH
Why it works
Users who are certain pay the cost of one extra click in the same spot. Users who clicked by mistake see the state change, get the 3-second window to not click again, and their action quietly cancels.
When not to use it
This pattern is for reversible destructive actions (deleting a row, archiving a record, removing an item). For irreversible ones — wiping an account, sending a payment, posting a final journal — keep the modal. The friction is the point.
Variant: hold-to-confirm
For higher-stakes actions, replace "click twice" with "hold for 2 seconds." The button fills with a progress bar while held. Same idea, more force required, more deliberate.
Frequently asked questions
What is confirm-before-destroy without a modal?
It's a two-step inline pattern where the button itself becomes the confirmation. Clicking Delete transforms the button in place to 'Click again to confirm' — red, with a 3-second auto-revert. Clicking again within the window executes the action; doing nothing quietly cancels it. There's no modal, no focus shift, and no second screen.
Why is a confirm modal worse for destructive actions?
A modal interrupts every flow, including the ones where the user is already certain. It forces a focus shift, often covers the very thing being deleted, and trains users to click through warnings without reading. The inline pattern keeps the user's eyes on the thing they're deleting throughout.
When should you still use a modal instead?
For irreversible destructive actions — wiping an account, sending a payment, posting a final journal — keep the modal, because the friction is the point. The inline pattern is meant for reversible actions like deleting a row, archiving a record, or removing an item. For higher-stakes cases, a hold-to-confirm variant adds more deliberate force.