FIELD
Source: design-system/components/Field/Field.tsx. Client component ('use client') so consumers can drive controlled input state.
Props
| Prop | Type | Default | Required |
|---|---|---|---|
Propname | Typestring | Defaultnone | Requiredyes |
Proplabel | Typestring | Defaultnone | Requiredyes |
Properror | Typestring | Defaultnone | Requiredno |
Propmultiline | Typeboolean | Defaultfalse | Requiredno |
Proprows | Typenumber | Default4 | Requiredno, with multiline |
Propid | Typestring | Defaultgenerated with useId | Requiredno |
Other input or textarea attributes pass through.
States
Required field
SOURCE
<Field name="email" label="$ email:" type="email" />
<Field name="msg" label="$ message:" multiline rows={3} />
<Field name="broken" label="$ broken:" error="Required field" />Accessibility
The label is always rendered and bound to the control by htmlFor. With error, the control gets aria-invalid="true" and aria-describedby points at the error text, merged with any consumer value. Controls have a 44px minimum height.