Skip to content
caliper ui pro docs

CSV import

Brings a spreadsheet in without surprises: upload or paste, match columns (guessed from the names), fix problem rows in place, import with real progress you can stop, and download what was skipped.

Pro

Import contacts

Columns we look for:Name *Email *CompanyPlanSeatsCustomer since
Paste data instead

No file to hand?

When to use

  • Importing contacts, products, transactions or users.
  • Moving customers off a spreadsheet or another tool.

When not to use

  • A live sync with another system; build an integration.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/csv-import

Adds its 14 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

CsvImport

6 props
PropTypeDefaultDescription
entitystring"rows"What the rows are, plural, e.g. "contacts".
fields *readonly ImportField[]—
sample{ name: string; text: string; }—Offer a ready-made file, e.g. for a first try.
maxRowsnumber10_000
onImport *(rows: ImportRow[], progress: (done: number) => void, signal: AbortSignal) => Promise<void>—Imports the checked rows. Call `progress` with how many are done so the bar shows real work; stop when `signal` aborts. A thrown error is shown with a retry.
classNamestring—

parseCsv

0 props

No props of its own; it accepts the native props of its root element.

toCsv

0 props

No props of its own; it accepts the native props of its root element.

Keyboard

Enter
Activates the focused control.
Escape
Closes or cancels, then returns focus to where it came from.

Accessibility

It exposes status, alert and region semantics, with aria-labelledby, aria-hidden, aria-label and aria-live kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/csv-import.md

The index of every part is at /llms.txt.

More in Audit, logs & inbox