Dropdown Menu (Menu Button)
A button with a small arrow that drops down a list of actions.
Also known as: Menu Button
<button aria-haspopup="menu" aria-expanded>When to use it
For a set of related actions: export as PDF or Excel.
Common mistake
If it stores a chosen value, use a select instead.
Accessibility
Arrow keys move through items, Esc closes and returns focus to the button.
Name in code
| HTML/CSS | <button aria-haspopup="menu" aria-expanded> |
|---|---|
| React | <DropdownMenu> |
| Jetpack Compose | DropdownMenu |
| SwiftUI | Menu |
Ready prompt for your coding agent
Add a Dropdown Menu (Menu Button) to this screen.
What it is: A button with a small arrow that drops down a list of actions.
Implement with: <button aria-haspopup="menu" aria-expanded> (HTML/CSS).
Accessibility: Arrow keys move through items, Esc closes and returns focus to the button.
When to use it: For a set of related actions: export as PDF or Excel.
Avoid: If it stores a chosen value, use a select instead.
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.