

Every state


default


focus


pasted


uploading


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "paste" | Id prefix for the hint and error. |
| name | string | "files" | Form field name of the file input. |
| label | string | "Screenshots and files" | The visible label above the area. |
| accept | string | "image/*,.pdf" | Allowed types, as in the accept attribute; checked for pasted, picked and dropped files. |
| hint | string | "Images or PDF, up to 10 MB each" | A short note on the allowed files. |
| maxSize | number | 10485760 | The largest file in bytes. |
| maxFiles | number | 6 | How many files fit. |
| defaultFiles | FileUploadPasteFile[] | [] | Files already in the list: name, size, type, status, progress, error, preview. |
| pasteText | boolean | false | Also turn pasted text into a .txt file. |
| dragging | boolean | – | Draws the area as if a file is being dragged over it. |
| upload | (file, { onProgress, signal }) => Promise<void> | – | Sends one file. The default is a local simulation that fails for names containing "fail". |
| error | string | – | A message under the list; marks the area invalid. |
| disabled | boolean | – | Disables the area and the list buttons. |
| onFilesChange | (files: FileUploadPasteFile[]) => void | – | Called when files are added, finished, failed or removed. |
| className | string | – | Extra classes on the wrapper. |
More file uploads
All 12file-upload-07 is in UI ProGet UI Pro, €199


