← Inventory
ButtonGroup
Combines related buttons into a single visual unit.
Also composes with Input, Select, and DropdownMenu; dividers defaults on for the segmented variant.
Usage
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "@desk/ui/components/button-group";Best practices
Use
ButtonGroupto visually join relatedButtons (plusInput/Select/DropdownMenu); for one/many *selection* state reach forToggleGroup.The
segmentedvariant owns the border/background/shadow and defaultsdividerson, whilejoined(default) lets each child draw its own — don't mix the two.
Props
ButtonGroup
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "segmented" | "joined" | null | undefined | ||
| orientation | "horizontal" | "vertical" | null | undefined | ||
| radius | "rounded" | "square" | "full" | null | undefined | ||
| dividers | boolean | null | undefined |
ButtonGroupSeparator
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "strong" | "default" | "muted" | "accent" | "default" | Visual weight of the separator line. |
ButtonGroupText
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild | boolean |
Also exports
- const
buttonGroupVariants
Composition
Builds on
Used by