Skip to content

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.

Composition

  • ButtonGroup
    • ButtonRepeats

Orientations

button-group-orientations-demo.tsx

Split button

Give the icon button an aria-label. Also install Menu.

button-group-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.