Split Button
An outline button joined to a chevron that opens more options, split by an inset seam. Each half hovers, presses and takes focus on its own; the chevron stays shaded while its menu is open.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { SplitButton, SplitButtonAction, SplitButtonMenu } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Props
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Put the common action in SplitButtonAction and its variants in the menu, like Add with more ways to add, so the usual case is one click. |
| Do | Pass SplitButtonMenu to a menu trigger's render, so the menu opens from the chevron and the chevron stays shaded while it is open. |
| Do | Name both parts: aria-label on SplitButton for the pair, like Add, and on SplitButtonMenu for what the chevron offers, like More ways to add. |
| Do | Size it as you would a Button beside it: md by default, sm in toolbars and columns, xs in dense rows like the conflict check. In an ActionRow it takes the row's size. |
| Don't | Stretch it to fill a container. Like a Button it is as wide as its label; in a narrow column put it in an ActionRow, which shares the width. |
| Don't | Use it when the menu holds unrelated actions or no option is more common than the rest. Use a DropdownMenu opened from a Button or IconButton. |
Props
SplitButtonAction takes Button's props (icon, loading, onClick, disabled). SplitButtonMenu takes Button's props too: pass it to a menu trigger's render.
SplitButton
| Prop | Type | Default | Description |
|---|---|---|---|
| size | ButtonSize | — | Button's sizes: xs 28 · sm 32 · md 36 (the default) · lg 40. Inside an ActionRow it takes the row's. |
| aria-label | string | — | Names the pair for screen readers, like "Add". |
| children * | ReactNode | — | What it shows inside. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
SplitButtonAction
No props of its own.
SplitButtonMenu
| Prop | Type | Default | Description |
|---|---|---|---|
| aria-label * | string | — | What the chevron offers, like "More ways to add". |
Code
What the playground shows, ready to copy.
import {
SplitButton,
SplitButtonAction,
SplitButtonMenu,
} from "@leap-crm/design-system";
<SplitButton aria-label="Add">
<SplitButtonAction>Add</SplitButtonAction>
<SplitButtonMenu aria-label="More ways to add" />
</SplitButton>Sizes
Button's heights: lg 40, md 36 (the default), sm 32, xs 28. The chevron half is 4 px narrower than the height, so xs keeps a 24 px target.
Open
While its menu is open the chevron half keeps the hover shade. A menu trigger sets aria-expanded on it.
What the examples share
The imports and the scaffolding the examples above call. The scaffolding lives in this page, not in the library.
import { MessageSquarePlus, PhoneCall, Plus } from "lucide-react";
import { Fragment } from "react";
import { SplitButton, SplitButtonAction, SplitButtonMenu } from "@leap-crm/design-system";
const sizes = ["lg", "md", "sm", "xs"] as const;Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| Tab | Moves from the main button to the chevron: each half takes focus on its own. |
| EnterSpace | Press the focused half. |





