FileUpload
Drop zone and picker; onChange receives an array of Files. Props: accept, multiple, disabled, label.
Props
labelstringDefault:'Choose files or drop them here'Drop-zone text.
acceptstringAccepted file types (native
accept); dropped files that do not match are ignored too.multiplebooleanDefault:falseAllow several files.
onChange(files: File[]) => voidCalled with the selected files.
onReject(files: File[]) => voidCalled with dropped files that do not match
accept.clearOnSelectbooleanDefault:falseForget the selection after
onChange: no names are listed and the same file can be chosen again.disabledbooleanDefault:falseDisable the control.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | 'Choose files or drop them here' | Drop-zone text. |
accept | string | – | Accepted file types (native accept); dropped files that do not match are ignored too. |
multiple | boolean | false | Allow several files. |
onChange | (files: File[]) => void | – | Called with the selected files. |
onReject | (files: File[]) => void | – | Called with dropped files that do not match accept. |
clearOnSelect | boolean | false | Forget the selection after onChange: no names are listed and the same file can be chosen again. |
disabled | boolean | false | Disable the control. |