Skip to content

FieldComponentProps

What every field component receives. A consumer overriding one via fieldComponents implements this same contract, so an override is a drop-in rather than a fork of the surrounding form.

TField

disabled: boolean


error: string | null

A validation message for this field, or null. Render it and reference it via aria-describedby.


field: TField


id: string

Stable, unique per field — wire this to both the control’s id and its label’s htmlFor.


name: string

The field’s raw SubmissionKey — wire this to the control’s name (spec 77-public-form-progressive-enhancement). Deliberately not id: id is scoped to one rendered form instance (${baseId}-${key}), but a native form submission needs name to be the exact key the server expects, with no per-form id-to-key translation required to read it back.


onChange: (value) => void

string | number | string[] | null

void


value: string | number | string[] | null