Open GitHub repository
ComponentsButton Group

Button Group

Visually joins related buttons into one compact control while preserving each action.

Installation

bunx @swift-rust/ui add button-group

Usage

tsx
1import { ButtonGroup } from "@/components/ui/button-group";
2 
3import { Button } from "@/components/ui/button";
4 
5<ButtonGroup>
6 <Button variant="outline">Day</Button>
7 <Button variant="outline">Week</Button>
8 <Button variant="outline">Month</Button>
9</ButtonGroup>

Composition

Button Group is composed of these parts:

ButtonGroup
├── Button
├── Button
└── Button

Examples