Components/FormField

FormField

Groups a label, input, error message, and hint text with consistent spacing.

Installation

Examples

Full field with error

Label, input, hint, and error message together.

Please enter a valid email.

We will never share your email.

Multiple fields

Multiple FormFields in a form layout.

API Reference

PropTypeDefaultDescription
labelstring—Field label text.
errorstring—Error message displayed below the input.
requiredbooleanfalseAdds a required indicator to the label.
hintstring—Helper text below the input.
children*ReactNoderequiredThe form control to wrap.