Label

x-label

An accessible form label that pairs with inputs, checkboxes, and other controls.

php artisan components:add label

Examples

Basic

A label bound to a field's id.

<div class="flex w-full justify-center">
    <x-components.label for="demo-field">Display name</x-components.label>
</div>

Props

Prop Type Default Description
for text The id of the form control this label is bound to.

Slots

Slot Description
slot The label text.