Accessible label component for form inputs.
Renders a <label> element with optional required indicator and full Tailwind
styling. Associates with inputs via the for attribute.
Example
<.label for="email">Email address</.label>
<.label for="password" required={true}>Password</.label>
Summary
Functions
Renders an accessible <label> element.
Functions
Renders an accessible <label> element.
Examples
<.label for="email">Email</.label>
<.label for="password" required={true}>Password</.label>Attributes
for(:string) - The input element ID to associate this label with. Defaults tonil.required(:boolean) - When true, renders a red asterisk to indicate the field is required. Defaults tofalse.class(:string) - Additional CSS classes. Defaults tonil.- Global attributes are accepted. HTML attributes forwarded to the label element.
Slots
inner_block(required) - Label text or content.