Split Button
A connected primary action and secondary action or menu trigger.
A split button lets someone perform a primary action immediately or choose a closely related alternative from a secondary action, usually a dropdown menu.
Import
Section titled “Import”import { SplitButton } from "@zentara-co/zenos-ui";Composition
Section titled “Composition”Place the primary Button first and an IconButton or menu trigger second. Apply the same visual variant to both actions. SplitButton connects their borders and corners without hiding either action from the native tab order.
Use a specific accessible label for the secondary action, such as “More publish options,” rather than repeating the primary label.
Shared and custom variants
Section titled “Shared and custom variants”Set variant on SplitButton to keep both actions consistent without repeating the prop. variantClassName defines a consumer-owned appearance and is inherited by actions that do not override the group variant.
The split button passes its size to buttons and icon buttons that do not set their own size.
Motion
Section titled “Motion”Pressed scaling is disabled by default for Button and IconButton children. Scaling individual halves can make the connected control look as though its border is separating. The pressed color still provides immediate feedback.
An individual action can opt back into motion when the composition calls for it:
<SplitButton label="Create options"> <Button disableMotion={false}>Create</Button> <IconButton aria-label="More create options" disableMotion={false}> <CaretDownIcon /> </IconButton></SplitButton>Disabled state
Section titled “Disabled state”Set disabled on the split button when neither action is available. Loading remains a state of an individual action.
Sizes
smmdlg SplitButton.Root
API
| Prop | Type | Default | Description |
|---|---|---|---|
variant | ButtonVariant | custom string | default | Visual treatment inherited by actions without an override. |
variantClassName | string | — | Variant classes inherited by actions using the group variant. |
size | sm | md | lg | md | Size inherited by split actions. |
disabled | boolean | false | Disables both split actions. |
Button / IconButton.disableMotion | boolean | true inside SplitButton | Pressed motion is disabled for connected actions by default. Set false on an individual action to enable it. |
label | string | — | Accessible group name used when aria-label is omitted. |
aria-label | string | — | Accessible group name. |
native props | React.HTMLAttributes<HTMLDivElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”SplitButton renders an accessible group. The primary and secondary actions remain separate native controls and separate tab stops. Preserve the dropdown menu’s own trigger, focus, and keyboard behavior when using one as the secondary action.