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
Variants and sizes
k-btngroup: pills at their natural width; they wrap to a second line when space runs out.k-btngroup k-btngroup--fill: one equal column per button across the full width; each button stretches, and its side padding drops tospace-mdso the label fits.- In the spotlight: "Remind me later" (
k-btn--on-spot-tonal) and "Skip" (k-btn--on-spot-outline) in ak-btngroup--fill, under thek-btn--on-spot k-btn--xl k-btn--blockmain action. SpotlightCard'sk-spot__actionsis the same two-up, built into the card.
States
The group has no state of its own; each button keeps its hover, pressed, focus and disabled states. When an action does not apply, leave it out rather than disable it: in a fill group, the button that stays takes the width.
Do and don’t
Do
Lead with the strongest action, and keep one ink or accent button per group.
Keep two-up labels to a few short words: "Remind me later", "Skip".
Don’t
Put more than two buttons in a two-up, or more than three in a row.
Mix button sizes in one group.
Group actions that act on different things.
What you provide
- The buttons: label, variant and press handler for each, icon optional.
- The group's name.
- The layout: row or fill.