Skip to content
Core ElementsFree

Button Group

A row of connected buttons sharing borders and outer corners, for view switchers or segmented actions.

Usage

Installation

bash
npx wunderui-cli add button-group

Writes the source into your project with its dependencies and, on first use, the styles — see Installation.

Then import what you need:

tsx
import { ButtonGroup } from "@/components/ui/button-group"

Examples

Theme switch

Two icon buttons, the current one filled — click to switch.

Device preview

Desktop, tablet or phone — one at a time.

Previous and next

Two buttons sharing one border for paging.

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

View switcher

A pill group as a segmented view switcher in a page header.

Checkout redesign

API Reference

PropTypeDefault
shape"rounded" | "pill""rounded"