FileUpload
moleculeDrag-and-drop file upload zone with file list, progress tracking, error display, and size validation.
Image upload
Accepts images up to 5 MB, multiple files.
Disabled
Upload zone in disabled state.
Usage
Installation
API Reference
FileUpload props — * required
| Prop | Type | Default | Description |
|---|---|---|---|
value* | UploadFile[] | — | Controlled list of UploadFile objects. |
onChange* | (files: UploadFile[]) => void | — | Called when the file list changes. |
accept | string | — | Accepted MIME types, e.g. "image/*" or ".pdf". |
multiple | boolean | false | Allow multiple file selection. |
maxSize | number | — | Maximum file size in bytes. |
onError | (error: string) => void | — | Called when a file exceeds maxSize. |
disabled | boolean | false | Disables the upload zone. |
style | React.CSSProperties | — | Inline styles for the wrapper. |