Comparison guide
Bollard UI vs Confirm Dialogs: Which to Choose
Standard confirm dialogs remain useful. Add stronger target readbacks only when the action’s impact and the chance of confusion justify the extra step.
By Tushar Khadde · Published · Updated
| Concern | Bollard UI | Complementary tool |
|---|---|---|
| Routine choice | Often more interaction than needed for reversible, low-impact actions. | A familiar confirmation can be enough when the choice is clear and reversible. |
| Hard-to-reverse action | Can repeat the target, consequence or require typing the target. | A generic “Are you sure?” may not make scope or impact clear. |
| Security boundary | Provides a review surface; your API still authorizes the action. | A dialog alone never protects the server-side operation. |
A confirmation dialog is a pattern, not a complete safety policy
A standard confirm dialog is useful when someone needs a clear final chance to proceed or cancel. It is familiar and lightweight, and it fits many reversible changes. For a destructive action, a generic prompt can be too vague: it may omit the target, affected records, consequences or recovery window. Bollard UI offers components that make the proposed action more explicit, including type-to-confirm and account-deletion readback patterns.
Choose the lightest interaction that addresses the likely mistake. A dialog is not automatically safer because it adds a click. Repeating the exact target or offering an undo window may prevent more errors with less friction. Reserve typed confirmation for consequential actions where the target itself is easy to confuse.
Typed target for repository deletion
import { TypeToConfirm } from "@/components/ui/type-to-confirm"
<TypeToConfirm
open={open}
onOpenChange={setOpen}
phrase={repository.slug}
description={`Permanently deletes ${repository.slug} and its issues.`}
onConfirm={() => deleteRepository(repository.id)}
/>Show scope before asking for consent
A useful review names the resource and explains the consequence in language the user recognizes. “Delete Acme staging” is clearer than “This action cannot be undone” when multiple environments exist. If the action affects members, integrations or billing, summarize those effects before the confirmation control. Keep cancellation available and make the safe path as easy to find as the destructive path.
The decision should remain specific to the action displayed. If the target changes while the dialog is open, reset the confirmation state. If the operation is delayed, show its pending status and prevent duplicate submission. When an API returns an ambiguous timeout, check status before retrying a non-idempotent action.
Keep the action server-owned
async function deleteRepository(id: string) {
const response = await fetch(`/api/repositories/${id}`, { method: "DELETE" })
if (!response.ok) throw new Error("The repository was not deleted")
}
// The endpoint authenticates, authorizes and checks current scope.
// The dialog only gathers the user's deliberate confirmation.Frequently asked questions
Should every destructive button open a typed dialog?
No. Match friction to impact and reversibility. Use typed confirmation for high-consequence actions with a confusing target, and lighter patterns for routine changes.
Can a confirm dialog replace authorization?
No. Authenticate and authorize at the server endpoint, and validate the current target and policy when the action runs.
When is undo better than confirmation?
Undo is often a good fit when the action can be reversed safely for a short, clearly communicated period.