Button group
Joins related buttons, or a button and its menu, into one row or column.
button-group-basic-demo.tsx
Installation
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
Composition
ButtonGroupButtonRepeats
Orientations
button-group-orientations-demo.tsx
Sizes
Set size on the group, not on each button.
button-group-sizes-demo.tsx
API reference
- orientation: "horizontal" | "vertical" = "horizontal"
- Joins buttons in a row or column.
- size: "xs" | "sm" | "md" | "lg" | "xl"
- Sets the size of each button in the group. A size on a button overrides it.