atom
gy-form-field
Labelled wrapper around a slotted form control that owns the label, description, error, and required indicator presentation.
Live
What you ship.
Markup
<gy-form-field label="Email" required>
<input type="email" name="email" placeholder="you@example.com" />
</gy-form-field>Prop space
Tier
Tag
| Prop | Type | Default | Description |
|---|---|---|---|
label * | string | no default | The visible label. Required — a control without one is a layout cell. |
description | string | '' | Optional helper text rendered between the label and the control. |
error | string | '' | Optional error message rendered below the control; collapses when empty. |
required | boolean | false | True to mark the field as required (surfaces a decorative `*` indicator). |
inline | boolean | false | True to render the label beside the control instead of above. |
Slots: children.
Where this lives
import '@gyrum-labs/components/form-field/form-field.js';