Skip to content
GetUrUI

User menus

3 variantsNew
.md

Three account menus — an avatar dropdown with workspace switcher and theme row, a sidebar footer menu that opens upward, and a searchable command-style profile menu — each springing from its trigger.

user menuaccountavatardropdownprofileworkspace switchersidebarcommandmenu

Avatar dropdown

avatar-dropdown.tsx

Top-bar avatar menu with a workspace switcher whose check glides between rows, a light/dark/system row and shortcut hints.

$npx shadcn@latest add @geturui/user-menus-avatar-dropdown
.zip
PropTypeDefaultDescription
name / emailstring—Shown in the trigger and menu header.
accounts{ id: string; name: string; plan: string }[]—Workspaces to switch between.
defaultAccountIdstring—Initially active workspace.
defaultTheme"light" | "dark" | "system""system"Local theme choice; nothing global changes.
onSelect(action: string) => void—"profile", "billing", "settings", "add-account" or "sign-out".
onAccountChange / onThemeChange(value) => void—Fire when a radio row changes.
align"start" | "end""end"Which edge the panel lines up with.
defaultOpenbooleanfalseRender open without moving focus.
classNamestring—Extra classes on the root element.

Command profile

command-profile.tsx

Profile menu with a search field: type to filter grouped actions, a highlight slides between rows and every action shows its shortcut.

$npx shadcn@latest add @geturui/user-menus-command-profile
.zip
PropTypeDefaultDescription
name / handlestring—Shown in the panel header; initials fill the avatar.
actions{ id; label; group; icon?; keys? }[]—Grouped, filterable actions.
onSelect(action: CommandProfileAction) => void—Click or Enter on an action.
defaultOpenbooleanfalseRender open without moving focus.
classNamestring—Extra classes on the root element.

Install the whole set

Installs every user menus variant at once. Each section above has its own command for a single variant.

$npx shadcn@latest add @geturui/user-menus
Download source (.zip)

Accessibility

  • Menus use roving focus: arrows move, Home and End jump, Enter activates, Escape closes and returns focus to the trigger, Tab closes.
  • Account and theme choices are menuitemradio items with aria-checked; the command menu is a combobox driving a listbox through aria-activedescendant.
  • Panels only fade when reduced motion is requested.