type

ToggleButton

src @Js
class ToggleButton : Button

ToggleButton models a boolean state toggled by pressing a button.

See also: docDomkit, Button

constructors

fields

elemOff

Optional content to display when not selected.

elemOn

Optional content to display when selected.

selected

Toggle selection state.

Slot Details

elemOff

src Obj? elemOff := null

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

src Obj? elemOn := null

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

make

src new make()

selected

src Bool selected := false

Toggle selection state.