{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "skyline-lights-demo",
  "type": "registry:block",
  "title": "Skyline: Lights On",
  "description": "Animated City Skyline example, Lights On: A late-night coworking club where every lit window is a member at a desk. Windows switch on and off as people come and go. A take on the chart (graph) and animated background (backdrop). Fits hero, stats and CTA sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "hero",
    "stats",
    "cta",
    "chart",
    "animated-background",
    "canvas"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/skyline#skyline-lights-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/skyline.json"
  ],
  "files": [
    {
      "path": "components/skyline-lights-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Skyline } from \"@/components/ui/skyline\";\n\nconst DESKS = 240;\nconst START = 148;\n\n// A night-owl coworking club: every lit window is a member at a desk right now.\nexport function SkylineLightsDemo() {\n  const [here, setHere] = React.useState(START);\n  const [joined, setJoined] = React.useState(false);\n\n  // People come and go every few seconds.\n  React.useEffect(() => {\n    const id = window.setInterval(() => {\n      setHere((n) => Math.min(DESKS - 12, Math.max(90, n + Math.round(Math.random() * 14 - 6))));\n    }, 2600);\n    return () => window.clearInterval(id);\n  }, []);\n\n  const count = here + (joined ? 1 : 0);\n\n  return (\n    <div className=\"w-full max-w-3xl overflow-hidden rounded-2xl border border-zinc-950/10 bg-[#fafaf9] text-zinc-950 dark:border-white/10 dark:bg-[#07080c] dark:text-zinc-100\">\n      <div className=\"flex flex-wrap items-end justify-between gap-5 px-6 pt-7 sm:px-8 sm:pt-8\">\n        <div>\n          <p className=\"font-serif text-5xl leading-none tracking-[-0.02em] tabular-nums sm:text-6xl\" aria-live=\"polite\">\n            {count}\n            <span className=\"ml-2 align-middle font-sans text-sm tracking-normal text-zinc-500 dark:text-zinc-400\">\n              of {DESKS} desks lit\n            </span>\n          </p>\n          <p className=\"mt-3 max-w-sm text-sm leading-relaxed text-zinc-600 dark:text-zinc-400\">\n            Lantern Hall stays open until four. Every window up there is a member working tonight.\n          </p>\n        </div>\n        <button\n          type=\"button\"\n          aria-pressed={joined}\n          onClick={() => setJoined((j) => !j)}\n          className=\"inline-flex h-10 items-center gap-2 rounded-full bg-zinc-950 px-5 text-sm font-medium text-[#fafaf9] transition-[background-color,scale] duration-150 hover:bg-zinc-800 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 active:scale-[0.97] aria-pressed:bg-[#ffb020] aria-pressed:text-zinc-950 dark:bg-zinc-100 dark:text-zinc-950 dark:hover:bg-white dark:focus-visible:outline-zinc-100 dark:aria-pressed:bg-[#ffd27a]\"\n        >\n          <span\n            aria-hidden\n            className=\"size-2 rounded-[1px] bg-current opacity-40 transition-opacity duration-150 [[aria-pressed=true]_&]:opacity-100\"\n          />\n          {joined ? \"You're at a desk\" : \"Take a desk\"}\n        </button>\n      </div>\n      <Skyline\n        seed={21}\n        lights={count / DESKS}\n        sun={false}\n        className=\"mt-6 h-64 text-zinc-950 [--skyline-light:#ffbf3f] [--skyline-tint:#c3cdff] sm:h-72 dark:text-[#1b1f2e] dark:[--skyline-light:#ffd27a] dark:[--skyline-tint:#202c78]\"\n      />\n    </div>\n  );\n}\n"
    }
  ]
}