# ButtonGroup (@limerdev/zest) Buttons joined into one control. `` (`orientation`: `horizontal` or `vertical`) holds `Button`s, triggers, an `Input`, a `ButtonGroup.Text` (a label or unit in a box) and `ButtonGroup.Separator`s, and joins them: square inner corners, one border between neighbours. It is a `group`; name it with `aria-label`. Groups inside a group keep a gap. - Category: Actions - Import: `import { ButtonGroup } from '@limerdev/zest'` - Exports: `ButtonGroup.Root`, `ButtonGroup.Text`, `ButtonGroup.Separator` - Use for: A split button (an action and a menu of its variants), a pager (Previous, Next), a zoom control, a toolbar segment, an input with its action. - Don't: Choosing one of several options: use `ToggleGroup`. A row of unrelated actions: put `Button`s side by side with a gap. Tabs between views: use `Tabs`. ```svelte Schedule ``` Props of `ButtonGroup.Root`: - `orientation` (`"horizontal" | "vertical"`, default `'horizontal'`): Which way the buttons run: side by side, or stacked. Props of `ButtonGroup.Separator`: - `decorative` (`boolean`, default `true`): Whether the separator is decorative and should be hidden from assistive technologies. - `orientation` (`"horizontal" | "vertical"`, default `'vertical'`): The orientation of the separator. Example: Split button A split button: the action, and a menu of its other ways. ```svelte Schedule Send a copy to me ``` Example: Pager Outline buttons with ButtonGroup.Text between them: one border between neighbours. ```svelte Page {current} of {last} ``` Example: With input An Input and its action, joined. Groups inside a group keep a gap. ```svelte ``` Example: Vertical orientation="vertical" stacks the buttons. ```svelte ```