Skip to main content

switch

Function switch 

Source
pub fn switch(id: impl Into<ElementId>, cx: &App) -> Switch
Expand description

A native switch whose on track meets the switch contrast rule in track. Build every switch here, not with Switch::new: the theme fixes the off track and knob, but only the switch can set its on colour.