Switch

A control that allows the user to toggle between checked and not checked.

Component Code
<div class="flex items-center space-x-2">
<april:switch id="airplane-mode" />
<april:label for="airplane-mode">Airplane Mode</april:label>
</div>

Use x-model for the checked value. The component dispatches checked-change with { detail: { value } }; the legacy checkedChange event remains available.

Publishing Views

Use the following command to publish this view:

php artisan april:publish switch
April UI keeps package views in `vendor/` by default. The command uses Laravel's vendor publishing system and copies overrides to `resources/views/vendor/april/components`. To publish all components, run:
php artisan april:publish --all
Review local overrides after an upgrade with `php artisan april:update --diff`.