shadcn.io is an independent project built on shadcn/ui
The avatar opens the name and email, Profile and Settings, three checkbox preferences, and a destructive Log out. The toggles are email, push, and auto-save.
Use it when a few settings are flipped often enough to sit in the account menu. Put rare ones on the page with a Switch. In Svelte, Ark UI does not save those ticks or sign the user out.
Installation
Anatomy

Usage
<DropdownMenu><DropdownMenuTrigger>{#snippet asChild(props)}<Button {...props({ "aria-label": "Open account menu" })} pill size="icon-lg" variant="ghost"><Avatar><AvatarImage alt="@shadcn" src="https://github.com/shadcn.png" /><AvatarFallback>CN</AvatarFallback></Avatar></Button>{/snippet}</DropdownMenuTrigger><DropdownMenuContent class="w-64"><DropdownMenuGroup><DropdownMenuLabel class="font-normal"><div class="flex flex-col gap-1"><p class="font-medium text-foreground text-sm leading-none">shadcn</p><p class="text-muted-foreground text-xs leading-none">m@example.com</p></div></DropdownMenuLabel><DropdownMenuSeparator /><DropdownMenuItem value="profile"><UserIcon aria-hidden="true" />Profile</DropdownMenuItem><DropdownMenuItem value="settings"><SettingsIcon aria-hidden="true" />Settings</DropdownMenuItem></DropdownMenuGroup><DropdownMenuSeparator /><DropdownMenuGroup><DropdownMenuLabel>Quick Preferences</DropdownMenuLabel><DropdownMenuCheckboxItem checked={emailNotifications} onCheckedChange={setEmailNotifications} value="email-notifications">Email Notifications</DropdownMenuCheckboxItem><DropdownMenuCheckboxItem checked={pushNotifications} onCheckedChange={setPushNotifications} value="push-notifications">Push Notifications</DropdownMenuCheckboxItem><DropdownMenuCheckboxItem checked={autoSave} onCheckedChange={setAutoSave} value="auto-save">Auto-save</DropdownMenuCheckboxItem></DropdownMenuGroup><DropdownMenuSeparator /><DropdownMenuItem value="log-out" variant="destructive"><LogOutIcon aria-hidden="true" />Log out</DropdownMenuItem></DropdownMenuContent></DropdownMenu>FAQ
Which quick preferences start on?
Email Notifications and Auto-save start checked; Push Notifications starts off. Each row keeps its own state, so any of them can be on together.
Each DropdownMenuCheckboxItem takes checked, onCheckedChange, which receives a boolean, and a value.
What are the rows that are not checkboxes?
Profile and Settings, under the header, and Log out at the end with variant="destructive". They're plain items with an aria-hidden icon each.
What is the trigger?
A round ghost Button (pill, size="icon-lg") holding the user's Avatar, with aria-label set to Open account menu.
What is in the header, and where does the menu open?
A DropdownMenuLabel with the name, shadcn, over m@example.com. The menu is w-64 and lines up with the end of the avatar button, since the avatar usually sits at the end of a navbar.
API Reference
Dropdown Menu
Sets value="profile", value="settings", checked={emailNotifications}, onCheckedChange={setEmailNotifications}, value="email-notifications" and checked={pushNotifications}. The rest is on the Dropdown Menu page.
Button
Sets props, aria-label, Open, account, menu and pill. The rest is on the Button page.
Avatar
Sets alt="@shadcn" and src="https://github.com/shadcn.png". The rest is on the Avatar page.






