Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Hover Card
- Input
- Input OTP
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
import { ButtonGroup } from "@/components/button-group/button-group";
import { Button } from "@/components/button/button";
export function ButtonGroupDemo() {
return (
<ButtonGroup>Installation
$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.vercel.app/r/button-group.json
Usage
import { ButtonGroup } from "@/components/ui/button-group/button-group";<ButtonGroup>
<Button variant="outline">One</Button>
<Button variant="outline">Two</Button>
</ButtonGroup>RTL
To enable right-to-left support, see the RTL guide.
"use client";
import {
ArchiveIcon,
ArrowLeftIcon,
CalendarPlusIcon,API Reference
ButtonGroup
The ButtonGroup component is a container that groups related buttons together with consistent styling.
| Prop | Type | Default |
|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" |
className | string | - |