Split Button
A main action button paired with a chevron that opens a menu of secondary actions.
Show codeHide code
Installation
import { SplitButton } from "@makeplane/propel/components/split-button";Usage
SplitButton ships no menu of its own — render it as a Menu’s child, with the surface as a
sibling MenuContent. Clicking the main segment fires onClick; the chevron opens the menu.
import { Icon } from "@makeplane/propel/components/icon";
import { Menu, MenuContent, MenuItem } from "@makeplane/propel/components/menu";
import { SplitButton } from "@makeplane/propel/components/split-button";
import { Plus } from "lucide-react";
export default function BasicDemo() {
return (
<Menu>
<SplitButton
variant="primary"
size="md"
label="Create work item"
icon={<Icon icon={Plus} />}
/>
<MenuContent align="end">
<MenuItem label="Create from template" />
<MenuItem label="Import work items" />
</MenuContent>
</Menu>
);
}Examples
Variants
Primary lays the segments out as separate pills; secondary connects them with a divider. There is no tertiary or ghost split button, and no danger palette — both segments are neutral.
Show codeHide code
Sizes
One shared size sizes both segments — sm 24 / md 28 / lg 32 px. There is no xs: the
segments are contiguous, so the 20px rung’s synthesized pointer target would overlap its
neighbour. See Sizing for the full ladder.
Show codeHide code
Loading
loading shows a spinner on the main segment (soft-disabled: still focusable, aria-busy) and
disables the menu segment so the pending action can’t fork.
Show codeHide code
Disabled
disabled disables both segments.
Show codeHide code
API Reference
SplitButton
The ready-made split button: a main action `Button` plus a chevron `IconButton` grafted as the surrounding menu's `MenuTrigger`, laid out by the styled `SplitButton` frame (separate pills when primary, connected outline when secondary). Neutral only — there is no danger/error split button. It ships no menu of its own — render it as a `Menu`'s child, with the surface as a sibling `MenuContent`: ```tsx <Menu> <SplitButton variant="primary" size="md" label="Save" onClick={save} /> <MenuContent> <MenuItem label="Save as draft" /> </MenuContent> </Menu>; ```