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
childrenReactNodeCompound menu content (<DropdownMenuItem>), an alternative to items.
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the primary action button.
hasAutoFocusbooleantrueWhether to auto-focus the first menu item on open.
iconIconComponentIcon rendered before the primary action's label.
isDisabledbooleanWhether both the primary action and the menu toggle are disabled.
isMenuOpenbooleanControlled open state of the menu.
itemsReadonlyArray<DropdownMenuOption>Data-driven menu items (alternative to children).
label*stringVisible 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 | stringWidth of the menu surface.
onOpenChange(isOpen: boolean) => voidCalled 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.
styleCSSPropertiesInline styles applied to the root element.
variantButtonProps['variant']'secondary'Visual style variant shared by both buttons.
onClickMouseEventHandler<HTMLElement>Click event handler.
endContentReactNodeContent rendered after the label, such as a badge or count. Hidden in icon-only mode.
isLoadingbooleanWhether the button is in a loading state. Shows a spinner overlay, disables interaction, and announces "Loading" to assistive technologies.
startContentReactNodeArbitrary content rendered before the label (after the icon, if present). Hidden in icon-only mode.