value | File[] | — | Files; leave unset for an uncontrolled field. |
defaultValue | File[] | — | Initial files while uncontrolled. |
onChange | (files: File[]) => void | — | Called with the new files, after each choice, drop or removal. |
accept | string | — | Types the field takes: MIME types, type/* wildcards and .ext extensions, comma-separated. |
multiple | boolean | false | Files add up; without it each choice replaces the last. |
maxSize | number | — | Bytes per file. |
maxFiles | number | — | Most files the field holds. |
dropzone | boolean | true | Shows the dropzone; false shows a browse button instead. |
renderItem | (file: File, remove: () => void) => React.ReactNode | — | Draws a file's row in place of the default one: gets the file, and a function that removes it. |
onReject | (rejections: PixelFileRejection[]) => void | — | Called with the files turned down by a choice or a drop, with their reasons. |
surface | 'pixel' | 'linear' | — | Surface override; defaults to the nearest provider. |
size | 'sm' | 'md' | 'lg' | 'md' | Padding and type size of the dropzone. |
label | string | — | Label above the field, pointing at the file input. |
hint | string | — | Helper text below the field; hidden while error is set. |
error | string | — | Error message below the field; turns the dropzone red. |
disabled | boolean | — | Disables choosing, dropping and removing files. |
name | string | — | Deprecated form-serialization hint. Files are not serializable through a hidden mirror once e.target.value is reset, so this prop no longer wires to a native input. Read selected files from onChange and POST them manually (e.g. FormData.append(name, file) per file). Kept in the prop bag so consumers using it don't break — the id of the file input still uses it via the id prop fallback path. |
id | string | — | id of the file input; generated when left out. |
className | string | — | Extra classes on the root element. |