Expand description
RadioTileGroup — an N-ary group of RadioTiles with single selection.
Like SegmentedControl, the
tile count is not fixed: add any number of tiles, all sharing one
Signal<usize>. The group owns:
- Layout — an equal-size
TileLayout::Row, an adaptive wrappingTileLayout::Grid, a full-widthTileLayout::Column, or a compact fixed-heightTileLayout::Verticalsettings list. Row and Grid equalize tile size (uniform width + the tallest tile’s height) via a customplace_childrenmeasuring each tile height-for-width — stacks have no cross-axis stretch, so the group does the sizing. - Keyboard — the WAI-ARIA roving radiogroup pattern: the group is a
single Tab stop; Arrow keys move selection (selection follows focus),
Home/End jump, disabled tiles are skipped.
Increment/DecrementAT actions mirror the arrows for switch access. - Accessibility —
Role::RadioGroupwithactive_descendantpointing at the selected tile; each tile isRole::RadioButtonand declares its siblings viapush_to_radio_group(for “N of M”).
ⓘ
let selected = ctx.signal(0_usize);
RadioTileGroup::new(selected)
.label(tr!(project_format()))
.tile(RadioTile::new().icon(a).title(tr!(single_file())).description(tr!(single_file_desc())))
.tile(RadioTile::new().icon(b).title(tr!(bundle())).description(tr!(bundle_desc())))
.layout(TileLayout::Row)Structs§
- Radio
Tile Group - An N-ary, single-selection group of selectable-card radios. See the module docs.
Enums§
- Tile
Layout - How a
RadioTileGrouparranges its tiles.