InputMedia

The InputMedia component provides a media upload interface with drag-and-drop support.

# Basic Usage


InputMedia 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, 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.
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.