File Upload
Drop zone for attaching files. Always state the accepted formats and size limit up front, and show progress and errors in place.
Try it
Drop a file or browse — progress is simulated here.
Drag files here or PNG, JPG or PDF · up to 10 MB
Upload failedThat file type isn’t supported. Use PNG, JPG or PDF.
<FileUpload accept="image/*,.pdf" onFiles={upload} progress={pct} error={err} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
onFiles | (files: File[]) => void | — | Called on drop or browse. |
accept | string | — | Accepted types. |
hint | string | — | Formats and size limit. |
progress | number | null | null | Shows a progress bar. |
error | string | null | null | Error state and message. |