{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "navbar-user-menu", "type": "registry:ui", "title": "Navbar User Menu", "description": "A navigation bar with user avatar, dropdown menu, and notification bell.", "dependencies": [ "lucide-react" ], "registryDependencies": [ "button", "avatar", "dropdown-menu" ], "files": [ { "path": "registry/ruixenui/navbar-user-menu.tsx", "content": "\"use client\";\n\nimport * as React from \"react\";\nimport Link from \"next/link\";\nimport { Bell, ChevronDown, LogOut, Settings, User } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\n\nexport interface NavbarUserMenuProps {\n logo?: React.ReactNode;\n links?: { label: string; href: string; active?: boolean }[];\n user?: {\n name: string;\n email: string;\n avatar?: string;\n initials?: string;\n };\n notificationCount?: number;\n onLogout?: () => void;\n className?: string;\n}\n\nexport default function NavbarUserMenu({\n logo = Logo,\n links = [\n { label: \"Dashboard\", href: \"#\", active: true },\n { label: \"Projects\", href: \"#\" },\n { label: \"Team\", href: \"#\" },\n ],\n user = {\n name: \"John Doe\",\n email: \"john@example.com\",\n initials: \"JD\",\n },\n notificationCount = 0,\n onLogout,\n className,\n}: NavbarUserMenuProps) {\n return (\n \n \n \n \n {logo}\n \n \n {links.map((link) => (\n \n {link.label}\n \n ))}\n \n \n \n \n \n {notificationCount > 0 && (\n \n {notificationCount > 9 ? \"9+\" : notificationCount}\n \n )}\n \n \n \n \n \n \n \n {user.initials}\n \n \n {user.name}\n \n \n \n \n \n {user.name}\n {user.email}\n \n \n \n \n Profile\n \n \n \n Settings\n \n \n \n \n Log out\n \n \n \n \n \n \n );\n}\n", "type": "registry:ui", "target": "components/ruixen/navbar-user-menu.tsx" } ] }
{user.name}
{user.email}