Skip to content

UserMenu

UserMenu(props): Element | null

Defined in: packages/ui/src/components/user-menu.tsx:28

Header dropdown showing the current user’s avatar, name, email, role badges, and navigation links.

Reads the authenticated user via useCurrentUser() from @cfast/auth. Renders an AvatarWithInitials trigger and a dropdown with user info, RoleBadge chips, permission-filtered navigation links, and an optional sign-out button. Returns null when no user is authenticated.

UserMenuProps

See UserMenuProps.

Element | null

<UserMenu
links={[
{ label: "Profile", to: "/profile" },
{ label: "Admin", to: "/admin", action: adminAccess.client },
]}
onSignOut={() => signOut()}
/>