

Every state


default


focus


filled


uploading


max-reached


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "photos" | Id of the file input; related ids are built from it. |
| name | string | "photos" | Form field name of the file input. |
| label | string | "Photos" | The visible heading above the grid. |
| max | number | 6 | How many images the grid takes; the add tile goes away at the limit. |
| accept | string | "image/jpeg,image/png,image/webp" | Accepted types, as the file picker takes them. |
| acceptLabel | string | "JPG, PNG or WebP" | The accepted types in words, for the hint and rejection messages. |
| maxSize | number | 5242880 | Largest image in bytes. |
| disabled | boolean | – | Disables the add tile, remove, move and drag. |
| defaultImages | FileUploadImageGridImage[] | – | Images already in the grid, in order: id, name, src, status, progress, error. |
| defaultRejections | string[] | – | Rejection messages shown at the start. |
| upload | FileUploadImageGridUpload | – | Your upload call (file, { onProgress, signal }). The default is a local simulation. |
| onImagesChange | (images: FileUploadImageGridImage[]) => void | – | Called when images are added, removed or reordered. |
| className | string | – | Extra classes on the wrapper. |
More file uploads
All 12file-upload-06 is in UI ProGet UI Pro, €199


