User menu
An avatar and name that open the account actions
WorkspaceMembersInvitations
Last action: none.
Usage
import { UserMenu, SidebarUserMenu } from "@gpuixui/components";
const user = { name: "Benji", email: "benji@example.com" };
<UserMenu
user={user}
onUpgrade={() => undefined}
onAccount={() => undefined}
onBilling={() => undefined}
onNotifications={() => undefined}
onLogOut={() => undefined}
/>;<SidebarFooter>
<SidebarUserMenu user={user} onLogOut={signOut} />
</SidebarFooter>;API
| Part | Renders | Props |
|---|---|---|
UserMenu | the trigger and its account menu | user, onUpgrade?, onAccount?, onBilling?, onNotifications?, onLogOut?, side?, align?, collapsed?, className?, testId?, menuTestId? |
SidebarUserMenu | UserMenu in SidebarMenu / SidebarMenuItem | the same, without collapsed (the sidebar supplies it) |
user is { name: string; email: string; avatar?: string }. Without avatar
the avatar paints the initials.
Edit this page on GitHubpackages/components/docs/user-menu.mdx