Split Button
A two-part button: the main side runs the default action, the arrow opens related ones.
<button> + <button aria-haspopup="menu">When to use it
When there is a clear default with alternatives: Save / Save as.
Common mistake
Without a clear default, use a dropdown menu.
Accessibility
Label both parts separately so each is announced.
Name in code
| HTML/CSS | <button> + <button aria-haspopup="menu"> |
|---|---|
| React | ButtonGroup + DropdownMenu |
| Jetpack Compose | SplitButtonLayout (M3 Expressive) |
| SwiftUI | Menu(primaryAction:) |
Ready prompt for your coding agent
Add a Split Button to this screen.
What it is: A two-part button: the main side runs the default action, the arrow opens related ones.
Implement with: <button> + <button aria-haspopup="menu"> (HTML/CSS).
Accessibility: Label both parts separately so each is announced.
When to use it: When there is a clear default with alternatives: Save / Save as.
Avoid: Without a clear default, use a dropdown menu.
Reuse the project's existing design tokens, spacing and component conventions.
Or compose a whole page from this element and others →
Prompts are in English for the most precise results with coding agents.