# ButtonGroup

> Joins related buttons into one segmented control.

- Category: [Actions & feedback](https://tarve.dev/docs.md#actions)
- Import: `import { ButtonGroup } from "@tarve/core";`
- Props type: `ButtonGroupProps`
- Source: [packages/core/src/form-controls.ts:65](https://github.com/omarcosr/tarve/blob/main/packages/core/src/form-controls.ts#L65)

## Usage

```tsx title="ButtonGroup.tsx"
import { Button, ButtonGroup } from "@tarve/core";

<ButtonGroup>
  <Button variant="outline">Day</Button>
  <Button variant="outline">Week</Button>
  <Button variant="outline">Month</Button>
</ButtonGroup>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `gap` | `number` | `0` |  |
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` |  |

## Common props

Shared by every component (descriptions: https://tarve.dev/docs.md#common-props): `children`, `class`, `className`, `highlight`, `id`, `key`, `motionFrom`, `onHighlight`, `onPaste`, `onPointerLeave`, `onPointerMove`, `onSize`, `onTransitionEnd`, `rovingGroup`, `style`.

Previous: [Button](https://tarve.dev/docs/components/Button.md) · Next: [Badge](https://tarve.dev/docs/components/Badge.md)

---

Tarve v0.13.8 · HTML version: https://tarve.dev/docs/components/ButtonGroup · Index for agents: https://tarve.dev/llms.txt
