Toggle

Checkbox switch component.

Examples

Basic Toggle

Enable Notifications
blade
<x-plume::form 
    formData="{ 'notifications': true }">
    <x-plume::form.toggle name="notifications" model="notifications">Enable
        Notifications</x-plume::form.toggle>
</x-plume::form>
Prop Type Default Description
label string null The label text for the toggle.
name string null HTML name attribute.
id string null HTML id attribute. Auto-generated if not provided.
model string null AlpineJS model name for two-way binding.
value string '1' The value submitted when the toggle is on.
checked bool false Whether the toggle is initially on.

Usage

blade
<x-plume::form >
    <x-plume::form.toggle model="wifi">
        WiFi
    </x-plume::form.toggle>
</x-plume::form>