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
Anatomy
- Group: a wrapper with
role="group"and a name. - Buttons: two or three
k-btn, strongest first. - Gap:
space-sm(8px) between buttons, across and down when the row wraps.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-btngroup | gap | 8px (space-sm) |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
space-sm | --kui-spacing-kanso-sm | 8px | 8px |
space-md | --kui-spacing-kanso-md | 12px | 12px |
accent | --kui-color-accent | #1a1a1a | #ececec |
on-accent | --kui-color-on-accent | #fafafa | #121212 |
ink | --kui-color-ink | #1a1a1a | #ececec |
on-ink | --kui-color-on-ink | #fafafa | #121212 |
container | --kui-color-container | #e9e9e9 | #2b2b2b |
outline | --kui-color-outline | #8a8a8a | #8c8c8c |
spotlight-button | --kui-color-spotlight-button | #fafafa | #ffffff |
on-spotlight-button | --kui-color-on-spotlight-button | #1a1a1a | #1a1a1a |
spotlight-tonal | --kui-color-spotlight-tonal | rgba(255, 255, 255, 0.16) | rgba(255, 255, 255, 0.14) |
spotlight-line | --kui-color-spotlight-line | rgba(255, 255, 255, 0.6) | rgba(255, 255, 255, 0.6) |
on-spotlight | --kui-color-on-spotlight | #ffffff | #ffffff |