shadcn.io is an independent project built on shadcn/ui
An icon button opens New File, Copy, Cut, Paste, Search, and a destructive Delete. Each row prints a shortcut, from ⌘N to ⌘⌫. The demo does not listen for those keys.
Use it so people can learn the keys from the menu. If there is nothing to click, a Kbd hint is enough on its own. In Svelte, Ark UI only draws the shortcut.
Installation
Anatomy

Usage
<DropdownMenu><DropdownMenuTrigger>{#snippet asChild(props)}<Button {...props({ "aria-label": "Open menu" })} size="icon-md" variant="outline"><MenuIcon aria-hidden="true" /></Button>{/snippet}</DropdownMenuTrigger><DropdownMenuContent class="w-56"><DropdownMenuItem value="new-file"><FileTextIcon aria-hidden="true" />New File<DropdownMenuShortcut>⌘N</DropdownMenuShortcut></DropdownMenuItem><DropdownMenuSeparator /><DropdownMenuItem value="copy"><CopyIcon aria-hidden="true" />Copy<DropdownMenuShortcut>⌘C</DropdownMenuShortcut></DropdownMenuItem><DropdownMenuItem value="cut"><ScissorsIcon aria-hidden="true" />Cut<DropdownMenuShortcut>⌘X</DropdownMenuShortcut></DropdownMenuItem><DropdownMenuItem value="paste"><ClipboardPasteIcon aria-hidden="true" />Paste<DropdownMenuShortcut>⌘V</DropdownMenuShortcut></DropdownMenuItem><DropdownMenuSeparator /><DropdownMenuItem value="search"><SearchIcon aria-hidden="true" />Search<DropdownMenuShortcut>⌘F</DropdownMenuShortcut></DropdownMenuItem><DropdownMenuItem value="delete" variant="destructive"><Trash2Icon aria-hidden="true" />Delete<DropdownMenuShortcut>⌘⌫</DropdownMenuShortcut></DropdownMenuItem></DropdownMenuContent></DropdownMenu>FAQ
Which hints does this menu show?
New File ⌘N, Copy ⌘C, Cut ⌘X, Paste ⌘V, Search ⌘F and Delete ⌘⌫, each in a DropdownMenuShortcut at the end of the row. They only print the hint; bind the keys on the page so they work while the menu is closed.
How are the rows grouped?
Separators split them into New File; Copy, Cut and Paste; then Search and Delete. The menu is w-56.
What sits in front of each label?
A file, copy, scissors, clipboard, search or trash icon, aria-hidden, so the label carries the meaning.
What does the trigger look like?
An outline Button with size="icon-md", a menu icon and aria-label set to Open menu.
API Reference
Dropdown Menu
Sets value="new-file", value="copy", value="cut", value="paste", value="search" and value="delete". The rest is on the Dropdown Menu page.
Button
Sets props, aria-label, Open, menu, size="icon-md" and variant="outline". The rest is on the Button page.




