Try Install Learn Blog API Packages GitHub
Pages

Ui.Toggle

A toggle component.

Properties

checked
:
Bool
=
false

Wether or not the toggle is checked.

disabled
:
Bool
=
false

Wether or not the toggle is disabled.

fontFamily
:
String
=
"Arial"

The font family to measure the width of the toggle.

offLabel
:
String
=
"OFF"

The label for the false position.

onChange
:
Function(Bool, Promise(Never, Void))
=
Promise.never1

The change event handler.

onLabel
:
String
=
"ON"

The label for the true position.

size
:
Number
=
16

The size of the component.

Functions

render
:
Html

Renders the component.

toggle
:
Promise(Never, Void)

Toggles the componnet.