Flutter Design Systems Galleries

Toggle group

Use a toggle group for a small set of choices whose state stays visible. A layout switch is a good fit because both alternatives can stay in view.

About this look Stint app Appliance gallery

Choose a layout

Switch between List and Grid. The caption names the active layout.

Flutter preview Open preview
semanticLabel
Names the group.
options
List and Grid, in reading order.
selected
Current layout.
onSelectionChanged
Receives the new selection.

Shared behaviour

  • Keyboard and focus. Tab into the group. Try the horizontal arrows to move focus and Space to choose the focused option.
  • Screen readers. Read the choices in turn to hear their names and selection state. The caption also names the active layout.
  • Direction and type. The options follow reading order in RTL. Try both labels at 200% text in the narrow frame.
Read the ui_core contract