{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "animated-profile-menu-shadcnui", "type": "registry:component", "title": "Animated Profile Menu", "description": "Floating profile avatar that reveals quick action cards with smooth motion", "registryDependencies": [ "button" ], "dependencies": [ "framer-motion", "lucide-react", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/navigation/animated-profile-menu.tsx", "content": "\"use client\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { AnimatePresence, motion, type Variants } from \"framer-motion\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { ChevronRight, LogOut, Settings, TrendingUp, User } from \"lucide-react\";\nimport { useCallback, useId, useState } from \"react\";\n\ninterface MenuItem {\n id: number;\n icon: LucideIcon;\n title: string;\n description: string;\n}\n\nconst PROFILE_MENU_ITEMS: MenuItem[] = [\n {\n id: 1,\n icon: User,\n title: \"Profile\",\n description: \"View your details\",\n },\n {\n id: 2,\n icon: TrendingUp,\n title: \"Stats\",\n description: \"Track your activity\",\n },\n {\n id: 3,\n icon: Settings,\n title: \"Settings\",\n description: \"Manage preferences\",\n },\n {\n id: 4,\n icon: LogOut,\n title: \"Logout\",\n description: \"Sign out securely\",\n },\n];\n\nconst containerVariants: Variants = {\n hidden: { opacity: 0 },\n visible: {\n opacity: 1,\n transition: {\n staggerChildren: 0.1,\n delayChildren: 0.12,\n },\n },\n};\n\nconst itemVariants: Variants = {\n hidden: {\n opacity: 0,\n x: -16,\n scale: 0.94,\n },\n visible: {\n opacity: 1,\n x: 0,\n scale: 1,\n transition: { duration: 0.3, ease: \"easeOut\" },\n },\n exit: {\n opacity: 0,\n x: -16,\n scale: 0.92,\n transition: { duration: 0.18, ease: \"easeInOut\" },\n },\n};\n\nexport function AnimatedProfileMenu() {\n const [isOpen, setIsOpen] = useState(false);\n const menuId = useId();\n\n const toggleMenu = useCallback(() => {\n setIsOpen((previous) => !previous);\n }, []);\n\n const closeMenu = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n return (\n \n \n {isOpen && (\n \n \n {PROFILE_MENU_ITEMS.map((item) => {\n const Icon = item.icon;\n\n return (\n \n \n
\n\n
\n \n \n \n
\n

\n {item.title}\n

\n

\n {item.description}\n

\n
\n \n
\n \n \n );\n })}\n \n \n )}\n \n\n \n \n\n \n \n \n JD\n \n \n \n\n \n {isOpen ? \"Profile menu expanded\" : \"Profile menu collapsed\"}\n \n \n );\n}\n", "type": "registry:component", "target": "components/uitripled/animated-profile-menu-shadcnui.tsx" } ] }