Bulk Scope Confirm

Bulk Scope Confirm is a copy-paste React component that stops bulk action hit every record before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/bulk-scope-confirm
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsBulk action hit every record

Was this component page useful?

How do I install Bulk Scope Confirm?

pnpm dlx shadcn@latest add @bollard/bulk-scope-confirm

The files land in your project. They're yours to edit.

What input mistakes does Bulk Scope Confirm catch?

  • "All matching" scope when only this page was meant (page is the default)
  • Risky subsets inside the selection, counted by category
  • The match count changing while the dialog is open, which locks Confirm until acknowledged

What props does Bulk Scope Confirm accept?

BulkScopeConfirm props
PropTypeDefault
action* (required)

Verb for the action, e.g. "Archive".

string—
page* (required)

Only the items selected on the current page.

ScopeDetails—
all* (required)

Every item matching the current filter, across all pages.

ScopeDetails—
noun

Singular and plural noun, e.g. ["file", "files"].

[string, string]["item", "items"]
scope

Controlled scope.

BulkScope—
defaultScope

Initial scope when uncontrolled. Defaults to the safer "page".

BulkScope"page"
onScopeChange

Called when the user switches between this page and all matching.

(scope: BulkScope) => void—
onConfirm* (required)

Called with the scope the user confirmed. Return a promise to show a pending state; a rejection is caught.

(scope: BulkScope) => void | Promise<void>—
onCancel

Called when the user cancels.

() => void—
variant

Visual style of the confirm button.

keyof typeof variants"default"
pageLabel

Label for the this-page option.

string"Selected on this page"
allLabel

Label for the all-matching option.

string"All matching"
pendingLabel

Confirm button content while onConfirm runs.

React.ReactNode"Working…"
cancelLabel

Cancel button content.

React.ReactNode"Cancel"
acknowledgeLabel

Button that accepts a changed count and unlocks Confirm.

React.ReactNode"Use new count"
driftMessage

Warning shown when the "all" count changes while this is open.

(from: string, to: string) => React.ReactNode(from, to) => `The match changed from ${from} to ${to} wh…
locale

BCP 47 locale for numbers.

string—

* required. Also accepts the native props of <section> (className, aria-*, data-*…), passed through to it.

How is Bulk Scope Confirm accessible?

  • Scope choice is a fieldset with a legend and labelled radio options
  • The summary and the drift warning are aria-live="polite"
  • Confirm uses aria-disabled while locked, aria-busy while pending and aria-describedby to the drift warning
  • Breakdown and sample lists have aria-labels

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Resolve the scope on the server at execution time, check the count you confirmed, and authorise each record.

  • Counts and categories come from your props; it does not query the data
  • Drift is only noticed when you pass updated counts while it is open

What expensive mistakes does Bulk Scope Confirm stop?

Bulk action hit every record

Also known as

bulk delete · select all · bulk edit · mass action · data table · admin panel · batch update

Field type

What dependencies does Bulk Scope Confirm require?

Bulk Scope Confirm facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameBulk Scope Confirm
Registry identifier@bollard/bulk-scope-confirm
Install commandnpx shadcn@latest add @bollard/bulk-scope-confirm
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Bulk Scope Confirm

How does Bulk Scope Confirm protect destructive mutations?

Bulk Scope Confirm prevents bulk action hit every record. Enforces deliberate friction against "All matching" scope when only this page was meant (page is the default), Risky subsets inside the selection, counted by category, The match count changing while the dialog is open, which locks Confirm until acknowledged. Limitation: authorize bulk-scope-confirm mutations on the server.

How do I install bulk-scope-confirm with shadcn?

Run `npx shadcn@latest add @bollard/bulk-scope-confirm`. Sources added: registry/default/bulk-scope-confirm/bulk-scope-confirm.tsx. Package requirements: lucide-react.

What props customize Bulk Scope Confirm?

Bulk Scope Confirm accepts `action`, `page`, `all`, `noun`, `scope`. Configures bulk delete, select all, bulk edit behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of bulk-scope-confirm?

Counts and categories come from your props; it does not query the data. Drift is only noticed when you pass updated counts while it is open Server requirement: Resolve the scope on the server at execution time, check the count you confirmed, and authorise each record.

How does Bulk Scope Confirm meet accessibility guidelines?

Scope choice is a fieldset with a legend and labelled radio options. The summary and the drift warning are aria-live="polite". Confirm uses aria-disabled while locked, aria-busy while pending and aria-describedby to the drift warning. Breakdown and sample lists have aria-labels. Minimizes errors: select all deleted everything, bulk delete more than expected.

Which components pair with Bulk Scope Confirm?