Components
- Accordion new
- ActionSheet new
- Alert new
- Alert Dialog new
- Angle Slider new
- Autocomplete new
- Avatar new
- Badge new
- Breadcrumb new
- Button new
- Button Group new
- Card new
- Carousel new
- Checkbox new
- Clipboard new
- Collapsible new
- Color Picker new
- Date Input new
- Date Picker new
- Dialog new
- DialogCaller new
- Drawer beta
- Editable new
- Empty new
- Field new
- Fieldset new
- File Upload new
- Filters new
- Floating Panel new
- Hover Card new
- Image new
- Image Cropper new
- Input new
- Input Group new
- Json Tree View new
- Kbd new
- Listbox new
- Marquee new
- Menu new
- Number Input new
- Pagination new
- Password Input new
- PhoneField new
- Pin Input new
- Popover new
- Progress Circular new
- Progress Linear new
- Qr Code new
- Radio Group new
- Rating Group new
- Scroll Area new
- ScrollSpy new
- Segment Group new
- Select new
- Separator new
- Sidebar new
- Signature Pad new
- Skeleton new
- Slider new
- Splitter new
- Steps new
- Switch new
- Table new
- Tabs new
- Tags Input new
- Textarea new
- Timeline new
- Timer new
- Toast new
- Toc new
- Toggle new
- Toggle Group new
- Tooltip new
- Tour new
- Tree View new
- Typography new
Button Group
Vue button group that joins related actions with shared borders, spacing, and consistent sizing.
Features
- Grouped layout — Visually connects adjacent buttons by removing inner border radii
- Orientation — Horizontal (default) or vertical layout via the
orientationprop - Composable — Nest groups or combine with inputs and other controls
- Accessible — Renders as a semantic
fieldsetvia Ark UI's polymorphic factory
Installation
Install from the Vuzeno registry:
bunx --bun shadcn-vue@latest add https://vuzeno.com/r/button-group.json
npx shadcn-vue@latest add https://vuzeno.com/r/button-group.json
yarn dlx shadcn-vue@latest add https://vuzeno.com/r/button-group.json
pnpm dlx shadcn-vue@latest add https://vuzeno.com/r/button-group.json
Usage
<script setup lang="ts">
import { Button } from "@/components/ui/button";
import { ButtonGroup } from "@/components/ui/button-group";
</script>
<template>
<ButtonGroup aria-label="Actions">
<Button variant="outline">Archive</Button>
<Button variant="outline">Report</Button>
</ButtonGroup>
</template>
Composition
ButtonGroup
└── Button
Accessibility
- The component renders as a
fieldsetelement. - Use Tab to navigate between focusable elements in the group.
- Label the group with
aria-labeloraria-labelledby.
<ButtonGroup aria-label="Pagination">
<Button variant="outline">Previous</Button>
<Button variant="outline">Next</Button>
</ButtonGroup>
Button Group vs Toggle Group
- Use Button Group when buttons perform independent actions.
- Use Toggle Group when buttons toggle a shared state.
Examples
Orientation
Set the orientation prop to change the layout.
Sizes
Control the size of buttons using the size prop on individual buttons.
Nested
Nest ButtonGroup components to create groups with spacing between them.
Input
Combine an input with action buttons in a single group.
Select
Pair a select with an input and submit button — useful for amount or unit pickers.
Dropdown
Create a split button group with a Menu for secondary actions.
API
ButtonGroup
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | Layout direction of the group |
asChild | boolean | false | Merge props onto the child element |
class | string | — | Additional CSS classes |
The component also exports buttonGroupVariants and ButtonGroupVariants for building custom styled wrappers.
See Ark UI composition guide for polymorphic usage with asChild.