X Enterprises
Layout

LayoutUserMenu

Header-level user dropdown with avatar, name, email, theme switcher, and configurable menu actions.

LayoutUserMenu

Header-level user dropdown. Renders an avatar button (or icon + name fallback) that opens a dropdown with an info header, theme switcher, settings link, and logout link. Integrates with useXNavigation automatically.

Components

<XALayoutUserMenu />

Header-level user dropdown. Renders an avatar button (or icon + name fallback) that opens a dropdown with an info header, theme switcher, settings link, and logout link.

<XALayoutUserMenu
  name="Jane Doe"
  email="jane@example.com"
  avatar="/avatar.png"
  settings-path="/account"
  logout-path="/auth/logout"
/>

Props

PropTypeDefaultDescription
nameString''Display name
emailString''Email address
avatarString''Avatar image URL
showAvatarBooleantrueShow avatar vs. icon+name fallback
showThemeSwitcherBooleantrueInclude theme toggle in dropdown
settingsPathString'/settings'Route for settings menu item
logoutPathString'/auth/logout'Route for logout menu item
itemsArray[]Additional dropdown menu items
useNavigationBooleantrueMerge config from useXNavigation composable

AI Context

component: XALayoutUserMenu
package: "@xenterprises/nuxt-x-app"
auto-import: true
prefix: XA
use-when: User account dropdown in the header; XALayoutHeader composes this automatically — use directly only when building a custom header
patterns:
  - Use items array to add extra menu entries above the built-in settings and logout links.
  - showAvatar false renders an icon + name button instead of the avatar circle.
Copyright © 2026