LabelledImageFileInput
Component | Source Code
extends ImageFileInputProps, LabelledProps
Props Inheritance Hierarchy: Omit<ComponentPropsWithRef<“input”>, “children”> -> InputProps -> FileInputProps -> ImageFileInputProps & LabelledProps
Properties
Section titled “Properties”convertImagesTo?: ImageConversionType
Section titled “convertImagesTo?: ImageConversionType”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.
error?: string
Section titled “error?: string”info?: string
Section titled “info?: string”label?: string
Section titled “label?: string”labelPosition?: LabelPosition
Section titled “labelPosition?: LabelPosition”What position the label text appears relative to the input.
labelProps?: LabelProps
Section titled “labelProps?: LabelProps”labelTextProps?: InlineTextProps
Section titled “labelTextProps?: InlineTextProps”onChangeFiles?: Function
Section titled “onChangeFiles?: Function”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.