Field

A form field that wires label, control, description and error message together; validation stays external.

Props

PropTypeDefaultDescription
invalidbooleanfalseInvalid state: red border plus aria-invalid on the control
requiredboolean—Required state: aria-required for controls without a native required
disabledboolean—Disabled state: applies to controls that do not set their own
Field.Labellabel 元素—The label; htmlFor points at the control automatically
Field.Descriptionp 元素—Hint text; registered into aria-describedby
Field.Messagep 元素—Error text; render it conditionally with invalid, registered into aria-describedby