React component reference

Package: @bootstrapware/importer
Styles: @bootstrapware/importer/styles.css

Props

PropTypeRequiredNotes
onComplete(rows, meta) => voidyesValid rows only, plus ImportMeta
fieldsImporterField[]for local modeSchema in code
importerIdstringhostedWith publishableKey
publishableKeystringhostedBrowser-safe
apiBaseUrlstringnoDefaults to https://importer.bootstrapware.co
duplicateKeystringnoField key for in-file duplicates
dateOrder"MDY" | "DMY"noSlash/dash numeric dates. Default MDY. ISO stays YYYY-MM-DD.
numberLocale"us" | "eu" | "auto"noDefault auto. Semicolon CSVs prefer EU (bare 1.234 → 1234).
dir"ltr" | "rtl"noWidget text direction. Default ltr.
titlestringnoDefault "Import spreadsheet"
onCancel() => voidnoCancel 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