Profile Menu

The account menu behind the avatar: who you are, your plan, and a safe way out.

PROGet Profile Menu and 168 other Pro components with pro lifetime — Get Pro

Category
Workspace
Access
Pro
Source
711 lines · one file
States
6 drawn
Added
21 Oct 2026

The decision inside it

Sign out everywhere is never one slip away

Logout opens one small step: Sign out is the main button, and Sign out of all devices sits under it, quieter, with what it ends written out ("Ends 4 sessions on 3 devices, including this one").

When to use it

Use Profile Menu for the avatar menu in a top bar or sidebar: who is signed in, the plan, Dark Mode, a few destinations, other accounts and a Logout step where Sign out of all devices is separate and explained. Use variant="full" in a sidebar.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Profile Menu for this.
Install it: npx shadcn@latest add @liro/profile-menu
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/profile-menu.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/account-menu.tsx
import { ProfileMenu } from "@/components/ui/profile-menu";

export function AccountMenu({ go, signOut, signOutEverywhere }: {
  go: (id: string) => void;
  signOut: () => Promise<void>;
  signOutEverywhere: () => Promise<void>;
}) {
  return (
    <ProfileMenu
      user={{ name: "Olivia Martinez", handle: "olivia", email: "olivia@vertically.com", verified: true }}
      plan="Pro"
      onNavigate={go}
      onSignOut={signOut}
      onSignOutEverywhere={signOutEverywhere}
      sessions={{ count: 4, devices: 3 }}
    />
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
userProfileUser Yes–
avatarReact.ReactNode NoReplaces the avatar in the trigger and the header.
planstring NoThe plan, as a pill in the header: "Pro". Leave out for none.
themeThemeSetting No–
defaultThemeThemeSetting No–
onThemeChange(theme: ThemeSetting) => void No–
hideThemeboolean NoHide the Dark Mode row.
itemsProfileMenuItemConfig[] NoThe plain rows. Default Activity, Integrations, Settings.
onNavigate(id: string) => void No–
accountsProfileAccount[] NoYour other signed-in accounts, listed above Add Account.
onSwitchAccount(id: string, account: ProfileAccount) => void | Promise<void> NoMay return a promise; the row waits for it and shows any error.
onAddAccount() => void NoLeave out to hide Add Account.
onSignOut() => void | Promise<void> No–
onSignOutEverywhere() => void | Promise<void> NoLeave out to hide "Sign out of all devices".
sessions{ count: number; devices?: number } NoWhat "all devices" covers, for its label and the consequence line.
versionstring NoFooter: "v.1.5.69".
legal{ label: string; href: string } NoFooter link: Terms & Conditions.
openboolean No–
defaultOpenboolean No–
onOpenChange(open: boolean) => void No–
align"start" | "end" NoWhich edge of the trigger the panel lines up with. Default `end`.
variant"avatar" | "full" No`avatar` (default) is the round button; `full` adds the name and email, for a sidebar.
defaultView"main" | "signout" NoThe view it opens on first. Default `main`.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-themeavatar

States

All of them are drawn by the component. None is left for you to design.

  • Closed
  • Open
  • Switching account
  • Confirm sign out
  • Signing out
  • Sign out failed

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances