Button Group Examples
39 joined button rows: split buttons with menus, action toolbars, view and range pickers, pagination, steppers and buttons with counts. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every button group example
39 examples.
- Basic Button GroupStandardOutline buttons joined in three groups: Left, Middle, Right, then a small pair and a large pair.

- Bulk ActionsActionsBulk actions for Select All, Delete, Archive, and Move, plus counts such as Select All (12) and Delete (3).

- Button Group VariantsStandardTwo outline groups of editing actions: Copy, Paste, and Cut in one, Undo and Redo in the other.

- Button Group with SelectAdvancedA country select in front of +1 (555) 123-4567, and an https select in front of example.com.

- Carousel ControlsNavigationCarousel controls for five slides: previous, next, and dots, plus a row that reads the slide as 1 / 5.

- Cart ButtonBadgesA Cart button with a badge of 3 beside $127.50, and an icon cart with a badge of 5 beside 5 items.

- Chart ControlsDisplayLine, Bar, and Pie as labels and as icons, both rows sharing one chart type that starts on Line.

- Comment ActionsActionsReply, Edit, Delete, and Report as ghost buttons, plus an icon-only row of Reply, Edit, and Delete.

- Contextual ToolbarPatternsA Bold, Italic, and Underline group that shows up only while text in the sentence is selected.

- Date SelectorFormsDate presets from Today through Custom, plus This Week, This Month, and This Year, starting on Today.

- Density ControlsDisplayCompact, Comfortable, and Spacious, plus XS through XL, sharing one value that starts on Comfortable.

- File OperationsActionsDownload, Share, Edit, and Delete, shown once with labels and once again as an icon-only row.

Or describe it. With Pro, your AI agent installs the button group example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Button Group examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
A row or column of related buttons joined into one control: the buttons share their inner borders and only the outer corners are rounded, so Copy, Paste and Cut read as one unit. Each example here is shadcn.io's Button Group with its Buttons, styled with Tailwind CSS, for React on Base UI, React Aria, Ark UI and Radix UI, and for Vue, Svelte and Solid on Ark UI.
Yes. Every example is free to use in personal and commercial projects, with no attribution. Seeing the code and installing it takes a free shadcn.io account.
Button Group joins them: it removes the doubled border between neighbors, squares the inner corners, and renders a `role="group"` you can name with `aria-label`. It also takes inputs, selects and `ButtonGroupText` and joins them the same way. Nested groups get a gap between them.
Button Group for actions, like Fork with a menu or Previous and Next. Toggle Group for a choice that stays pressed, like text alignment, with Arrow key movement built in. Tabs for switching which panel is shown. Several examples here keep a selection on plain buttons with `aria-pressed`; a Toggle Group does the same with less code.
Put the main Button and a second, icon-only Button that opens a Dropdown Menu in one group. Give the chevron an `aria-label`, such as More options. The Split Button with Dropdown and Overflow Menu examples show both forms.
Put `ButtonGroupText` after the button with the number, as in Like with Count, or place a small round Badge on the button's corner, as in Cart Button and Notifications Button. Give icon-only buttons an `aria-label` that includes the count.
Keep the selected value yourself, give the matching button the `default` variant and the rest `outline` or `ghost`, and set `aria-pressed` so screen readers hear it. Button Group itself keeps no state. For page or step navigation, use `aria-current` instead.
Sign in with a free account, open the example and run the install command it shows. It adds the example and the components it uses, Button Group, Button and any others, to your project, for your framework and UI library.
Button Group has no size prop. Set `size` on every Button in the group, such as `sm`, and use an icon size like `icon-sm` for icon-only buttons, so the row lines up.
Set `orientation` to `vertical` on Button Group. The buttons stack, share their horizontal borders and round only the top and bottom corners.
shadcn.io's Button Group and Button (built on Base UI, React Aria, Ark UI or Radix UI in React, and on Ark UI in Vue, Svelte and Solid), Tailwind CSS and Lucide icons. Some examples add Badge, Kbd, Input, Select or Dropdown Menu.
Yes. The group renders `role="group"`, and every example names its groups with `aria-label`. Each button is a real button that Tab reaches and Enter or Space presses. Icon-only buttons have an `aria-label`, and selected buttons set `aria-pressed` or `aria-current`.
Yes, and they look the same on every target. Only the prop names differ where the libraries differ, such as `onPress` and `isDisabled` on React Aria, or how a menu trigger takes its button.
4.9 out of 5 from 150+ developers
Every button group example. One prompt away.
Every button group example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro




















