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
labelstringField label text.
errorstringError message displayed below the input.
requiredbooleanfalseAdds a required indicator to the label.
hintstringHelper text below the input.
children*ReactNoderequiredThe form control to wrap.