-
Notifications
You must be signed in to change notification settings - Fork 0
En Switch Widget
github-actions[bot] edited this page Mar 1, 2026
·
4 revisions

The Switch Widget is a specialized switch for boolean values. It provides a modern Material-UI Switch representation with configurable colors and sizes.
This widget uses all vis-2 Settings and Common Settings. See Home for details.
The widget-specific settings override the more general settings.
| Field Name | Type | Default | Description | Condition |
|---|---|---|---|---|
| thumbSize | slider (0-500) | 62 | Size of the switch thumb in pixels | - |
| thumbColorTrue | color | - | Color of the thumb in "true" state | - |
| thumbColorFalse | color | - | Color of the thumb in "false" state | - |
| trackSize | slider (0-100) | 10 | Size of the switch track in pixels | - |
| trackColor | color | - | Color of the track | - |
| onlyDisplay | checkbox | false | Display only (no write permissions on OID) | Only when write=true |
Note: In addition to the settings above, the Write Value settings (delay/interval) are available. These control how value changes are written to the OID. See Common Settings - Write Value for details.
The Switch Widget works with two boolean values:
- Switch is "on"
- Thumb is displayed in
thumbColorTruecolor - Typically positioned on the right
- Switch is "off"
- Thumb is displayed in
thumbColorFalsecolor - Typically positioned on the left
The widget consists of two main components:
- Movable part of the switch
- Size adjustable via
thumbSize - Color depends on state (thumbColorTrue/thumbColorFalse)
- Background rail on which the thumb moves
- Size adjustable via
trackSize - Color adjustable via
trackColor
- Light Control: On/Off switch for lamps
- Device Control: Enable/Disable devices
- Mode Switching: Automatic/Manual, Day/Night, etc.
- Notifications: Enable/Disable toggle