{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "glow-card", "title": "Glow Card", "description": "A card with an animated glow border effect on hover.", "dependencies": [ "framer-motion", "clsx", "tailwind-merge" ], "files": [ { "path": "registry/components/glow-card.tsx", "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion } from \"framer-motion\";\nimport { useRef, useState } from \"react\";\n\ninterface GlowCardProps {\n children: React.ReactNode;\n className?: string;\n wrapperClassName?: string;\n}\n\nexport function GlowCard({ children, className, wrapperClassName }: GlowCardProps) {\n const cardRef = useRef(null);\n const [glowPosition, setGlowPosition] = useState({ x: 50, y: 50 });\n const [isHovered, setIsHovered] = useState(false);\n\n const handleMouseMove = (e: React.MouseEvent) => {\n if (!cardRef.current) return;\n const rect = cardRef.current.getBoundingClientRect();\n const x = ((e.clientX - rect.left) / rect.width) * 100;\n const y = ((e.clientY - rect.top) / rect.height) * 100;\n setGlowPosition({ x, y });\n };\n\n return (\n setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n className={cn(\"relative rounded-2xl p-[1px] overflow-hidden\", wrapperClassName)}\n style={{\n background: isHovered\n ? `radial-gradient(600px circle at ${glowPosition.x}% ${glowPosition.y}%, rgba(59,130,246,0.4), transparent 40%)`\n : \"transparent\",\n }}\n >\n {/* Animated border glow */}\n \n\n {/* Card content */}\n
\n {children}\n
\n \n );\n}", "type": "registry:component" } ], "type": "registry:block" }