<x-checkbox wire:model="terms" label="I agree to the terms and conditions" />
public array $notifications = ['push', 'email', 'app', 'sms'];
<x-checkbox.group label="Notifications"> <x-checkbox label="Push notifications" value="push" wire:model="notifications" /> <x-checkbox label="Email" value="email" wire:model="notifications" /> <x-checkbox label="In-app alerts" value="app" wire:model="notifications" /> <x-checkbox label="SMS" value="sms" wire:model="notifications" /></x-checkbox.group>
Receive our monthly newsletter with the latest updates and offers.
Stay informed about new features and product updates.
Get invitations to our exclusive events and webinars.
<x-checkbox.group label="Subscription preferences"> <x-checkbox checked value="newsletter" label="Newsletter" description="Receive our monthly newsletter with the latest updates and offers." /> <x-checkbox value="updates" label="Product updates" description="Stay informed about new features and product updates." /> <x-checkbox value="invitations" label="Event invitations" description="Get invitations to our exclusive events and webinars." /></x-checkbox.group>
Read and agree to the terms and conditions.
Read and agree to the terms and conditions.
<x-checkbox id="Terms 1" label="Terms and conditions" required description="Read and agree to the terms and conditions." /><x-checkbox id="Terms 2" label="Terms and conditions" badge="Not Optional" badge-color="red" description="Read and agree to the terms and conditions." />
label
and
wire:model
, ensure they
have unique IDs by providing the
id
prop explicitly.
<x-checkbox checked />
<x-checkbox disabled />
Choose the languages you want to support.
<x-fieldset> <x-legend>Languages</x-legend> <x-description>Choose the languages you want to support.</x-description> <div class="flex gap-4 *:gap-x-2"> <x-checkbox checked value="english" label="English" /> <x-checkbox checked value="spanish" label="Spanish" /> <x-checkbox value="french" label="French" /> <x-checkbox value="german" label="German" /> </div></x-fieldset>