field
Labelling and validation for form controls.
Import
Import just the field styles.
@import "@winnie-ui/css/spatial/field";@import "@winnie-ui/css/visual/field";Anatomy
Attach the appropriate data attributes in the structure below.
<div data-component="field"> <label data-slot="label" /> <span data-slot="description" /> <input data-slot="control" /> <span data-slot="validation" /></div>Examples
Description
Add a description with the description slot attribute as a child of the field.
Trailing
Place the description slot after the control slot to place it below the control.
Validation
Add a validation message with the validation slot attribute as a child of the field.
Reference
field
Groups all of the parts of the field together.