{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spotlight-card",
  "title": "Spotlight Card",
  "author": "VenusUI",
  "description": "A card with a soft light that follows the pointer.",
  "registryDependencies": [
    "https://venusui.com/r/use-pointer-position.json",
    "https://venusui.com/r/compose-refs.json"
  ],
  "files": [
    {
      "path": "registry/default/ui/spotlight-card.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { usePointerPosition } from \"@/registry/default/hooks/use-pointer-position\"\nimport { composeRefs } from \"@/registry/default/lib/compose-refs\"\n\ninterface SpotlightCardProps extends React.ComponentProps<\"div\"> {\n  /** Color of the spotlight. Any CSS color. Defaults to a soft tint of the foreground color. */\n  spotlightColor?: string\n  /** Radius of the spotlight in pixels. */\n  radius?: number\n}\n\nfunction SpotlightCard({\n  className,\n  spotlightColor,\n  radius = 320,\n  style,\n  ref,\n  children,\n  ...props\n}: SpotlightCardProps) {\n  const pointerRef = usePointerPosition<HTMLDivElement>()\n  const composedRef = React.useMemo(() => composeRefs(pointerRef, ref), [pointerRef, ref])\n\n  return (\n    <div\n      ref={composedRef}\n      data-slot=\"spotlight-card\"\n      className={cn(\n        \"relative isolate overflow-hidden rounded-xl border bg-card text-card-foreground\",\n        className\n      )}\n      style={\n        {\n          \"--spotlight-radius\": `${radius}px`,\n          \"--spotlight-color\": spotlightColor,\n          ...style,\n        } as React.CSSProperties\n      }\n      {...props}\n    >\n      <div\n        aria-hidden=\"true\"\n        data-slot=\"spotlight-card-light\"\n        className=\"pointer-events-none absolute inset-0 -z-10 opacity-(--pointer-active,0) transition-opacity duration-300 motion-reduce:hidden\"\n        style={{\n          background:\n            \"radial-gradient(var(--spotlight-radius) circle at var(--pointer-x, 50%) var(--pointer-y, 50%), var(--spotlight-color, color-mix(in oklch, var(--foreground) 10%, transparent)), transparent 70%)\",\n        }}\n      />\n      {children}\n    </div>\n  )\n}\n\nexport { SpotlightCard, type SpotlightCardProps }\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "cards",
    "effects",
    "interactive"
  ],
  "type": "registry:ui"
}