Component
Field
Group a label, form control, supporting copy, and validation message without hiding their native semantics.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { Field } from "@chitrank2050/monoline-ui/field"Basic usage
<Field invalid>
<Label htmlFor="email">Email</Label>
<Input id="email" aria-invalid="true" aria-describedby="email-error" />
<Field.Error id="email-error">Enter a valid email address.</Field.Error>
</Field>Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
Field keeps a label, control, supporting description, and validation message together as one form unit.
The content is not a form control or the layout would hide a required label and error relationship.
Field preserves native child semantics. Connect Label with htmlFor, then wire Field.Description and Field.Error IDs through aria-describedby and expose invalid state on the control.
This component can render without adding a Monoline client boundary when its children and props are serializable.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
<Field invalid>
<Label htmlFor="email">Email</Label>
<Input id="email" aria-invalid="true" aria-describedby="email-error" />
<Field.Error id="email-error">Enter a valid email address.</Field.Error>
</Field>Related documentation
Compare related components or review the package and theme setup.