Label
Data inputA label for a form control: clicking it focuses or toggles the control.
import { Label } from '@limerdev/zest'; Use for
Naming a single control outside a
Field, with for set to the control's id. Don't
A form field with a description or an error: use
Field, which wires the label, description and error to the control. Placeholder text instead of a label.Examples
For a control
A Label names the control its for points at. Inside a Field, use Field.Label.
<script lang="ts">
import { Input, Label } from '@limerdev/zest';
</script>
<div class="grid w-full max-w-sm gap-2">
<Label for="label-email">Email</Label>
<Input id="label-email" type="email" />
</div> Props
Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that
renders your own element, with props to spread on it).
Label
No props of its own beyond the common ones.