Field

A labelled wrapper for a single form control. Renders the label (with an optional required marker), the control (its children — usually a TextField or Select), and a hint or error line below.

Label & hint

/
Lowercase letters, numbers and hyphens.

Error

When error is set it replaces the hint and renders in the danger tone. Pair it with the control's own invalid flag for the red border.

At least 3 characters.

Props

PropTypeDescription
labelReactNodeField label (rendered above the control).
hintReactNodeHelper text shown below when there is no error.
errorReactNodeError message; replaces the hint, shown in danger tone.
requiredbooleanAppends a danger * to the label.
htmlForstringAssociates the label with a control id.
classNamestringExtra classes on the wrapper.
childrenReactNodeThe control to wrap.