The account key at the end of an app bar: workspace and avatar on a two-part trigger, and a panel that unrolls under a leader with who's signed in, a workspace switch, a month of token use, the CLI login line, links under one gliding highlight, a theme switch and sign out.
pnpm dlx shadcn@latest add @beautiful-ui-pro/user-menuNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { UserMenu, type UserMenuTheme, type UserMenuWorkspace } from "@/components/ui/notchset/user-menu";
const workspaces: UserMenuWorkspace[] = [
{ id: "relay", name: "Relay", env: "PROD", slug: "relay", agents: "12 AGENTS" },
{ id: "relay-staging", name: "Relay", env: "STAGING", slug: "relay-staging" },
];
export function AccountMenu({ openProfile, signOut }: { openProfile: () => void; signOut: () => void }) {
const [workspace, setWorkspace] = React.useState("relay");
const [theme, setTheme] = React.useState<UserMenuTheme>("system");
return (
<UserMenu
user={{ name: "Maya Kerr", initials: "MK", role: "OWNER · 2FA ON" }}
workspaces={workspaces}
workspace={workspace}
onWorkspaceChange={setWorkspace}
links={[{ id: "profile", label: "PROFILE", hint: "⌘P", onSelect: openProfile }]}
theme={theme}
onThemeChange={setTheme}
onSignOut={signOut}
/>
);
}user / session–
{ name, initials, role? } / { device, expires }The identity cells.
workspaces / workspace / onWorkspaceChange–
{ id, name, env, slug, agents? }[] / string / fnThe switch; also shown on the trigger.
usage–
{ daily, used, cap, days?, marker?, title?, axis? }The lollipop plot of daily use.
cliCommand–
(slug) => stringThe CLI line with Copy.
links–
{ id, label, hint?, onSelect? }[]The link rows.
theme / onThemeChange–
"light" | "system" | "dark" / fnThe theme switch; apply it to your app (data-theme).
onSignOut–
() => PromiseSign out shows its scanner until this settles, then closes.
components/ui/notchset/user-menu.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.