FormField
atomLabel wrapper that standardises required flags, helper text, and inline error messages across any form control. Wrap any input with it.
Basic
Label and optional helper text.
Required + helper
Required field with contextual helper text.
Error state
Error message replaces helper text.
Usage
Installation
API Reference
FormField props — * required
| Prop | Type | Default | Description |
|---|---|---|---|
label* | string | — | Label text. |
htmlFor | string | — | Links the label to a form control via id. |
required | boolean | false | Appends a red asterisk to the label. |
helperText | string | — | Hint shown below the control. |
errorMessage | string | — | Error shown below the control; overrides helperText. |
children* | React.ReactNode | — | The form control to label. |