shadcn.io is not affiliated with official shadcn/ui
Button Group examples · Patterns
Overflow Menu Button Group for React
Action button groups that keep the main actions visible and move the rest into an overflow menu.
A row of actions with a More button at the end. The first group keeps Copy, Edit and Delete visible and puts Duplicate, Archive and Export behind an icon-only trigger. The second keeps only Copy and Edit, and its More trigger has a label.
Preview
Installation
FAQ
How does the menu trigger join the group?
The trigger is an outline Button inside the ButtonGroup, so it shares the border. DropdownMenuTrigger passes it in render.
What does each menu list?
The first lists Duplicate, Archive and Export. The second lists Delete, Archive, Move and Share, since Delete isn't in its row.
How is the icon-only More button named?
It has aria-label="More actions" and size="icon-sm". The second trigger says More, with the icon after it.
Do the actions do anything?
No. The buttons and menu items have no handler. Run each action from its button or its menu item.
How do I decide what goes in the menu?
Keep the actions people use most as buttons and move the rest. The Dropdown Menu can hold icons, separators and a destructive item.
Related
- Split Button with Dropdown Button GroupSplit buttons for Fork and Star, each a
- Simple Dropdown with Icons Dropdown MenuA short menu behind a dots button with an
- Bulk Actions Button GroupA row of bulk actions, Select All
- File Operations Button GroupDownload, Share, Edit and Delete in one
- Basic Button GroupThree rows of outline buttons joined into
- Contextual Toolbar Button GroupA formatting toolbar that appears when