Profile Menu
A photo with its verified tick, name, handle, email and plan, then Dark Mode, the places you go from here, your other accounts with Add Account, and Logout. Switching accounts shows its own busy and error state, and the whole menu works from the keyboard with type-ahead.
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 Layro's Profile Menu for this.
Install it: npx shadcn@latest add @layro/profile-menu
(the @layro registry is set up in components.json, with LAYRO_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 @layro registry with your CLI token: see the Namespaced tab.
Usage
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.
| Prop | Type | Notes |
|---|---|---|
userrequired | ProfileUser | — |
avatar | React.ReactNode | Replaces the avatar in the trigger and the header. |
plan | string | The plan, as a pill in the header: "Pro". Leave out for none. |
theme | ThemeSetting | — |
defaultTheme | ThemeSetting | — |
onThemeChange | (theme: ThemeSetting) => void | — |
hideTheme | boolean | Hide the Dark Mode row. |
items | ProfileMenuItemConfig[] | The plain rows. Default Activity, Integrations, Settings. |
onNavigate | (id: string) => void | — |
accounts | ProfileAccount[] | Your other signed-in accounts, listed above Add Account. |
onSwitchAccount | (id: string, account: ProfileAccount) => void | Promise<void> | May return a promise; the row waits for it and shows any error. |
onAddAccount | () => void | Leave out to hide Add Account. |
onSignOut | () => void | Promise<void> | — |
onSignOutEverywhere | () => void | Promise<void> | Leave out to hide "Sign out of all devices". |
sessions | { count: number; devices?: number } | What "all devices" covers, for its label and the consequence line. |
version | string | Footer: "v.1.5.69". |
legal | { label: string; href: string } | Footer link: Terms & Conditions. |
open | boolean | — |
defaultOpen | boolean | — |
onOpenChange | (open: boolean) => void | — |
align | "start" | "end" | Which edge of the trigger the panel lines up with. Default `end`. |
variant | "avatar" | "full" | `avatar` (default) is the round button; `full` adds the name and email, for a sidebar. |
defaultView | "main" | "signout" | The view it opens on first. Default `main`. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themeavatarStates
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
Lifetime access
Every component, and everything we ship next.
- All 232 components, source included
- Every template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.