User Menu
An avatar-triggered account menu with a profile header, links, a theme toggle and sign out.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
UserMenuProps
Also accepts all props of Omit<React.ComponentProps<"div">, "children">
| Prop | Type | Default | Description |
|---|---|---|---|
| user* required | { name: string; email: string; initials?: string } | — | — |
| links* required | UserMenuLink[] | — | — |
| theme | UserMenuTheme | — | Controlled theme |
| defaultTheme | UserMenuTheme | "system" | — |
| onThemeChange | (theme: UserMenuTheme) => void | — | — |
| onSignOut | () => void | — | — |
| align | "start" | "end" | "end" | — |
| defaultOpen | boolean | false | Render the menu open on mount (without moving focus) |
Install
$ npx shadcn@latest add https://chromotion.dev/r/user-menu.json