Button Group
Use button-group to attach related buttons. With the default gap="0", adjacent buttons share borders and only the first and last buttons keep their outer corners. Each button retains its own label, on-press handler, and disabled state.
For a selected value, use toggle-group or tabs. A button group dispatches separate actions.

Markup
Variants and icon segments
Grouped buttons retain their individual variants. Use size="icon" for icon-only actions, such as pagination or zoom controls.
Spacing out
gap above 0 opts out of the attached treatment: the children render as ordinary separate buttons with full corners and borders. Use a plain row if the actions are not related enough to attach.
Programmatic construction (Zig)
In a Zig view, the canvas.Ui builder constructs the same tree programmatically:
Attributes
| Attribute | Description |
|---|---|
gap | Spacing between children (plain number). Rejected on stacking containers (stack, panel, card, the modal surfaces) — they layer children; put a column (or row) inside for flow. |
cross | Cross-axis alignment: stretch|start|center|end. |
Children are ordinary buttons; see the button attributes for the per-segment surface.
