Skip to content

Split Button

Free

A button with the main action in front and its close variants behind a small arrow. The last pick from the menu becomes the main action.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 17, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Put the main action, its arrow, and the menu in SplitButton. A SplitButtonOption pick becomes the main action; a plain MenuItem runs once.

merge-button.tsx

SplitButton

<div>
PropTypeDefaultDescription
classNamestring—
variant"default""outline""secondary""default"The look of both parts. Default default.
tone"destructive"—destructive: the soft red look of a risky action (Delete 3 files). Wins over variant.
size"default""lg""sm""xs""default"The row size of both parts. Default default (32px).
valuestring—The main action now: the value of the SplitButtonOption that the last pick made the main one. The app saves it (per user, per page) to remember the last pick.
defaultValuestring—
onValueChange—
openboolean—The menu is open (controlled), with defaultOpen and onOpenChange.
defaultOpenbooleanfalse
onOpenChange—
onAction—Runs on a press of the action, with the main value. A promise shows the action busy (spinner, no second run, the arrow off), then done for 1.2 s; a rejection shows an error Toast.
labels—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

SplitButtonAction

<button>
PropTypeDefaultDescription
classNamestring—
glass"clear""dark""light"—
rounded"default""full"—
children—The words of the main action. A function gets the main value and the status, so the label can follow the last pick and say "Publishing" and "Published".
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

SplitButtonTrigger

<button>
PropTypeDefaultDescription
aria-labelRequiredstring—Defines a string value that labels the current element. Name the menu: "More ways to publish". The arrow has no text of its own.
classNamestring—
childrenReactNode—
From Base UIMenu.TriggerBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
handleMenuHandle<unknown>—A handle to associate the trigger with a menu.
payloadunknown—A payload to pass to the menu when it is opened.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

SplitButtonContent

<div>
PropTypeDefaultDescription
classNamestring—
arrowboolean—Show an arrow that points at the trigger. The gap grows from 4px to 8px.
backdropboolean—Put a clear layer under the popup (Base UI Menu.Backdrop), for example to dim it.
portalProps—Other Base UI props of the inner parts. A className here adds to the component classes.
positionerProps—
backdropPropsPopupPartProps<MenuBackdropProps>—
arrowPropsPopupPartProps<MenuArrowProps>—
From Base UIMenu.PopupBase UI docs
childrenReactNode—
idstring—
finalFocus—Determines the element to focus when the menu is closed. - false: Do not move focus. - true: Move focus based on the default behavior (trigger or previously focused element). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, or false/undefined to do nothing.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

SplitButtonOptions

<div>
PropTypeDefaultDescription
classNamestring—
From Base UIMenu.RadioGroupBase UI docs
childrenReactNode—The content of the component.
defaultValueany—The uncontrolled value of the radio item that should be initially selected. To render a controlled radio group, use the value prop instead.
disabledbooleanfalseWhether the component should ignore user interaction.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

SplitButtonOption

<div>
PropTypeDefaultDescription
classNamestring—
valueRequiredstring—
From Base UIMenu.RadioItemBase UI docs
onClick—The click handler for the menu item.
disabledbooleanfalseWhether the component should ignore user interaction.
labelstring—Overrides the text used for keyboard text navigation and filtering. Falls back to the rendered text when not provided.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

SplitButtonOptionLabel

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

SplitButtonOptionDescription

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use it when one action is used most and 2 to 6 close variants of it are used less.
  • Use SplitButtonOptions when the user picks a way once and repeats it, such as a merge method.
  • Return a promise from onAction to show the busy state, then the done check for 1.2 s.
  • For actions that are not variants of one main action, use a Menu.
  • For two or three equal actions side by side, use a Button Group.
  • For one risky action that needs a confirm step, use a Hold Button.
TabMoves focus from the action to the arrow: the group has two tab stops.
EnterorSpaceOn the action: runs it. On the arrow: opens the menu.
AltArrowDownOn the action or the arrow: opens the menu.
ArrowUporArrowDownorHomeorEndIn the menu: moves between the items.
EscapeCloses the menu and moves focus back to the arrow.
Label swap
fade · 150ms · the old label rises and blurs out, the new one rises in, and the box glides to its width
Busy
animate-spin · a spinner takes the leading slot while the label stays
Menu
popup · the menu opens from the arrow, and the chevron turns 180°

Built with

Installs with Split Button

  1. AddedSplit Button, with Button, Button Group, Collapsible, Menu.
Open the release