Accessible and uniform-styled implementation of a switch.
Switch.default "Flying mode."
Msg.ToggleThis
True
|> Switch.withColor Switch.success
|> Switch.renderElement renderConfigDefines all the required properties for creating a switch. This default switch is half-opaque black.
Switch.default "Flight mode"
(Msg.SetFlightMode <| not model.flightModeEnabled)
model.flightModeEnabledThis switch has the success-color, and it's greenish for enforcing success.
Switch.success "Toggle Firewall"
(Msg.SetFirewall <| not model.hasFirewall)
model.hasFirewallThis switch has the danger-color, and it's reddish for enforcing the user's attention.
Switch.danger "Toggle root access"
(Msg.SetRootAccess <| not model.hasRoot)
model.hasRootEnd of the builder's life. The result of this function is a ready-to-insert Elm UI's Element.
The
Switch msgtype is used for describing the component for later rendering.