Button Group
A connected group of related buttons that share one size.
Show codeHide code
Installation
import { ButtonGroup, ButtonGroupButton } from "@makeplane/propel/components/button-group";Usage
ButtonGroup is a group-role container that shares its size with every ButtonGroupButton
inside via context. Name the group for assistive tech with aria-label.
import { ButtonGroup, ButtonGroupButton } from "@makeplane/propel/components/button-group";
import { Icon } from "@makeplane/propel/components/icon";
import { Clipboard, Copy, Scissors } from "lucide-react";
export default function BasicDemo() {
return (
<ButtonGroup size="sm" aria-label="Clipboard actions">
<ButtonGroupButton label="Cut" icon={<Icon icon={Scissors} />} />
<ButtonGroupButton label="Copy" icon={<Icon icon={Copy} />} />
<ButtonGroupButton label="Paste" icon={<Icon icon={Clipboard} />} />
</ButtonGroup>
);
}Examples
Sizes
The group’s size sizes every segment — a segment’s own size still wins. There is no lg
grouped button.
Show codeHide code
Disabled
A disabled segment is hard-disabled (not focusable) while its siblings stay interactive.
Show codeHide code
API Reference
ButtonGroup
The ready-made connected button group: a `group`-role container that shares `size` with every `ButtonGroupButton` inside via context (an item's own `size` still wins). There is no Base UI button-group primitive — the items are independent Base UI `Button`s; the group contributes only the shared chrome and the `group` role. Name the group for assistive tech via `aria-label`.
ButtonGroupButton
The ready-made group segment: grafts Base UI's `Button` behavior onto the styled `ButtonGroupButton` (behavior outer, the styled button as the render target), lays out an optional `icon` beside the label (`iconPosition`), and takes its `size` from the surrounding `ButtonGroup` via context.