class

ToggleButton

@Js
class ToggleButton : Button

ToggleButton models a boolean state toggled by pressing a button.

See also: docDomkit, Button

constructors make

fields elemOff

Optional content to display when not selected

elemOn

Optional content to display when selected

selected

Toggle selection state

elemOff Obj? : elemOff

Optional content to display when not selected. If the argument is not an Elem instance, one will be created with text content using toStr.

elemOn Obj? : elemOn

Optional content to display when selected. If the argument is not an Elem instance, one will be created with text content using toStr.

make new make()

selected Bool : selected

Toggle selection state.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST