Switch
A control that allows the user to toggle between checked and not checked.
Made by imskyleenInstallation
Usage
API Reference
Switch
Prop | Type | Default |
---|---|---|
startIcon? | React.ReactElement | - |
endIcon? | React.ReactElement | - |
thumbIcon? | React.ReactElement | - |
pressedWidth? | number | 19 |
...props? | HTMLMotionProps<"button"> | - |
The asChild
property is not supported in the Switch
component, as it is
used for animation.
Credits
- Radix UI Switch
- Credit to shadcn/ui for style inspiration.