The InputFile component provides a file upload interface with drag-and-drop support.
Prop | Type | Description |
---|---|---|
className | string | Additional CSS classes. |
name | string | Identifier for the file in form submission. |
label | string | Label text for the file input. |
accept | string[] | Array of allowed file extensions (jpg, png, mp4, pdf, etc). |
maxElem | number | Maximum number of files allowed. |
register | function | Function to register the input with the useForm hook. |
postFile | function | Function to handle file upload. Receives the FormData object and a progress callback. |
putFile | function | Function to handle file updates. Receives the file ID and new data. |
deleteFile | function | Function to handle file deletion. Receives the file ID. |
multiple | boolean | Allows multiple file selection. |
required | boolean | Specifies if the field is required. |
disabled | boolean | Disables interaction with the input field. |