Summary
Introduce a ButtonGroup primitive to group related buttons with shared spacing.
Intended role in Lattice
ButtonGroup standardizes layout for sets of buttons without adding behavior or selection logic.
Proposed API
as: React element type (default div)
direction: horizontal | vertical
gap: none | xs | sm | md
align: start | center | end | stretch
Variants
direction: horizontal | vertical
gap: none | xs | sm | md
align: start | center | end | stretch
Non-goals
- Does not manage button state or selection.
- Does not implement segmented control behavior.
- Does not accept arbitrary spacing.
States
- Default only (non-interactive).
Accessibility checklist
- Non-interactive; no keyboard behavior required.
- Semantics are provided via
as (no ARIA by default).
Summary
Introduce a
ButtonGroupprimitive to group related buttons with shared spacing.Intended role in Lattice
ButtonGroupstandardizes layout for sets of buttons without adding behavior or selection logic.Proposed API
as: React element type (defaultdiv)direction:horizontal | verticalgap:none | xs | sm | mdalign:start | center | end | stretchVariants
direction:horizontal | verticalgap:none | xs | sm | mdalign:start | center | end | stretchNon-goals
States
Accessibility checklist
as(no ARIA by default).