Switch element consist of two classes. The switch
container class and the switch-knob
class that should go inside the switch
element.
<div class="switch">
<div class="switch-knob"></div>
</div>
Switch can be toggled by adding and removing an active
class to the container.
<div class="switch active">
<div class="switch-knob"></div>
</div>
active
- a class that should be added to the switch container when the switch is toggled on, changes the background color and the position of the knob/thumb element insidedisabled
- changes the background and knob color of the switchswitch-knob
- a knob or thumb element that should be placed inside the switch containerswitch
- a container element for the switch