Feedback
Switch
A collection of collapsible elements.
Elements
The component is composed of multiple elements:
switch
the wrapperswitch__label
the text associated with the toggle (optionnal)switch__input
the input, hiddenswitch__switch
the clickable elementswitch__toggle
the round element that toggles to indicate if the switch is on or not
The for
attribute of the label should have the same value as the id
attribute of the input
Switch
Properties
Add classes to the wrapper class to change the style of the component.
Disabled
Add this class to signal users the field is disabled. Include pallote.js
file to your project to automatically add the disabled
attribute.
class="switch switch--disabled"
Switch