M Majid DS mds
GitHub

Flux components

Switch

Turn a single setting on or off.

Free shipping
<flux:field variant="inline">
    <flux:label>Free shipping</flux:label>
    <flux:switch checked />
</flux:field>

With a description

Order notifications An SMS at every shipping step
<flux:switch label="Order notifications" description="An SMS at every shipping step" checked />

Label alignment

align="left" (or start) puts the control on the leading edge instead of the trailing one.

Right (default) Left
<div class="space-y-4">
    <flux:switch label="Right (default)" checked />
    <flux:switch label="Left" align="left" checked />
</div>

Disabled

Gift wrapping Unavailable for this seller
<flux:switch label="Gift wrapping" description="Unavailable for this seller" disabled />

Reference

flux:switch

PropDescription
labelLabel beside the switch.
descriptionSmaller text under the label.
checkedOn state for a plain form.
alignOptions: right, left. Default: right.
disabledDisables the control.
nameSubmitted field name.
wire:modelBinds to a Livewire property.

Related