Toggle Switch ui-switch
Adds a toggle switch to the user interface.
Properties
Prop | Dynamic | Description |
---|---|---|
Group | Defines which group of the UI Dashboard this widget will render in. | |
Size | Controls the width of the button with respect to the parent group. Maximum value is the width of the group. | |
Label | The text shown within the button. | |
On Payload | The type & value to output in msg.payload when the switch is turned on. | |
Off Payload | The type & value to output in msg.payload when the switch is turned off. | |
On Icon | If provided, this Material Design icon will replace the default switch when in "on" state. No need to include the mdi prefix. | |
Off Icon | If provided, this Material Design icon will replace the default switch when in "off" state. No need to include the mdi prefix. | |
On Color | If provided with a icons, this colour is used for the icon when in "on" state | |
Off Color | If provided with a icons, this colour is used for the icon when in "off" state |
Dynamic Properties
Dynamic properties are those that can be overriden at runtime by sending a particular msg
to the node.
Where appropriate, the underlying values set within Node-RED will be overriden by the values set in the received messages.
Prop | Payload | Structures |
---|---|---|
Class | msg.class |
|
Example
Example of rendered switches in a Dashboard.