{
  "format": "css.observer/playground@1",
  "id": "00000000-0000-4000-9000-000000000014",
  "url": "https://css.observer/s/spotlight-hover-tiles",
  "title": "Spotlight hover tiles",
  "description": "A soft spotlight follows the cursor across a grid of tiles. A few lines of JS feed CSS variables.",
  "category": "effects",
  "tags": [
    "hover",
    "radial-gradient",
    "js"
  ],
  "visibility": "public",
  "status": "published",
  "revision": 1,
  "author": "observer",
  "forked_from": null,
  "created_at": "2026-12-02T09:26:36.930Z",
  "updated_at": "2026-12-02T09:26:36.930Z",
  "published_at": "2026-12-02T09:26:36.930Z",
  "source": {
    "html": "<div class=\"tiles\"><div class=\"tile\">Fast</div><div class=\"tile\">Local</div><div class=\"tile\">Private</div><div class=\"tile\">Typed</div></div>",
    "css": "body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #0b0c0e; color: #ecebe6; font: 600 18px system-ui, sans-serif; }\n.tiles { display: grid; grid-template-columns: repeat(2, 180px); gap: 12px; }\n.tile { --x: 50%; --y: 50%; height: 120px; display: grid; place-items: center; border-radius: 16px; border: 1px solid #24262c;\n  background: radial-gradient(240px circle at var(--x) var(--y), rgb(200 245 96 / .16), transparent 60%), #131418; }\n.tile:hover { border-color: #3a3f2a; }",
    "js": "document.querySelectorAll(\".tile\").forEach((t) => {\n  t.addEventListener(\"pointermove\", (e) => {\n    const r = t.getBoundingClientRect();\n    t.style.setProperty(\"--x\", e.clientX - r.left + \"px\");\n    t.style.setProperty(\"--y\", e.clientY - r.top + \"px\");\n  });\n});"
  }
}