CSVJetty

Docs

Home
Dashboard

Reference

Component props

Receive data

Reference

CSVJetty component props

Reference for CSVJetty React component props including importerKey, columns, onData, onComplete, onClose, baseUrl, accentColor, and children.

View as Markdown

On this page

CSVJetty componentPropsColumn overridesLifecycle callbacksbaseUrl

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

PropTypePurpose
importerKeystringRequired public importer key.
columnsarrayOptional column definitions that replace dashboard columns for this import session.
onDatafunctionReceives import batches in callback delivery mode.
onCompletefunctionReceives { importId, accepted, rejected } when the import completes.
onClosefunctionRuns when the importer closes.
baseUrlstringCSVJetty origin. Defaults to https://www.csvjetty.com.
accentColorstringLaunch-button accent color.
childrenReact nodeLaunch-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

Passing a columns prop uses those field definitions for the current import session instead of the importer's saved dashboard 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"/>