Skip to content
CSV import, light
Light
CSV import, dark
Dark

Every state

  • CSV import, default, light
    CSV import, default, dark

    default

  • CSV import, focus, light
    CSV import, focus, dark

    focus

  • CSV import, preview, light
    CSV import, preview, dark

    preview

  • CSV import, mapping-error, light
    CSV import, mapping-error, dark

    mapping-error

  • CSV import, importing, light
    CSV import, importing, dark

    importing

  • CSV import, done, light
    CSV import, done, dark

    done

  • CSV import, disabled, light
    CSV import, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"csv"Id prefix for the error.
namestring"csv"Form field name of the file input.
fieldsFileUploadCsvField[]–The fields a column can map to: key, label, required. Defaults to name, email and phone.
nounstring"contact"What one row is, for the counts and the button.
acceptstring".csv,text/csv"Allowed file types.
maxSizenumber5242880The largest file in bytes.
previewRowsnumber4How many rows the preview table shows.
defaultFile{ name: string; text: string }–A CSV to start with, shown as if just picked.
defaultStatus"idle" | "importing" | "done"–Start in importing or done (needs defaultFile).
onImport(rows, mapping) => void | Promise<void>–Receives the rows as objects keyed by field, and the column-to-field mapping. Throw to show an error.
errorstring–A message above the Import button.
disabledboolean–Disables the picker, the selects and the button.
classNamestring–Extra classes on the wrapper.

More file uploads

All 12
file-upload-04 is in UI ProGet UI Pro, €199

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans