Skip to content

LabelledImageFileInput

Component | Source Code

extends ImageFileInputProps, LabelledProps

Props Inheritance Hierarchy: Omit<ComponentPropsWithRef<“input”>, “children”> -> InputProps -> FileInputProps -> ImageFileInputProps & LabelledProps

Whether the input should create converted versions of all valid files passed to it. Conversion is an async process and the input will be disabled while it’s working.

Conversion is useful if your system prefers a particular image file type. For example, webp can be preferable because of how small it is for the same perceptible visual quality of something like png.

Note that file type acceptance in HTML is more of a suggestion than something the browser enforces. If the user provides a non-image file, the conversion will just output the file they provided unchanged.

When the conversion is complete, onChangeFiles will be invoked with the results of the conversion.





What position the label text appears relative to the input.




Callback for when the user uploads files.

Note that because of how HTML file inputs work, this callback is not additive. That is, if the user uploads 1 file, then uploads 2 files, the second invocation of this callback will just contain the 2 new files.