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 Svelte, Ark UI does not sign the user out.
Installation
Anatomy

Usage
<DropdownMenu><DropdownMenuTrigger>{#snippet asChild(props)}<Button {...props({ "aria-label": "More options" })} size="icon-md" variant="outline"><MoreHorizontalIcon aria-hidden="true" /></Button>{/snippet}</DropdownMenuTrigger><DropdownMenuContent class="w-40"><DropdownMenuItem value="profile"><UserIcon aria-hidden="true" />Profile</DropdownMenuItem><DropdownMenuItem value="settings"><SettingsIcon aria-hidden="true" />Settings</DropdownMenuItem><DropdownMenuItem value="help"><CircleHelpIcon aria-hidden="true" />Help</DropdownMenuItem><DropdownMenuItem value="log-out" 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 value="profile", value="settings", value="help", value="log-out" and variant="destructive". The rest is on the Dropdown Menu page.
Button
Sets props, aria-label, More, options, size="icon-md" and variant="outline". The rest is on the Button page.



