

Every state


default


focus


dragging


files-added


rejected


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "attachments" | Id of the file input; related ids are built from it. |
| name | string | "attachments" | Form field name of the file input. |
| label | string | "Attachments" | The visible label above the drop area. |
| browseLabel | string | "browse" | The underlined word in "Drop files here or browse". |
| accept | string | "image/png,image/jpeg,application/pdf" | Accepted types, as the file picker takes them (MIME types, wildcards or extensions). |
| acceptLabel | string | "PNG, JPG or PDF" | The accepted types in words, for the hint and rejection messages. |
| maxSize | number | 10485760 | Largest file in bytes. |
| multiple | boolean | true | Allow several files. |
| dragging | boolean | – | Forces the dragging look, for previews. |
| disabled | boolean | – | Disables the drop area and the remove buttons. |
| defaultFiles | FileUploadDropzoneFile[] | – | Files already chosen: id, name, size, status, progress, error. |
| defaultRejections | string[] | – | Rejection messages shown at the start. |
| upload | FileUploadDropzoneUpload | – | Your upload call (file, { onProgress, signal }). The default is a local simulation. |
| onFilesChange | (files: FileUploadDropzoneFile[]) => void | – | Called when files are added or removed. |
| className | string | – | Extra classes on the wrapper. |


