{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "skyline-stats-demo",
  "type": "registry:block",
  "title": "Skyline: City Stats",
  "description": "Animated City Skyline example, City Stats: Studio hours booked per city as towers, each with its share on a rooftop sign. Switch the year and the towers grow or shrink to it. 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-stats-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/skyline.json"
  ],
  "files": [
    {
      "path": "components/skyline-stats-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Skyline, type SkylineTower } from \"@/components/ui/skyline\";\n\n// Hours of studio time booked through Roomtone, by city.\nconst YEARS = {\n  \"2025\": [\n    { label: \"Lisbon\", value: 1420 },\n    { label: \"Berlin\", value: 2980 },\n    { label: \"Lagos\", value: 860 },\n    { label: \"Seoul\", value: 3310 },\n    { label: \"Mexico City\", value: 1890 },\n    { label: \"Toronto\", value: 2240 },\n    { label: \"Melbourne\", value: 1310 },\n  ],\n  \"2026\": [\n    { label: \"Lisbon\", value: 2160 },\n    { label: \"Berlin\", value: 3120 },\n    { label: \"Lagos\", value: 1940 },\n    { label: \"Seoul\", value: 4050 },\n    { label: \"Mexico City\", value: 2460 },\n    { label: \"Toronto\", value: 2380 },\n    { label: \"Melbourne\", value: 1720 },\n  ],\n} satisfies Record<string, { label: string; value: number }[]>;\n\ntype Year = keyof typeof YEARS;\n\nexport function SkylineStatsDemo() {\n  const [year, setYear] = React.useState<Year>(\"2026\");\n  const total = YEARS[year].reduce((sum, c) => sum + c.value, 0);\n  const towers: SkylineTower[] = YEARS[year].map((c) => ({\n    ...c,\n    display: `${c.value.toLocaleString(\"en-US\")} h · ${Math.round((c.value / total) * 100)}%`,\n  }));\n\n  return (\n    <div className=\"w-full max-w-3xl rounded-2xl border border-zinc-950/10 bg-white p-5 text-zinc-900 shadow-sm sm:p-7 dark:border-white/10 dark:bg-zinc-950 dark:text-zinc-100\">\n      <div className=\"flex flex-wrap items-end justify-between gap-4\">\n        <div>\n          <h3 className=\"font-serif text-2xl tracking-[-0.015em] sm:text-[1.75rem]\">\n            Where the studios were <em className=\"text-[#2747ff] dark:text-[#8292ff]\">busiest</em>\n          </h3>\n          <p className=\"mt-1 text-sm text-zinc-500 dark:text-zinc-400\">\n            Hours booked on Roomtone in {year},{\" \"}\n            <span className=\"font-medium text-zinc-900 tabular-nums dark:text-zinc-100\">\n              {total.toLocaleString(\"en-US\")} h\n            </span>{\" \"}\n            in all. Hover a city for its share.\n          </p>\n        </div>\n        <div\n          role=\"radiogroup\"\n          aria-label=\"Year\"\n          className=\"flex rounded-full border border-zinc-950/10 p-0.5 text-sm dark:border-white/10\"\n        >\n          {(Object.keys(YEARS) as Year[]).map((y) => (\n            <button\n              key={y}\n              type=\"button\"\n              role=\"radio\"\n              aria-checked={year === y}\n              onClick={() => setYear(y)}\n              className=\"h-8 rounded-full px-3.5 font-medium tabular-nums text-zinc-500 transition-colors duration-150 hover:text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-900 aria-checked:bg-zinc-900 aria-checked:text-white dark:text-zinc-400 dark:hover:text-zinc-100 dark:focus-visible:outline-zinc-100 dark:aria-checked:bg-zinc-100 dark:aria-checked:text-zinc-900\"\n            >\n              {y}\n            </button>\n          ))}\n        </div>\n      </div>\n      <Skyline\n        towers={towers}\n        seed={4}\n        sun={0.86}\n        trees={false}\n        label={`Studio hours booked by city in ${year}`}\n        className=\"mt-6 h-72 text-zinc-900 [--skyline-sun:#ff5a1f] [--skyline-tint:#bcc7ff] sm:h-80 dark:text-zinc-100 dark:[--skyline-sun:#ff6a2b] dark:[--skyline-tint:#202c78]\"\n      />\n    </div>\n  );\n}\n"
    }
  ]
}