Csv import
ProBrings 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.
pnpm dlx shadcn@latest add @caliper/csv-importImport contacts
Paste data instead
No file to hand?
When to use #
Use it for
- Importing contacts, products, transactions or users.
- Moving customers off a spreadsheet or another tool.
Skip it when
- A live sync with another system; build an integration.
Installation #
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.
Usage #
Import it from your copy of the source. The example behind the preview comes with the source. It is built from CsvImport, parseCsv and toCsv.
import { CsvImport, parseCsv, toCsv } from "@/components/ui/csv-import"
The worked example comes with Pro
The 44-line example behind the preview opens here with a Pro or Team licence.
API reference #
CsvImport
component
parseCsv
component
No props of its own; it accepts the native props of its root element.
toCsv
component
No props of its own; it accepts the native props of its root element.
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.
Motion #
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.