shadcn.io is not affiliated with official shadcn/ui
Dropdown Menu examples · Standard
Dropdown with Groups and Labels Dropdown Menu for React
A menu split into labeled My Account and Team groups, with log out at the end.
Long menus turn into walls of options. This dropdown menu sorts its rows into two labeled groups, My Account (Profile, Billing, Settings) and Team (Team Members, Support), with a destructive Log out set apart at the end. It fits account menus, workspace menus and any menu with more than one kind of action.
Preview
Installation
FAQ
How are My Account and Team split?
Each is a DropdownMenuGroup that starts with its DropdownMenuLabel, with a DropdownMenuSeparator between them. A separator also sits under My Account's label, and another before Log out.
Which icon is on each row?
A user for Profile, a card for Billing, a gear for Settings, people for Team Members, a life buoy for Support and an arrow for Log out, each aria-hidden before the label.
How is Log out marked?
variant="destructive" on its DropdownMenuItem, outside both groups. It colors the row and doesn't confirm anything.
Is My Account a command?
No. A DropdownMenuLabel names its group: it can't be focused or picked, and the arrow keys skip it.
Related
- Simple Dropdown with Icons Dropdown MenuA short menu behind a dots button with an
- Account Settings Dropdown Dropdown MenuAn account menu opened from the user's
- Mixed Features Dropdown Dropdown MenuA File menu that mixes actions with
- Dropdown with Shortcuts Dropdown MenuA file and clipboard menu behind a menu
- Context Menu with LabelsA context menu with My Account and
- Dropdown with Checkboxes Dropdown MenuA View menu of checkbox rows that show or