shadcn.io is an independent project built on shadcn/ui
A dots button opens Profile, Settings, Help, and Log out, with an icon before each label. Log out uses the destructive color.
Use it for a short account menu on a card or a navbar. If Log out should be confirmed, open an Alert Dialog first. In React, Base UI does not sign the user out.
Installation
Anatomy

Usage
<DropdownMenu>
<DropdownMenuTrigger
render={
<Button aria-label="More options" size="icon-md" variant="outline" />
}
>
<MoreHorizontalIcon aria-hidden="true" />
</DropdownMenuTrigger>
<DropdownMenuContent className="w-40">
<DropdownMenuItem>
<UserIcon aria-hidden="true" />
Profile
</DropdownMenuItem>
<DropdownMenuItem>
<SettingsIcon aria-hidden="true" />
Settings
</DropdownMenuItem>
<DropdownMenuItem>
<CircleHelpIcon aria-hidden="true" />
Help
</DropdownMenuItem>
<DropdownMenuItem variant="destructive">
<LogOutIcon aria-hidden="true" />
Log out
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>FAQ
What is in this menu?
Four DropdownMenuItems, Profile, Settings, Help and Log out, each with an aria-hidden icon before the label. There are no groups or separators.
How is Log out marked?
variant="destructive" on its item colors it. It doesn't confirm anything; do that in its handler if you need to.
What does the trigger look like?
An outline Button with size="icon-md", a dots icon and aria-label set to More options, since it has no text.
How do I give the menu a fixed width?
Set a width class on the content part. The demo uses w-40; without one the menu sizes to its rows.
API Reference
Dropdown Menu
Sets variant="destructive". The rest is on the Dropdown Menu page.
Button
Sets aria-label="More options", size="icon-md" and variant="outline". The rest is on the Button page.



