Reference
CSVJetty component props
Reference for CSVJetty React component props including importerKey, columns, onData, onComplete, onClose, baseUrl, accentColor, and children.
CSVJetty exports a default React component. The importer key loads the saved importer configuration; optional props control runtime behavior and callbacks.
CSVJetty component
JSX
import CSVJetty from "csvjetty";
<CSVJetty importerKey="YOUR_IMPORTER_KEY"> Import CSV</CSVJetty>Props
| Prop | Type | Purpose |
|---|---|---|
importerKey | string | Required public importer key. |
columns | array | Optional column definitions that replace dashboard columns for this import session. |
onData | function | Receives import batches in callback delivery mode. |
onComplete | function | Receives { importId, accepted, rejected } when the import completes. |
onClose | function | Runs when the importer closes. |
baseUrl | string | CSVJetty origin. Defaults to https://www.csvjetty.com. |
accentColor | string | Launch-button accent color. |
children | React node | Launch-button content. Defaults to Import CSV. |
Callback delivery requires onData. Webhook delivery does not, because CSVJetty sends records to the endpoint configured on the importer.
Column overrides
Pass columns when the destination fields need to be supplied at runtime. The array uses the same field model documented in Configure columns.
JSX
<CSVJetty importerKey="YOUR_IMPORTER_KEY" columns={[ { name: "email", label: "Email address", type: "email", required: true, aliases: ["customer_email"], }, ]} onData={async ({ rows }) => { console.log(rows); }}> Import contacts</CSVJetty>Runtime columns replace saved columns
Lifecycle callbacks
onData receives import batches and may return row-level errors. onComplete runs after the import finishes with accepted and rejected counts. onClose runs when the importer closes.
See Callback delivery and the Import payload reference for exact payload behavior.
baseUrl
CSVJetty uses https://www.csvjetty.com by default. Set baseUrl when you intentionally connect the package to another CSVJetty origin, such as local development.
JSX
<CSVJetty importerKey="YOUR_IMPORTER_KEY" baseUrl="http://localhost:3001"/>