React component reference
Package: @bootstrapware/importer
Styles: @bootstrapware/importer/styles.css
Props
| Prop | Type | Required | Notes |
|---|---|---|---|
| onComplete | (rows, meta) => void | yes | Valid rows only, plus ImportMeta |
| fields | ImporterField[] | for local mode | Schema in code |
| importerId | string | hosted | With publishableKey |
| publishableKey | string | hosted | Browser-safe |
| apiBaseUrl | string | no | Defaults to https://importer.bootstrapware.co |
| duplicateKey | string | no | Field key for in-file duplicates |
| dateOrder | "MDY" | "DMY" | no | Slash/dash numeric dates. Default MDY. ISO stays YYYY-MM-DD. |
| numberLocale | "us" | "eu" | "auto" | no | Default auto. Semicolon CSVs prefer EU (bare 1.234 → 1234). |
| dir | "ltr" | "rtl" | no | Widget text direction. Default ltr. |
| title | string | no | Default "Import spreadsheet" |
| onCancel | () => void | no | Cancel on preview |
Hosted mode is used when both importerId and publishableKey are set. Local fields can be omitted until hosted config loads.
Flow
Upload → map columns (and pick a sheet when the workbook has more than one) → preview (first 100 rows shown) → import valid rows or download errors. Preview stays blocked until every required field is mapped. Assigning a header to one field clears it from other fields.
On the upload step, once local fields or hosted published config is known, Download template.csv generates a file in the browser. Headers use field labels, falling back to keys when a label is empty. One example row is derived from field type. The template is not fetched from Bootstrapware.
Related: Fields · Column mapping · Validation · onComplete · Quickstart