---
title: Button Group
description: A container that groups related buttons together with consistent styling.
---
## Preview
## Installation
CLIManual
```bash
npx @olyx/cli@latest add button-group
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx
import { ButtonGroup, ButtonGroupSeparator } from "@/components/ui/button-group"
import { Button } from "@/components/ui/button"
```
```tsx
```
## Accessibility
- The `ButtonGroup` component has the `role` attribute set to `group`.
- Use `Tab` to navigate between buttons.
- Use `aria-label` or `aria-labelledby` to label the button group.
## API Reference
### ButtonGroup
Container that groups related buttons with consistent styling.
| Prop | Type | Default |
| ------------- | ---------------------------- | -------------- |
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` |
### ButtonGroupSeparator
A separator that visually divides buttons within a `ButtonGroup`.
## Examples
### Orientation
### Sizes
### Split