Switch
Capture boolean input from user
Import
Source
Docs
Package
Usage
Color
Label position
Size
Radius
Controlled
Inner Labels
Icon labels
Thumb icon
Switch.Group
Select your favorite framework/library
This is anonymous
Controlled Switch.Group
Styles API
Switch
supports Styles API, you can add styles to any inner element of the component withclassNames
prop. Follow Styles API documentation to learn more.
Switch description
Switch error
Component Styles API
Hover over selectors to highlight corresponding elements
Get input ref
Accessibility
Switch
is a regular input[type="checkbox"]
. Set aria-label
if the Switch
is used without label
prop: