Skip to content
ID document upload, light
Light
ID document upload, dark
Dark

Every state

  • ID document upload, default, light
    ID document upload, default, dark

    default

  • ID document upload, focus, light
    ID document upload, focus, dark

    focus

  • ID document upload, front-done, light
    ID document upload, front-done, dark

    front-done

  • ID document upload, both-done, light
    ID document upload, both-done, dark

    both-done

  • ID document upload, error, light
    ID document upload, error, dark

    error

  • ID document upload, disabled, light
    ID document upload, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"id-document"Base id; the file input ids are built from it.
namestring"id-document"Form field name; with two sides it becomes name-front and name-back.
labelstring"Photo ID"The visible heading.
sides1 | 22One slot (a passport page) or two (front and back of a card).
fit"cover" | "contain""cover"How the preview fills its frame.
acceptstring"image/jpeg,image/png,application/pdf"Accepted types, as the file picker takes them.
acceptLabelstring"JPG, PNG or PDF"The accepted types in words, for the hint, the checklist and rejection messages.
maxSizenumber10485760Largest file in bytes.
disabledboolean–Disables both slots.
defaultFilesPartial<Record<"front" | "back", FileUploadIdDocumentFile>>–Files in the slots at the start: name, size, src (preview image).
defaultErrorsPartial<Record<"front" | "back", string>>–Errors under the slots at the start.
onFilesChange(files) => void–Called when a slot is filled or replaced.
classNamestring–Extra classes on the wrapper.

More file uploads

All 12
file-upload-10 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