bezel

Components / Selection & input

Toggle

crates/ui/src/widgets/controls.rs

use ui::widgets;

widgets::toggle(&theme, self.enabled)

Display-only, like the rest of widgets: the caller adds .id(..) and .on_click(..), and holds the bool.

Tab focus and space/enter come from the same wrapper every stateless control uses:

focus::focusable(&theme, &self.switch, widgets::toggle(&theme, self.enabled))
Toggle