Destructive Action Safety
Danger zone components replace generic 'Are you sure?' dialogs with explicit typed acknowledgements, deletion readbacks, and recovery windows. They eliminate habitual autopilot confirmation clicks on irreversible actions.
Deletes, transfers and resets that need a deliberate second look.
A review screen for an AI agent's tool call that spells out what it will delete, send or change and how far it reaches, before someone approves it.
Runs actions optimistically and commits only after an undo window, so a mistake can be taken back without an "Are you sure?".
Lists exactly what git reset --hard, clean, checkout -- . or stash drop would destroy, and offers to stash first.
Reads back everything an account deletion loses or keeps charging for, so users do not delete more than they expect or keep paying an app store.
Lists every commit a force push would drop, marks other people's work and builds a safer lease command, so teammates' commits aren't erased.
Reads a Terraform or OpenTofu plan back with data-losing destroys and replacements first, so an apply doesn't quietly delete a production database.
Reads a Postgres migration back step by step with what each step locks and what can't be undone, so it doesn't take production down or lose data.
A button that fires only after a full press-and-hold, so a stray click or tap doesn't trigger a destructive action.
Needs two deliberate clicks for a destructive action: the first arms it with a draining timer, the second confirms.
Confirmation dialog that unlocks a destructive action only after the exact name is typed, flagging a typo as it happens.
Before a delete, loads and lists everything that goes with the parent object, so a cascade doesn't wipe child records nobody saw.
States exactly how many records a bulk action will hit and defaults to this page only, so "select all" doesn't hit every record.
A drop target that names what will move and where, ignores flick drops and offers Undo, so files and folders don't land in the wrong place.
Keeps destructive settings visible but locked until deliberately unlocked, so a stray click doesn't delete or transfer something.
Ignores clicks on a button for a moment after it appears, moves or changes, so people don't press something that just slid under the cursor.
Makes a destructive keyboard shortcut need a deliberate second press, so a slipped finger only shows a prompt.
Puts a lift-up cover over a critical switch like maintenance mode or a kill switch, so a stray click can't flip it.
Makes swipe-to-delete deliberate: the row deletes only past a visible line, never on a flick or scroll, and keeps an Undo.
Review screen for the two-person rule: it shows the exact plan, hides Approve from the requester, and flags edits made after review.
Shows how long each trashed item has before it's deleted forever, and makes emptying the trash need the typed item count.
Reads back how many rows a shift-click just selected, with Undo, so a runaway range selection doesn't act on rows nobody saw.
Asks the user to re-confirm with a passkey, password or PIN before a sensitive action, so an unattended signed-in screen is harder to misuse.
Shows what a rollback reverts, what it can't undo and which versions it skips, then confirms by typing the target's name.
Puts Archive and Delete side by side with what happens to each thing under both, so people don't delete what they only meant to put away.
Shows what removing a member, token or app will break: owned work left unowned, sessions ended and integrations that stop.
Reads back what an ownership transfer moves and keeps, warns about an outside email or a recipient whose plan can't own it, and waits for acceptance.
Before merging duplicate records, names every value that will be discarded, so a merge doesn't silently throw data away.
Before moving an item, reads back who gains or loses access, which links break and which settings change, so a private doc doesn't land in a public folder.
Shows only the settings a reset would actually change, current → default, so a reset to defaults doesn't wipe customisations unseen.
Helps prevent an upload from overwriting a newer file with an older one by comparing both copies before replacing.
Checks a DNS edit or delete against the whole zone before saving, so a removed MX or broken SPF doesn't quietly stop company email.
Keeps old and new API keys valid during a rotation and shows which clients have switched, so cutting off the old key doesn't take production down.
Says exactly what a shorter data-retention period will delete and when, and suggests an export before it purges.
Runs a bulk job with live done, failed and remaining counts, so a stopped or failed job never ends in "some of it happened, probably".
Catches typos in a new account email and keeps the old address active until the new one is verified, so nobody locks themselves out.
Compares a pasted IBAN, UPI ID or wallet address with what was copied or expected, so a clipboard hijacker's swapped address is caught before paying.
In a bulk edit, shows "Mixed (3 values)" with the spread instead of a blank, so saving doesn't silently overwrite every record.
Reads back what an API key will be able to do in plain words, flags risky scopes and suggests trimming to what was actually used.
Reads an npm or pip install command package by package and flags typosquats, wrong import names and packages that don't exist yet.
Shows where a curl | sh install script really comes from and offers download, inspect and verify steps instead, before an untrusted script runs.
Reads docker run, compose ports or a Kubernetes Service back as who can reach each port, so a database isn't published to the internet by accident.
Reads a Unix file mode back in plain words and flags permissions that leak data or lock people out, like a world-readable key.
Reads a .env the way the bundler does and flags secrets in public variables, so a secret key isn't shipped in the client bundle.
Reads a CIDR block back as its exact range and size, and warns before a firewall rule opens to the whole internet or overlaps an existing range.
Warns before running SQL that touches every row or drops data, like UPDATE/DELETE without WHERE, and asks for the table name first.
Shows the cluster, context and namespace a kubectl or helm command will really hit, before it runs, so production isn't changed by accident.
Marks the page, tab title and favicon with the environment, so nobody edits production thinking it is staging.
A sticky bar that says whose account you are acting as, and labels destructive buttons with the org they act on, so support staff don't edit the wrong data.
States who an SMS, WhatsApp or email blast will reach, who is excluded and who is in quiet hours, before an explicit confirm sends it.
Shows what a chosen role can and can't do, the diff from the current role, and a smaller role when the pick adds risky permissions.
Makes widening who can see something an explicit step that shows who gains access; narrowing stays instant.
Before an upgrade or downgrade, reads back today's charge, credits, the next bill and any usage over the new plan's limits, so nobody is surprised by a charge or lost data.
Flags GitHub Actions workflow patterns that can expose secrets or the repo to pull requests, following GitHub's secure-use guidance.
Reads an AWS IAM or S3 bucket policy back in plain words and flags grants far wider than intended, such as a bucket made public.
Previews how many rows a dedupe would merge as you pick key columns, so it doesn't merge nothing or merge too much.
Users develop confirmation fatigue and automatically click OK without reading the prompt text. Use Type to Confirm (`type-to-confirm`) to require typing the resource slug. Install with `npx shadcn@4.21.0 add @bollard/type-to-confirm`. Limitation: typed input is a UI guard, not permission authorization.
Hold to Confirm (`hold-to-confirm`) requires pressing and holding the button for 2-3 seconds before triggering. Install with `npx shadcn@4.21.0 add @bollard/hold-to-confirm`. Limitation: long presses can be simulated by automated scripts.
Undo Toast (`undo-toast`) delays permanent deletion by 5 to 10 seconds, allowing users to cancel an accidental click. Install with `npx shadcn@4.21.0 add @bollard/undo-toast`. Limitation: requires soft-delete or staging queues on the backend.
Account Deletion Readback (`account-deletion-readback`) itemizes deleted workspaces, members, and data before confirming. Install with `npx shadcn@4.21.0 add @bollard/account-deletion-readback`. Limitation: actual cascade deletion logic belongs in database transactions.