Skip to content

SplitButton

A directly-clickable primary action paired with an attached chevron toggle that opens a menu of related actions.

<SplitButton
label="Save"
variant="primary"
size="md"
items={[ {icon: Copy, label: 'Save a copy'}, {icon: Edit, label: 'Save as draft'}, {type: 'divider'}, {icon: Archive, label: 'Save and archive'}, ]}
/>
<SplitButton {...args}>
<DropdownMenuItem icon={Copy} label="Save a copy" />
<DropdownMenuItem icon={Edit} label="Save as draft" />
<DropdownMenuItem icon={Archive} label="Save and archive" />
</SplitButton>
<div style={{display: 'flex', alignItems: 'center', gap: 16}}>
<SplitButton
items={[{icon: Edit, label: 'Edit'}]}
label="Secondary"
variant="secondary"
/>
<SplitButton
items={[{icon: Edit, label: 'Edit'}]}
label="Primary"
variant="primary"
/>
<SplitButton
items={[{icon: Trash2, label: 'Delete all'}]}
label="Delete"
variant="destructive"
/>
</div>
<div style={{display: 'flex', alignItems: 'center', gap: 16}}>
<SplitButton
items={[{icon: Edit, label: 'Edit'}]}
label="Small"
size="sm"
/>
<SplitButton
items={[{icon: Edit, label: 'Edit'}]}
label="Medium"
size="md"
/>
<SplitButton
items={[{icon: Edit, label: 'Edit'}]}
label="Large"
size="lg"
/>
</div>
<SplitButton
label="Save"
variant="primary"
size="md"
items={[ {icon: Copy, label: 'Save a copy'}, {icon: Edit, label: 'Save as draft'}, {type: 'divider'}, {icon: Archive, label: 'Save and archive'}, ]}
isDisabled
/>
<SplitButton
label="Save"
variant="primary"
size="md"
items={[ {icon: Copy, label: 'Save a copy'}, {icon: Edit, label: 'Save as draft'}, {type: 'divider'}, {icon: Archive, label: 'Save and archive'}, ]}
icon={Save}
/>
<SplitButton
label="Save"
variant="primary"
size="md"
items={[ {icon: Copy, label: 'Save a copy'}, {icon: Edit, label: 'Save as draft'}, {type: 'divider'}, {icon: Archive, label: 'Save and archive'}, ]}
isLoading
/>

A directly-clickable primary action paired with an attached chevron toggle that opens a menu of related actions.

PropTypeDefaultDescription
childrenReactNode—Compound menu content (<DropdownMenuItem>), an alternative to items.
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the primary action button.
hasAutoFocusbooleantrueWhether to auto-focus the first menu item on open.
iconIconComponent—Icon rendered before the primary action's label.
isDisabledboolean—Whether both the primary action and the menu toggle are disabled.
isMenuOpenboolean—Controlled open state of the menu.
itemsReadonlyArray<DropdownMenuOption>—Data-driven menu items (alternative to children).
label*string—Visible text for the primary action. Also used as the group's accessible label.
menuLabelstring'More actions'Accessible label for the chevron toggle that opens the menu.
menuWidthnumber | string—Width of the menu surface.
onOpenChange(isOpen: boolean) => void—Called when the menu open state changes.
refRef<HTMLElement>—Ref forwarded to the primary action button.
size"sm" | "md" | "lg"'md'Default size for both buttons.
styleCSSProperties—Inline styles applied to the root element.
variantButtonProps['variant']'secondary'Visual style variant shared by both buttons.
formstring—HTML form attribute associating the button with a <form> by ID.
idstring—HTML id attribute applied to the root element.
aria-controlsstring—Identifies the element(s) whose contents are controlled by the button.
aria-describedbystring—Identifies the element(s) that describe the button.
aria-detailsstring—Identifies the element that provides a detailed description.
aria-expandedboolean—Indicates whether a controlled element is expanded or collapsed.
aria-haspopupboolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'—Indicates the button opens an interactive popup element.
aria-keyshortcutsstring—Keyboard shortcuts that activate or focus the button.
aria-labelledbystring—Identifies the element(s) that label the button.
onFocusFocusEventHandler<HTMLElement>—Focus event handler for the root element.
onKeyDown(event: KeyboardEvent<HTMLElement>) => void—Keyboard event handler for the root element.
onPointerEnterPointerEventHandler<HTMLElement>—Pointer enter event handler for the root element.
onClickMouseEventHandler<HTMLElement>—Click event handler.
endContentReactNode—Content rendered after the label, such as a badge or count. Hidden in icon-only mode.
isLoadingboolean—Whether the button is in a loading state. Shows a spinner overlay, disables interaction, and announces "Loading" to assistive technologies.
startContentReactNode—Arbitrary content rendered before the label (after the icon, if present). Hidden in icon-only mode.