{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "glass-card", "title": "Glass Card", "description": "Frosted glass card with a mouse-following radial glow and shimmer border top.", "files": [ { "path": "registry/pioneerui/glass-card.tsx", "content": "\"use client\"\n\nimport React, { useRef, type CSSProperties } from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface GlassCardProps extends React.HTMLAttributes {\n children?: React.ReactNode\n /** Show a dynamic glowing orb that follows the mouse */\n glowFollow?: boolean\n /** Border tint color (CSS color) */\n tint?: string\n}\n\nexport function GlassCard({\n children,\n className,\n glowFollow = true,\n tint = \"rgba(139,92,246,0.3)\",\n style,\n ...props\n}: GlassCardProps) {\n const cardRef = useRef(null)\n const glowRef = useRef(null)\n\n const handleMouseMove = (e: React.MouseEvent) => {\n if (!glowFollow || !cardRef.current || !glowRef.current) return\n const rect = cardRef.current.getBoundingClientRect()\n const x = e.clientX - rect.left\n const y = e.clientY - rect.top\n glowRef.current.style.left = `${x}px`\n glowRef.current.style.top = `${y}px`\n glowRef.current.style.opacity = \"1\"\n }\n\n const handleMouseLeave = () => {\n if (glowRef.current) glowRef.current.style.opacity = \"0\"\n }\n\n return (\n \n {/* Mouse-follow glow */}\n {glowFollow && (\n \n )}\n {/* Shimmer border top */}\n \n
{children}
\n \n )\n}\n", "type": "registry:ui", "target": "components/pioneerui/glass-card.tsx" } ], "type": "registry:ui" }