useField

useField is the primary hook for field components. Under the hood, it calls RHF's useController and merges the result with resolved field metadata — translated labels, visibility, disabled state, and validation rules — into a single flat object.

const { value, onChange, label, errorMessage, visible, ... } = useField()

The full list of returned props:

PropDescriptionNotes
valueCurrent field valueFrom RHF field.value
onChangeUpdate field valueFrom RHF field.onChange — accepts a plain value or a DOM event
onBlurMark field as touchedFrom RHF field.onBlur
refAttach to native inputFrom RHF field.ref — enables form.setFocus()
errorMessageReady-to-render error stringDerived from fieldState.error?.message — already translated, prefer over error
errorRaw RHF error objectFrom RHF fieldState.error — use only when branching on error.type
invalidtrue when field has a validation errorFrom RHF fieldState.invalid — shorthand for !!error
isDirtytrue after value changes from its defaultFrom RHF fieldState.isDirty
isTouchedtrue after onBlur is calledFrom RHF fieldState.isTouched
isValidatingtrue during async validationFrom RHF fieldState.isValidating
idField identifierResolved from field path — use as id on input, htmlFor on label
nameField key within its immediate scopee.g. "email", not "profile.email"
pathFull dot-notation pathe.g. "profile.email" — use with RHF APIs directly
namespaceParent section pathundefined for top-level fields
labelTranslated labelResolved from field config through i18n pipeline
descriptionTranslated helper textResolved from field config through i18n pipeline
requiredWhether field is requiredDerived from rules.required — do not infer this yourself
disabledWhether field is disabledResolved from field config and form state — excluded from submit payload
readOnlyWhether field is read-onlyResolved from field-level and form-level readOnly — still included in submit payload
visibleWhether field should renderResolved from visible in field config — when false, the field unmounts; see conditional rendering
controllerRaw return value of RHF's useControllerAdvanced integrations only
configOriginal field config objectMeta-driven or dynamic fields only