Switch
Usage notes
Use <Switch> with Switch.Control and Switch.Thumb. The styled root renders Ark's hidden input
internally, so pointer interaction and native form integration keep working
without any extra part.
When placing a Switch inside a clickable row such as NavigationList.Item, do not nest it inside a button. Render the
row with as="div", keep the row click handler for blank-space
activation, and stop propagation around the Switch so a direct Switch click
does not toggle twice.
Toggle switch with on/off states, label, and form integration.
API Reference
<Switch> <Switch.Control> <Switch.Label> <Switch.Thumb> extends SwitchThumbPropsSwitchThumbProps.