Export Scope

Export Scope is a copy-paste React component that stops export only had page 1 of 250 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/export-scope
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

StopsExport only had page 1 of 250

Was this component page useful?

How do I install Export Scope?

pnpm dlx shadcn@latest add @bollard/export-scope

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

How do I use Export Scope in React?

export-scope-usage.tsx
import { ExportScope, type ExportScopeData } from "@/components/ui/export-scope"

<ExportScope
  scope={scope}
  onExport={(options, summary) => setDone(`Exported ${summary.rowCount.toLocaleString("en-IN")} rows (${options.rows === "all" ? "all pages" : options.rows}, personal data: ${options.pii}).`)}
/>

What input mistakes does Export Scope catch?

  • Exporting only the current page when all rows were meant
  • Exports silently capped at a row limit
  • Active filters and the real date range, with a day count
  • Hidden columns and personal-data columns, with a mask option

What props does Export Scope accept?

ExportScope props
PropTypeDefault
scope* (required)

What the table currently shows: filters, range, pages, columns.

ExportScopeData—
value

Controlled options.

ExportOptions—
defaultValue

Initial options when uncontrolled. Defaults to the current page, the way most "Export" buttons behave.

ExportOptions{ rows: "page", includeHidden: false, pii: "include" }
onValueChange

Called with the export options whenever they change.

(value: ExportOptions) => void—
onExport

Called with the chosen options and the readback. May return a Promise.

(options: ExportOptions, summary: ReturnType<typeof summarizeExport>) => void | Promise<void>—
locale

Locale for dates and numbers.

string—
title

Heading for the export panel.

string"This export includes"
downloadLabel

Template: `{count}` rows.

string"Download {count} rows"
pageOnlyText

Templates: `{exporting}`, `{total}`, `{requested}`, `{columns}`.

string"Only this page: {exporting} of {total} matching rows."
truncatedText

Warning when the export is capped.

string"Capped at {exporting} of {requested} rows. Narrow the fi…
piiText

Warning when personal-data columns are included.

string"Includes personal data: {columns}."
allRowsLabel

Text for the export-all fix.

string"Export all {total}"
maskLabel

Text for the mask fix.

string"Mask it"
labels

Override any other string.

Partial<typeof EXPORT_SCOPE_LABELS>—

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

How is Export Scope accessible?

  • Options are role="radiogroup" segmented controls with roving tabIndex and arrow keys
  • The readback is written in text

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: Apply the same scope, row limit and masking when generating the file on the server, and log exports of personal data.

  • Reads back the scope you describe; it doesn't produce the file
  • Which columns hold personal data is up to your scope definition

What expensive mistakes does Export Scope stop?

Export only had page 1 of 250

Also known as

export · csv · download · data table · filters · date range · pii · excel

Field type

What dependencies does Export Scope require?

Export Scope facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameExport Scope
Registry identifier@bollard/export-scope
Install commandnpx shadcn@latest add @bollard/export-scope
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 Export Scope

What form validation mistake does Export Scope catch?

Export Scope prevents export only had page 1 of 250. Reads back exactly what an export file will hold, so it doesn't go out as page 1 of 250, silently capped or full of personal data. Catches: Exporting only the current page when all rows were meant, Exports silently capped at a row limit, Active filters and the real date range, with a day count, Hidden columns and personal-data columns, with a mask option. Limitation: validate export-scope schemas on backend.

How do I install export-scope with shadcn?

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

What props customize Export Scope?

Export Scope accepts `scope`, `value`, `defaultValue`, `onValueChange`, `onExport`. Configures export, csv, download behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of export-scope?

Reads back the scope you describe; it doesn't produce the file. Which columns hold personal data is up to your scope definition Server requirement: Apply the same scope, row limit and masking when generating the file on the server, and log exports of personal data.

How does Export Scope meet accessibility guidelines?

Options are role="radiogroup" segmented controls with roving tabIndex and arrow keys. The readback is written in text. Minimizes errors: export only current page, csv missing rows.

Which components pair with Export Scope?