FileInput()function

FileInput({
	name,
	title,
	placeholder = title,
	required = false,
	disabled = false,
	message,
	// value,
	onValue,
	types = {},
	...variants
}: FileInputProps): ReactElement
ParamType
variantsFileInputProps
Props for FileInput, an <input type="file"> that emits the selected File. required
    .typesFileTypes
List of file types in extension: mime format.
Return
ReactElement
A native <input type="file"> element.

File picker input that emits the selected File through onValue.

  • The optional types dictionary restricts the picker's accepted file types.

Examples

<FileInput name="avatar" types={{ png: "image/png" }} onValue={setFile} />