Save 15% on all Justd Blocksfor a limited time during the launch!
Components
Switch
A toggle component that allows users to enable or disable a setting with a smooth transition effect.
Switch
A switch is a toggle that flips between on and off, similar to a light switch.
Preview
Code
Installation
If you hit any issues, make sure you check out the installation guide here for more information.
Manual Installation
Make sure you also install the composed components and the required packages for the component to function properly.
Controlled
You can manage the switch's state by setting the isSelected
prop.
Preview
Code
Dark Mode is disabled
Uncontrolled
You can also use the uncontrolled version of the switch.
Preview
Code
Disabled
A disabled switch cannot be toggled and is non-interactive.
Preview
Code