User Menu

About this component

User Menu

Topbar account menu: avatar trigger with name and email, dropdown with icon items, keyboard shortcuts, and a destructive sign-out row. Compact avatar-only mode for dense headers.

Usage

The import and the props worth knowing about, in one place.

import { UserMenu } from "@/components/beste/component/user-menu";
import { LogOut, Settings } from "lucide-react";

<UserMenu
  user={{ name: "Jordan Ellis", email: "[email protected]" }}
  items={[
    { id: "settings", label: "Settings", icon: Settings, shortcut: "⌘S" },
    { id: "logout", label: "Log out", icon: LogOut, destructive: true },
  ]}
  onSelect={(id) => console.log("selected:", id)}
/>

Keyboard and gestures

Every one of these is in the component already. They are listed because a props table cannot mention a gesture, so nothing else on this page can tell you they exist.

Enter / SpaceOpen the menu from the trigger.
Arrow keysMove through the items; separators and the header are skipped.
Type a letterJump to the next item starting with it.
EscapeClose and put focus back on the trigger.

Props

Read from the component's own type, so this cannot drift from what it accepts.

PropTypeDefaultDescription
user*UserMenuUser—
items*UserMenuItem[]—
onSelect(id: string) => void—
align"start" | "center" | "end"—
compactboolean—Hide the name/email column and show only the avatar (for dense topbars)
classNamestring—

More Dashboard components

View all Dashboard
Actions
A
Amara Okafor[email protected]
ScaleActive$4,820Jan 4, 2026
D
Diego Santos[email protected]
StarterTrial$0Feb 18, 2026
GrowthActive$2,140Nov 22, 2025
T
StarterChurned$380Aug 9, 2025
L
ScaleActive$6,390Mar 2, 2026
M
StarterTrial$0Feb 27, 2026

8 row(s)

Page 1 of 2