SplitButton
atomCompound button pairing a primary action with a chevron dropdown for secondary actions. Each half is an independent button with its own hover lift and press ring. Composes the Menu molecule for dropdown keyboard navigation, positioning, and portal rendering. Supports all 7 variants and 5 sizes.
Variants
All seven variants with dropdown actions.
Sizes
Five sizes from 2xs to lg.
States
Loading and disabled states.
Usage
Installation
API Reference
SplitButton props — * required
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "primary" | "secondary" | "outline" | "ghost" | "danger" | "danger-outline" | "danger-ghost" | "primary" | Visual style of both button halves. |
size | "2xs" | "xs" | "sm" | "md" | "lg" | "md" | Height and padding scale. |
onClick | () => void | — | Callback for the primary (left) button click. |
menuItems* | Array<{ label: string; onSelect: () => void; disabled?: boolean; danger?: boolean; icon?: ReactNode }> | — | Items shown in the dropdown menu. |
leftIcon | ReactNode | — | Icon displayed before the primary label. |
disabled | boolean | false | Disables both halves. |
loading | boolean | false | Shows spinner on primary half and disables interaction. |
bordered | boolean | true | Adds visible border around the split button. |
menuPlacement | "bottom-start" | "bottom-end" | "top-start" | "top-end" | "bottom-end" | Preferred dropdown placement. |
children* | React.ReactNode | — | Primary button label. |