Class Reference ToggleButton class reference More examples12345678910111213var toggle = new photonui.ToggleButton({ value: false, text: "Value: off", buttonColor: "red", callbacks: { "value-changed": function(widget, value) { widget.text = "Value: " + ((value) ? "on" : "off"); widget.buttonColor = (value) ? "green" : "red"; } }});photonui.domInsert(toggle, "demo");