{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "glow-card-grid", "title": "Glow Card Grid", "author": "tusharvarshney ", "description": "Display cards with glowing border and background effects.", "files": [ { "path": "src/registry/components/glow-card-grid/glow-card-grid.tsx", "content": "\"use client\"\n\nimport { useEffect, useRef } from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport type GlowCardGridProps = React.ComponentPropsWithoutRef<\"div\"> & {\n // Card parameters\n cardRadius?: number\n\n // Icon parameters\n iconBlur?: number\n iconSaturate?: number\n iconBrightness?: number\n iconScale?: number\n iconOpacity?: number\n\n // Border parameters\n borderWidth?: number\n borderBlur?: number\n borderSaturate?: number\n borderBrightness?: number\n borderContrast?: number\n\n children: React.ReactNode\n}\n\nexport function GlowCardGrid({\n cardRadius = 16,\n\n iconBlur = 25,\n iconSaturate = 5.0,\n iconBrightness = 1.3,\n iconScale = 4,\n iconOpacity = 0.3,\n\n borderWidth = 3,\n borderBlur = 10,\n borderSaturate = 4.2,\n borderBrightness = 2.5,\n borderContrast = 2.5,\n\n className,\n style,\n ...props\n}: GlowCardGridProps) {\n const gridRef = useRef(null)\n\n useEffect(() => {\n const handlePointerMove = (event: PointerEvent) => {\n if (!gridRef.current) return\n\n const cards = gridRef.current.querySelectorAll(\n \"[data-slot='glow-card']\"\n )\n\n cards.forEach((card) => {\n const rect = card.getBoundingClientRect()\n\n const centerX = rect.left + rect.width / 2\n const centerY = rect.top + rect.height / 2\n\n const x = (event.clientX - centerX) / (rect.width / 2)\n const y = (event.clientY - centerY) / (rect.height / 2)\n\n card.style.setProperty(\"--pointer-x\", x.toFixed(3))\n card.style.setProperty(\"--pointer-y\", y.toFixed(3))\n })\n }\n\n document.addEventListener(\"pointermove\", handlePointerMove)\n\n return () => document.removeEventListener(\"pointermove\", handlePointerMove)\n }, [])\n\n return (\n \n )\n}\n", "type": "registry:component", "target": "@components/glow-card-grid.tsx" }, { "path": "src/registry/components/glow-card-grid/glow-card.tsx", "content": "import { cn } from \"@/lib/utils\"\n\nexport type GlowCardProps = {\n name: string\n handle: string\n avatar: string\n className?: string\n}\n\nexport function GlowCard({ name, handle, avatar, className }: GlowCardProps) {\n return (\n \n
\n \n {name}\n
\n\n
\n {name}\n\n
\n

\n {name}\n

\n

{handle}

\n
\n
\n \n\n \n \n )\n}\n", "type": "registry:component", "target": "@components/glow-card.tsx" } ], "type": "registry:component" }