Switch
A binary toggle for a setting that applies immediately.
Loading documentation…
A Switch applies the moment it is flipped. That is the whole distinction from
a Checkbox: a checkbox is a value you are editing and
will submit, a switch is a state you are changing now. If there is a Save
button below it, it should probably be a checkbox.
align="end" puts the control after the text, which is the layout a settings
list wants: labels line up on the left, switches line up on the right.
An inline label. Its presence turns the component into the whole clickable row.
Muted helper text under the label.
Where the control sits relative to the text. It defaults to start; end
is the settings-row layout.
Controlled and uncontrolled state.
Fires when the switch is flipped.
Dims the row and ignores interaction.
Class for the outer <label>.
Class for the track itself.
Standard form behaviour, passed through to Base UI.