

Every state


default


focus


front-done


both-done


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "id-document" | Base id; the file input ids are built from it. |
| name | string | "id-document" | Form field name; with two sides it becomes name-front and name-back. |
| label | string | "Photo ID" | The visible heading. |
| sides | 1 | 2 | 2 | One slot (a passport page) or two (front and back of a card). |
| fit | "cover" | "contain" | "cover" | How the preview fills its frame. |
| accept | string | "image/jpeg,image/png,application/pdf" | Accepted types, as the file picker takes them. |
| acceptLabel | string | "JPG, PNG or PDF" | The accepted types in words, for the hint, the checklist and rejection messages. |
| maxSize | number | 10485760 | Largest file in bytes. |
| disabled | boolean | – | Disables both slots. |
| defaultFiles | Partial<Record<"front" | "back", FileUploadIdDocumentFile>> | – | Files in the slots at the start: name, size, src (preview image). |
| defaultErrors | Partial<Record<"front" | "back", string>> | – | Errors under the slots at the start. |
| onFilesChange | (files) => void | – | Called when a slot is filled or replaced. |
| className | string | – | Extra classes on the wrapper. |
More file uploads
All 12file-upload-10 is in UI ProGet UI Pro, €199


