Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Navigation

User Menu

Navigation

User Menu React component for Tailwind CSS v4

TopbarWorkspace Switcher
Live props
Appearance
trigger
size
State
theme
defaultOpen
Content
addAccountLabel
accountsLabel
manageHref
manageLabel
signOutLabel
sheetTitle
backLabel
Layout
side
align
Behavior
responsive
shortcut
Code
import { UserMenu } from "@/components/ui/user-menu"

<UserMenu />
  1. Home
  2. Components
  3. Navigation
  4. User Menu
Pro

User Menu React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

A React user menu: profile header, theme switch, account links, other accounts and sign out, as a dropdown or a bottom sheet on phones.

Click the avatar (or the card in a sidebar footer, or the compact avatar and first name) and the menu grows out of it: a profile header with the plan badge and a Manage account button, a Light / Dark / System row whose raised thumb slides to the pick, your links, the other signed-in accounts and Sign out. Picking a theme keeps the menu open. Picking another account spins its row until the switch finishes, then the menu closes; Sign out spins and stays open until your promise settles (a rejection only stops the spinner). Keyboard: Enter, Space or Down on the trigger opens it on the first row, Up / Down move through every row including the three theme options, Right opens a submenu (Language), Left closes it, typing a letter jumps to a row, item shortcuts (Mod+,) run while it is open, Escape closes and focus returns to the trigger. A shortcut prop opens it from anywhere. In a collapsed sidebar the card shrinks to the avatar. On a phone the menu is a bottom sheet: a centered profile card, the theme as a full-width segmented control, 48px rows, submenus that push in from the right with a Back row, and a handle to drag it away.

User Menu is a Pro React component in the React navigation components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add user-menu, together with Avatar, Badge, Button, Drawer, Dropdown Menu and 8 more and the npm packages lucide-react and motion.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add user-menu

User Menu is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans

Usage

Import UserMenu from @/components/ui/user-menu.

"use client"

import { CreditCard, Settings, User } from "lucide-react"
import { useTheme } from "next-themes"
import { UserMenu, type UserMenuTheme } from "@/components/ui/user-menu"

export function AccountMenu({ onSignOut }: { onSignOut: () => Promise<void> }) {
  const { theme, setTheme } = useTheme()
  return (
    <UserMenu
      user={{ name: "Emma Carter", email: "emma.carter@northwind.com", avatar: "/avatars/emma.jpg", plan: "Pro", status: "online" }}
      theme={theme as UserMenuTheme}
      onThemeChange={setTheme}
      themeLabels={{ title: "Theme" }}
      manageHref="/settings/profile"
      manageLabel="Manage account"
      items={[
        { label: "Profile", icon: <User />, href: "/settings/profile" },
        { label: "Settings", icon: <Settings />, shortcut: "mod+,", href: "/settings" },
        { label: "Billing", icon: <CreditCard />, badge: "Pro", href: "/settings/billing" },
      ]}
      signOutLabel="Sign out"
      onSignOut={onSignOut}
    />
  )
}

Props

  • userdefault "{ name: "Emma Carter", email: "emma.carter@northwind.com" }"
    UserMenuUser

    The signed-in person: { id?, name, email?, avatar?, status?: "online" | "offline" | "busy" | "away", plan?: ReactNode, role?: ReactNode }. Without a photo the avatar shows initials on a color from the name; long names truncate and keep the full name in a tooltip.

  • itemsdefault "[]"
    MenuEntry[]

    Rows between the header and the accounts, in dropdown-menu's entry format: items ({ label, icon, description, shortcut, badge, href, onSelect, tone, disabled, keepOpen }), submenus, checkboxes, radio sets, groups, labels and separators. href items render through NavLink (the app's router link).

  • triggerdefault "avatar"
    "avatar" | "card" | "compact" | ReactNode

    avatar: an avatar button for top bars. card: avatar, name, email and an up-down chevron filling the width, for sidebar footers; inside a collapsed sidebar (data-collapsed="true" on a group/sidebar parent) only the avatar stays. compact: avatar, first name and a chevron. Any element works too (it gets the trigger props). For custom compositions use UserMenuTrigger (see Parts).

  • sizedefault "md"
    "sm" | "md"

    The trigger avatar: 32 / 40px (card 28 / 32px, compact 24 / 32px). Every size has a 44px hit area on touch.

  • themedefault "system"
    "light" | "dark" | "system"

    The current theme. Pass next-themes' theme here; left out, the row starts on system and keeps its own state.

  • onThemeChange
    (theme: UserMenuTheme) => void

    Shows the theme row (Light / Dark / System) and fires on every pick. Wire next-themes: const { theme, setTheme } = useTheme().

  • themeLabels
    { title?: string; light?: string; dark?: string; system?: string }

    The theme row's heading and option labels; each one falls back to English: { title: "Theme", light: "Light", dark: "Dark", system: "System" }.

  • accounts
    UserMenuUser[]

    Other signed-in accounts. They are listed under the current one (which gets a check), each switchable.

  • onAccountChange
    (account: UserMenuUser) => (void | Promise<unknown>)

    Picking another account. Return a promise and its row spins while the menu stays open, then the menu closes.

  • onAddAccount
    () => void

    Shows an Add account row under the accounts.

  • addAccountLabeldefault "Add account"
    string

    The Add account row's label.

  • accountsLabeldefault "Accounts"
    string

    The heading above the accounts.

  • manageHrefdefault ""
    string

    Shows a Manage account button under the profile header that links here (through the router link).

  • onManage
    () => void

    Shows the Manage account button and runs on press (with or without manageHref).

  • manageLabeldefault "Manage account"
    string

    The Manage account button's label.

  • onSignOut
    () => (void | Promise<unknown>)

    Shows the red Sign out row. Return a promise to keep the menu open with a spinner on the row until it settles; a rejection stops the spinner and leaves the menu open.

  • signOutLabeldefault "Sign out"
    string

    The sign-out row's label.

  • sidedefault "auto"
    "auto" | "top" | "right" | "bottom" | "left"

    Where the menu opens. auto: below the trigger, or above it for the card trigger (sidebar footers). It flips when there is no room; on phones (below 768px, with responsive off) left and right fall back to auto.

  • aligndefault "auto"
    "auto" | "start" | "center" | "end"

    Alignment against the trigger. auto: end (the avatar sits at the end of a top bar), start for the card trigger.

  • open
    boolean

    Controlled open state; pair it with onOpenChange.

  • defaultOpendefault false
    boolean

    Starts open (uncontrolled).

  • onOpenChange
    (open: boolean) => void

    Fires when the menu or the sheet opens or closes.

  • responsivedefault true
    boolean

    Below 768px the menu becomes the account sheet. Off: the dropdown on every screen.

  • sheetTitledefault "Account"
    string

    The phone sheet's title, read by screen readers (it is not shown).

  • backLabeldefault "Back"
    string

    The back row of a submenu page in the phone sheet.

  • shortcutdefault ""
    string

    A key combo in mod+k notation that opens and closes the menu from anywhere (e.g. shift+mod+u); the trigger gets aria-keyshortcuts. Empty binds nothing.

  • triggerLabeldefault "(name) => "Account menu, " + name"
    (name: string) => string

    The trigger's accessible name.

  • linkComponent
    (props: LinkComponentProps) => ReactNode

    The router link for href items and the manage link. Default: the one set with LinkProvider, else a plain <a>.

  • container
    HTMLElement | null

    Portal target for the menu and the sheet (default document.body).

  • classNames
    Partial<Record<"trigger" | "avatar" | "name" | "email" | "chevron" | "content" | "header" | "headerAvatar" | "plan" | "manage" | "theme" | "item" | "accounts" | "addAccount" | "signOut", string>>

    Extra classes for the inner parts.

  • className
    string

    Extra classes for the built-in trigger, merged last.

