Switch
A switch widget that can be toggled. Includes Widget API
Properties
selection
Type: boolean, default: false
The checked state of the switch.
thumbOffColor
Type: Color
The color of the movable thumb, when switched off.
thumbOnColor
Type: Color
The color of the movable thumb, when switched on.
trackOffColor
Type: Color
The color of the track that holds the thumb, when switched off.
trackOnColor
Type: Color
The color of the track that holds the thumb, when switched on.
Events
“change:selection” (widget, selection, options)
Parameters:
Fired when the selection property changes.
“select” (widget, selection, options)
Parameters:
Fired when the switch is toggled by the user.