Skip to content
Dropzone, light
Light
Dropzone, dark
Dark

Every state

  • Dropzone, default, light
    Dropzone, default, dark

    default

  • Dropzone, focus, light
    Dropzone, focus, dark

    focus

  • Dropzone, dragging, light
    Dropzone, dragging, dark

    dragging

  • Dropzone, files-added, light
    Dropzone, files-added, dark

    files-added

  • Dropzone, rejected, light
    Dropzone, rejected, dark

    rejected

  • Dropzone, disabled, light
    Dropzone, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"attachments"Id of the file input; related ids are built from it.
namestring"attachments"Form field name of the file input.
labelstring"Attachments"The visible label above the drop area.
browseLabelstring"browse"The underlined word in "Drop files here or browse".
acceptstring"image/png,image/jpeg,application/pdf"Accepted types, as the file picker takes them (MIME types, wildcards or extensions).
acceptLabelstring"PNG, JPG or PDF"The accepted types in words, for the hint and rejection messages.
maxSizenumber10485760Largest file in bytes.
multiplebooleantrueAllow several files.
draggingboolean–Forces the dragging look, for previews.
disabledboolean–Disables the drop area and the remove buttons.
defaultFilesFileUploadDropzoneFile[]–Files already chosen: id, name, size, status, progress, error.
defaultRejectionsstring[]–Rejection messages shown at the start.
uploadFileUploadDropzoneUpload–Your upload call (file, { onProgress, signal }). The default is a local simulation.
onFilesChange(files: FileUploadDropzoneFile[]) => void–Called when files are added or removed.
classNamestring–Extra classes on the wrapper.

More file uploads

All 12

Preview

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

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