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.
formstringHTML form attribute associating the button with a <form> by ID.
idstringHTML id attribute applied to the root element.
aria-controlsstringIdentifies the element(s) whose contents are controlled by the button.
aria-describedbystringIdentifies the element(s) that describe the button.
aria-detailsstringIdentifies the element that provides a detailed description.
aria-expandedbooleanIndicates whether a controlled element is expanded or collapsed.
aria-haspopupboolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'Indicates the button opens an interactive popup element.
aria-keyshortcutsstringKeyboard shortcuts that activate or focus the button.
aria-labelledbystringIdentifies the element(s) that label the button.
onFocusFocusEventHandler<HTMLElement>Focus event handler for the root element.
onKeyDown(event: KeyboardEvent<HTMLElement>) => voidKeyboard event handler for the root element.
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.