Skip to main content

Module form

Module form 

Source
Expand description

The controls a person answers with: one choice from a set, and one switch between two states.

Written in the library’s own grammar rather than wrapped from upstream. Upstream’s checkbox and radio are Styled only on their outer frame — the box, its radius, its fill, and its size are fixed inside render — so a wrapped one arrives with a look that no amount of styling can bring into line with the rows, chips, and cards around it. Composing them here costs a Role and an aria_* per control, and buys the same selected surface, the same press ramp, the same focus ring, and the same size policy everything else in this crate already answers to.

Both are controlled: the application owns which option is chosen and whether a switch is on, and these report a typed event asking for the change. Nothing here keeps durable state.

Structs§

ChoiceGroup
A set of options where exactly one is chosen.
ChoiceOption
One option in a single-choice set.
Toggle
A labelled control that is either on or off.

Enums§

ChoiceEvent
What a choice group reports.
ToggleEvent
What a toggle reports.
ToggleShape
Whether a toggle reads as a box that is ticked or a switch that is thrown.