Switch
Toggle control for binary on/off states with smooth animations
Preview
Installation
Usage
Examples
Card
Use a Label as a clickable card container.
Pill Shape
Use the shape="pill" variant for a wider thumb.
API Reference
The Switch component is built on top of Base UI's Switch. All Base UI props are supported. The documentation below only covers custom props specific to our implementation.
For the complete Base UI API, see the Base UI Switch documentation.
Props
Switch
Toggle control for binary on/off states. Wraps Base UI's Switch.Root and Switch.Thumb.
Prop
Type
Default