Switch

Basic example

View.Switch()

Basic example with styling

View.Switch(
    horizontalOptions = style.Position,
    verticalOptions = style.Position,
    backgroundColor = style.ViewColor,
    isToggled = false
)

See also:

More examples

Switch is a horizontal toggle button that can be manipulated by the user to toggle between on and off states, which are represented by a boolean value.

View.Switch(
    isToggled = false,
    toggled = fun on -> dispatch (SwitchToggled (...))
)