interface FileFieldProps

Passed to FileField by a dump form. The field it names holds the File itself, or null.

Type Parameters

T extends FieldValues

Properties

name: Path<T>
optional
label: string
optional
hint: string
optional
maxBytes: number

Refuses a larger file, as a field error, as soon as it is picked.

optional
showLimit: boolean

States maxBytes in the drop zone.

optional
disabled: boolean
optional
rules: RegisterOptions<T, Path<T>>
optional
onValueChange: (file: File | null) => void

Called after the form's value is set, for a side effect such as deriving the title from the file's name.

Usage

import { type FileFieldProps } from "src/components/form/FileField.tsx";