# Button Group

- **Section:** Components
- **URL:** https://refast.fastapicloud.dev/docs/components/button-group
- **Markdown:** https://refast.fastapicloud.dev/docs/components/button-group.md
- **Source:** https://github.com/idling-mind/refast-docs/blob/main/docs/pages/components/buttons/button_group.py
- **Live examples:** the widgets on this page need a browser; open the URL above to try them.
- **Applies to:** refast 0.12.2

Group related action buttons together with consistent border radiuses and layout alignment.

```python
from refast.components.shadcn.button import Button, ButtonGroup

ButtonGroup(
    orientation="horizontal",
    children=[
        Button("Save"),
        Button("Delete", variant="destructive"),
    ]
)
```

Horizontal Button Group

Vertical Button Group

## Component Reference

### `ButtonGroup`

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Layout direction of the grouped buttons. |
| `children` | `ChildrenType` | `None` | Grouped buttons, text labels, and separators. |
| `class_name` | `str` | `""` | Additional Tailwind CSS classes. |

---

Part of the Refast documentation: [all pages](https://refast.fastapicloud.dev/llms.txt), [everything on one page](https://refast.fastapicloud.dev/llms-full.txt), [search](https://refast.fastapicloud.dev/api/search?q=save_prop).
