InputFile

The InputFile component provides a file upload interface with drag-and-drop support.

# Basic Usage


InputFile Component

PropTypeDescription
classNamestringAdditional CSS classes.
namestringIdentifier for the file in form submission.
labelstringLabel text for the file input.
acceptstring[]Array of allowed file extensions (jpg, png, mp4, pdf, etc).
maxElemnumberMaximum number of files allowed.
registerfunctionFunction to register the input with the useForm hook.
postFilefunctionFunction to handle file upload. Receives the FormData object and a progress callback.
putFilefunctionFunction to handle file updates. Receives the file ID and new data.
deleteFilefunctionFunction to handle file deletion. Receives the file ID.
multiplebooleanAllows multiple file selection.
requiredbooleanSpecifies if the field is required.
disabledbooleanDisables interaction with the input field.