SlideToggle
A toggle switch widget — a visually distinct variation of Checkbox that renders a sliding track-and-thumb instead of a traditional check mark. It wraps <input type="checkbox"> and shares all Checkbox functionality including color, text label, and two-way data binding. Optionally display a label to the right of the toggle via text, in addition to the standard field label. This field can be used as a cell editor in a Grid.
const toggle = new SlideToggle({
label : 'Notifications',
text : 'Enable',
checked : true,
appendTo : document.body
});
Useful configs and properties
| Config | Description |
|---|---|
| checked | Initial checked state |
| text | Label text displayed to the right of the toggle |
| color | Color of the toggle track |
| label | Field label displayed beside the toggle |
| value | Gets or sets the current toggle value |
See also
- Checkbox - Traditional checkbox widget
- BooleanCombo - Dropdown alternative for boolean selection
No results
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of SlideToggle class, or subclass thereof.
-
Identifies an object as an instance of SlideToggle class, or subclass thereof.
CSS variables
CSS variables that can be set to adjust appearancetype: slidetoggle