Parts

  • UserMenuTrigger

    component

    The built-in trigger alone, for custom compositions: another menu, a popover or a link to the profile page. Takes every button prop plus the ones below.

    • userdefault "{ name: "Emma Carter", email: "emma.carter@northwind.com" }"
      UserMenuUser

      The person shown: name, email, avatar, status, plan and role.

    • variantdefault "avatar"
      "avatar" | "card" | "compact"

      An avatar button, a full-width card with name and email for sidebar footers, or avatar plus first name.

    • sizedefault "md"
      "sm" | "md"

      The avatar at 32 / 40px (card 28 / 32px, compact 24 / 32px).

    • triggerLabeldefault "(name) => "Account menu, " + name"
      (name: string) => string

      The accessible name.

    • classNames
      Partial<Record<"avatar" | "name" | "email" | "chevron", string>>

      Extra classes for the inner parts.

  • UserMenuUser

    type

    The signed-in person or another account: { id?, name, email?, avatar?, status?, plan?, role? }. id defaults to the email, then the name.

  • UserMenuEntry

    type

    One entry of items, the same type as the dropdown menu: an item (a link or an action, with icon, shortcut and badge), a checkbox, a radio group, a submenu, a group, a label or a separator.

Examples

Sidebar footer

The card trigger in a collapsed rail (avatar only, the menu opens to the right) and in an expanded sidebar.

Compact trigger in a top bar

Avatar and first name next to search and notifications; the theme row switches this page.

Several accounts

Switch between signed-in accounts with a 700ms spinner on the row, plus Add account.

Custom items, no theme row

Groups, a checkbox and an action; without onThemeChange the theme row stays out.

Phone: the account sheet

What the menu becomes below 768px: a profile card, a segmented theme control and sheet rows.

Small, localized, with a shortcut

size sm in a dense bar, custom labels and aria-label, opened with Shift+Mod+U.

Dependencies

lucide-reactmotionavatarbadgebuttondrawerdropdown-menusegmented-controlspinneruse-controllable-stateuse-media-queryuse-shortcutmotionnavigationui-config

Files

  • components/ui/user-menu.tsx

FAQ

Is the React User Menu component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install User Menu?

Run npx wingo-ui@latest add user-menu. It also adds the Wingo UI items it builds on (Avatar, Badge, Button, Drawer, Dropdown Menu and 8 more) and the npm packages lucide-react and motion. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/user-menu.

How does User Menu behave on phones?

Below 768px the menu becomes the account sheet. Off: the dropdown on every screen. The responsive prop controls this and is on by default.

See also

Dropdown MenuAvatarSidebarDrawerSegmented Control

Used in

Admin ShellMarketplace Shell

More React navigation components

Nav MenuBack To TopCommand MenuGlobal SearchNav TabsPagination
All 19 React navigation components
PreviousTopbarNext Workspace Switcher
NNorthwind CRM
Home
HomeClientsOffersInvoicesSettings

Good morning, Emma

You have 3 overdue invoices and 12 open offers.

Collected in September$48,920.00+12% vs. August
Overdue invoices3$12,480.00
Open offers12#OF-2026-118
Open the account menusheet “Account” · back “Back” · manage onManageside auto · align autosheet on phones