Actions
Button group
Two or three related buttons laid out together, as a row of pills or as equal filled columns, used when several actions answer the same moment.
In kanso-ui as ButtonGroup
Accessibility
- Give the group
role="group"and anaria-labelnaming what the actions act on, "Weekly review" or "Studio project", unless a heading beside it already says so. - The DOM order is the visual order, strongest first, so Tab moves left to right, then down.
- Targets: every button keeps 48px on phones; the 8px gap keeps neighbours apart.
- Contrast, light / dark: each button keeps its Button pair. In the spotlight,
on-spotlightonspotlight-tonalis 5.2 / 6.5:1,on-spotlight-buttononspotlight-button11.1 / 11.6:1, thespotlight-lineedge 3.8:1, and the focus ring turnson-spotlight, 7.6 / 9.4:1. - Labels never truncate: if a two-up label does not fit its half, shorten it or stack the buttons.