{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"vercel-card","type":"registry:ui","title":"Vercel Card","description":"Minimal monochrome card with a fading grid, corner plus markers and a pointer spotlight that lights up the grid lines.","dependencies":[],"registryDependencies":[],"files":[{"path":"registry/ui/vercel-card.tsx","type":"registry:ui","content":"\"use client\";\n\nimport type { PointerEvent, ReactNode } from \"react\";\n\nexport interface VercelCardProps {\n  children?: ReactNode;\n  /** Grid cell size in px. */\n  gridSize?: number;\n  /** Show the grid pattern. */\n  grid?: boolean;\n  /** Show plus markers on the corners. */\n  markers?: boolean;\n  /** Spotlight radius in px. */\n  spotlightSize?: number;\n  className?: string;\n}\n\nconst css = `\n.vercel-card{--x:50%;--y:50%;--line:color-mix(in oklab,var(--foreground) 7%,transparent);--line-hot:color-mix(in oklab,var(--foreground) 30%,transparent)}\n.vercel-card-grid{background-image:linear-gradient(to right,var(--g) 1px,transparent 1px),linear-gradient(to bottom,var(--g) 1px,transparent 1px);background-size:var(--cell) var(--cell);background-position:-1px -1px}\n.vercel-card-spot{opacity:0;transition:opacity .4s ease}\n.vercel-card:hover .vercel-card-spot,.vercel-card:focus-within .vercel-card-spot{opacity:1}\n.vercel-card-plus{transition:color .3s ease,transform .5s cubic-bezier(.2,.8,.2,1)}\n.vercel-card:hover .vercel-card-plus,.vercel-card:focus-within .vercel-card-plus{color:var(--foreground);transform:rotate(90deg)}\n@media (prefers-reduced-motion: reduce){.vercel-card-spot,.vercel-card-plus{transition:none}.vercel-card:hover .vercel-card-plus{transform:none}}\n`;\n\nconst Plus = ({ className }: { className: string }) => (\n  <svg\n    aria-hidden\n    viewBox=\"0 0 16 16\"\n    className={`vercel-card-plus pointer-events-none absolute z-10 size-4 text-muted-foreground ${className}`}\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth={1.25}\n  >\n    <path d=\"M8 0v16M0 8h16\" />\n  </svg>\n);\n\nexport function VercelCard({\n  children,\n  gridSize = 24,\n  grid = true,\n  markers = true,\n  spotlightSize = 320,\n  className,\n}: VercelCardProps) {\n  const onMove = (e: PointerEvent<HTMLDivElement>) => {\n    const r = e.currentTarget.getBoundingClientRect();\n    e.currentTarget.style.setProperty(\"--x\", `${e.clientX - r.left}px`);\n    e.currentTarget.style.setProperty(\"--y\", `${e.clientY - r.top}px`);\n  };\n\n  const spot = `radial-gradient(${spotlightSize}px circle at var(--x) var(--y), #000, transparent 70%)`;\n\n  return (\n    <div\n      onPointerMove={onMove}\n      className={`vercel-card relative border border-border bg-background ${className ?? \"\"}`}\n      style={{ [\"--cell\" as string]: `${gridSize}px` }}\n    >\n      <style href=\"vercel-card\" precedence=\"default\">\n        {css}\n      </style>\n      <div aria-hidden className=\"pointer-events-none absolute inset-0 overflow-hidden\">\n        {grid && (\n          <div\n            className=\"vercel-card-grid absolute inset-0\"\n            style={{\n              [\"--g\" as string]: \"var(--line)\",\n              maskImage: \"radial-gradient(ellipse at 100% 0%, #000 10%, transparent 70%)\",\n              WebkitMaskImage: \"radial-gradient(ellipse at 100% 0%, #000 10%, transparent 70%)\",\n            }}\n          />\n        )}\n        {/* Spotlight: a soft wash plus brighter grid lines, both masked to the pointer. */}\n        <div\n          className=\"vercel-card-spot absolute inset-0\"\n          style={{\n            background: `radial-gradient(${spotlightSize}px circle at var(--x) var(--y), color-mix(in oklab, var(--foreground) 7%, transparent), transparent 70%)`,\n          }}\n        />\n        {grid && (\n          <div\n            className=\"vercel-card-grid vercel-card-spot absolute inset-0\"\n            style={{ [\"--g\" as string]: \"var(--line-hot)\", maskImage: spot, WebkitMaskImage: spot }}\n          />\n        )}\n      </div>\n      {markers && (\n        <>\n          <Plus className=\"-left-2 -top-2\" />\n          <Plus className=\"-right-2 -top-2\" />\n          <Plus className=\"-bottom-2 -left-2\" />\n          <Plus className=\"-bottom-2 -right-2\" />\n        </>\n      )}\n      <div className=\"relative\">{children}</div>\n    </div>\n  );\n}\n"}]}