Select UI framework
Get Started
React Aria
AlertApp Store ButtonAspect RatioBadgeBannerBreadcrumbButton GroupButtonCheckboxCommand MenuCompactButtonDialogDrawerEmptyFancy ButtonFile UploadHintInput OTPInputItemKbdLabelLinkButtonLoaderPopoverProgress BarProgress CircleRadio GroupRatingSelectSeparatorSkeletonSliderSocial ButtonSwitchTagTextareaToggle GroupToggleTooltip
Component button-group-demo not found in registry.
Installation
# Recommended (pnpm monorepo)
pnpm add @react-aria/react-button-group
# Or use the shadcn helper to scaffold a component (if available):
npx shadcn@latest add button-groupUsage
import { ButtonGroup } from "@/components/ui/button-group"
export default function Example() {
return (
<ButtonGroup.Root>
<ButtonGroup.Item>Left</ButtonGroup.Item>
<ButtonGroup.Item>Middle</ButtonGroup.Item>
<ButtonGroup.Item>Right</ButtonGroup.Item>
</ButtonGroup.Root>
)
}Examples
Basic Button Group
Component button-group-demo not found in registry.
Different Sizes
Component button-group-sizes not found in registry.
Orientation
Component button-group-vertical not found in registry.
With Icons
Component button-group-icons not found in registry.
Disabled
Component button-group-disabled not found in registry.
Active / Selected
Component button-group-active not found in registry.
Text
Component button-group-text not found in registry.
Nested
Component button-group-nested not found in registry.
Props
ButtonGroup.Root
This component accepts the usual container props and orientation control.
Prop
Type
Default
orientation
horizontalverticalhorizontal
disabled
booleanfalse
ButtonGroup.Item
Each item supports typical button props and the asChild pattern.
Prop
Type
Default
asChild
booleanfalse
disabled
booleanfalse