{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/card-16","type":"registry:component","title":"Card 16","description":"Interactive spotlight card with animated glow effect that follows mouse movement","registryDependencies":["card"],"files":[{"path":"src/registry/new-york/components/card/card-16.tsx","content":"'use client'\n\nimport { useEffect } from 'react'\n\nimport { Card, CardContent, CardHeader, CardTitle } from '@/registry/new-york/ui/card'\n\nconst CardSpotlightDemo = () => {\n  useEffect(() => {\n    const all = document.querySelectorAll('.spotlight-card')\n\n    const handleMouseMove = (ev: MouseEvent) => {\n      all.forEach(e => {\n        const blob = e.querySelector('.blob') as HTMLElement\n        const fblob = e.querySelector('.fake-blob') as HTMLElement\n\n        if (!blob || !fblob) return\n\n        const rec = fblob.getBoundingClientRect()\n\n        blob.style.opacity = '1'\n\n        blob.animate(\n          [\n            {\n              transform: `translate(${\n                ev.clientX - rec.left - rec.width / 2\n              }px, ${ev.clientY - rec.top - rec.height / 2}px)`\n            }\n          ],\n          {\n            duration: 300,\n            fill: 'forwards'\n          }\n        )\n      })\n    }\n\n    window.addEventListener('mousemove', handleMouseMove)\n\n    return () => {\n      window.removeEventListener('mousemove', handleMouseMove)\n    }\n  }, [])\n\n  return (\n    <div className='h-max w-max'>\n      <div className='spotlight-card group bg-border relative overflow-hidden rounded-xl p-px transition-all duration-300 ease-in-out'>\n        <Card className='group-hover:bg-card/90 max-w-80 border-none transition-all duration-300 ease-in-out group-hover:backdrop-blur-[20px]'>\n          <CardHeader>\n            <CardTitle>Hover for the Glow-Up</CardTitle>\n          </CardHeader>\n          <CardContent>\n            Glide your cursor here and watch magic unfold - an experience designed just for you.\n          </CardContent>\n        </Card>\n        <div className='blob absolute top-0 left-0 size-20 rounded-full bg-sky-600/60 opacity-0 blur-2xl transition-all duration-300 ease-in-out dark:bg-sky-400/60' />\n        <div className='fake-blob absolute top-0 left-0 size-20 rounded-full' />\n      </div>\n    </div>\n  )\n}\n\nexport default CardSpotlightDemo\n","type":"registry:component","target":"components/shadcn-studio/card/card-16.tsx"}]}