howdy/ui/switch

Switches: an on-off setting that takes effect straight away.

checkbox.choice(switch.switch([attribute.name("alerts"), attribute.checked(True)]), [
  text("Email alerts"),
])

A switch is the browser’s own checkbox with the switch role, drawn as a track and a thumb, so Space toggles it and it submits with a form like any checkbox. Label it with howdy/ui/checkbox.choice or a <label>.

Values

pub fn classes() -> List(css.Class)

Every class this module uses, for howdy/ui/export.

pub fn switch(
  attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn switch_class() -> css.Class
✨ Search Document