What useField hands to a custom control inside a Field.

interface FieldControl {
    describedBy: undefined | string;
    id: string;
    invalid: boolean;
    required: boolean;
}

Properties

describedBy: undefined | string

Space-separated ids for aria-describedby, or undefined when there's nothing to reference.

id: string

The id the field's label points at; put it on the control.

invalid: boolean

Whether the field is currently in an error state.

required: boolean

Whether the field is required.