{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "hover-card", "type": "registry:ui", "title": "Hover Card", "description": "Card with a cursor-tracking spotlight.", "dependencies": [], "registryDependencies": [], "files": [ { "path": "registry/starkui/hover-card.tsx", "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport function HoverCard({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}) {\n const ref = React.useRef(null);\n\n return (\n {\n const rect = e.currentTarget.getBoundingClientRect();\n e.currentTarget.style.setProperty(\"--x\", `${e.clientX - rect.left}px`);\n e.currentTarget.style.setProperty(\"--y\", `${e.clientY - rect.top}px`);\n }}\n className={cn(\n \"group relative overflow-hidden rounded-[1.5rem] border border-border/60 bg-background p-6 shadow-sm transition-all duration-300 hover:border-border hover:shadow-md\",\n className\n )}\n >\n \n
{children}
\n \n );\n}\n", "type": "registry:ui", "target": "components/ui/hover-card.tsx" } ] }