type

ToggleButton

@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

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

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

new make()

selected

Bool selected := false

Toggle selection state.