Switch
A toggle for binary on/off states.
Anatomy
A single root that owns the thumb. Pair it with a label so the control reads as a sentence.
TSX
Drop it inside a menu item to swap out a checkbox indicator. The popup's selector pushes the switch to the trailing edge automatically.
TSX
API
Reference for each part of the component, including its available props and behavior.
Switch
The root. Renders the track and the thumb. Accepts the full Base UI Switch.Root surface, so controlled and uncontrolled usage, disabled state, and form integration all flow through.
PropType