This project is currently in alpha. Daily breaking changes are to be expected. You have been warned.

A checkbox component, usually used in forms.

Property Type Description
id ?string A unique identifier.
label ?string The label of the checkbox.
description ?string The description of the checkbox.
description-class ?string The class to apply to the description.
right bool If the checkbox should be placed on the right. [default=false]
error-field ?string The field to show validation errors for – wire:model value by default
error-class ?string The class to apply to the validation errors.
omit-error bool If the validation errors should be hidden. [default=false]
first-error-only bool If only the first validation error should be shown. [default=false]
<c-checkbox label="Left" wire:model="value" />
<c-checkbox label="Left" wire:model="value" description="But also has a description." />
<c-checkbox label="Right" wire:model="value" right />
<c-checkbox label="Right" wire:model="value" description="But also has a description." right />
<c-checkbox wire:model="value">
    <c-slot:label>
        This is the slot, it allows for <span class="text-primary">custom HTML</span>.
    </c-slot:label>
    <c-slot:description>
        This is the description slot, it also allows for <span class="text-accent">custom HTML</span>.
    </c-slot:description>
</c-checkbox>