Layout + accessibility wrapper for a form control. Provides a shared id so the label, help text, and error message wire up htmlFor and aria-describedby automatically, and the built-in controls pick up id, aria-describedby, aria-invalid, and required from it with no extra props. Pass label/description/error for the common layout, or compose <FieldLabel>, <FieldHelp>, and <FieldError> yourself.

<Field label="Email" description="We never share it." error={errors.email}>
<Input type="email" />
</Field>

Properties

$$typeof: symbol
displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.

propTypes?: any

Ignored by React.

Only kept in types for backwards compatibility. Will be removed in a future major release.