{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "golden-grid-colorways-demo",
  "type": "registry:block",
  "title": "Golden Grid: Product Colorways",
  "description": "Fibonacci Bento Grid example, Product Colorways: One chair in seven colorways recolored from a single photo, with the big chamber on the right; the swatches wind the grid to a color and the cart button names it. A take on the spiral gallery (spiral carousel) and image gallery (photo gallery). Fits portfolio, features and team sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "portfolio",
    "features",
    "team",
    "spiral-gallery",
    "image-gallery",
    "gallery",
    "layout",
    "motion"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/golden-grid#golden-grid-colorways-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/golden-grid.json"
  ],
  "files": [
    {
      "path": "components/golden-grid-colorways-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { GoldenGrid } from \"@/components/ui/golden-grid\";\n\n// One studio shot of the chair, recolored per colorway with imgix's hue shift.\nconst chair = (hue: number) =>\n  `https://images.unsplash.com/photo-1776548759448-499e26792d83?auto=format&fit=crop&w=900&h=900&q=80&hue=${hue}`;\n\nconst COLORWAYS = [\n  { src: chair(0), alt: \"The Mero task chair with a saffron seat\", name: \"Saffron\", swatch: \"#e2ad12\" },\n  { src: chair(-40), alt: \"The Mero task chair with a coral seat\", name: \"Coral\", swatch: \"#f0745a\" },\n  { src: chair(160), alt: \"The Mero task chair with a glacier blue seat\", name: \"Glacier\", swatch: \"#4fb3e8\" },\n  { src: chair(-60), alt: \"The Mero task chair with a fuchsia seat\", name: \"Fuchsia\", swatch: \"#e65aa6\" },\n  { src: chair(100), alt: \"The Mero task chair with a fern green seat\", name: \"Fern\", swatch: \"#3dbb52\" },\n  { src: chair(190), alt: \"The Mero task chair with a cobalt seat\", name: \"Cobalt\", swatch: \"#4a63e8\" },\n  { src: chair(230), alt: \"The Mero task chair with an iris seat\", name: \"Iris\", swatch: \"#8a5ae8\" },\n];\n\nexport function GoldenGridColorwaysDemo() {\n  const [index, setIndex] = React.useState(0);\n  const [added, setAdded] = React.useState<string | null>(null);\n  const colorway = COLORWAYS[index];\n\n  return (\n    <section className=\"mx-auto w-full max-w-3xl rounded-2xl border border-zinc-200 bg-white p-4 text-zinc-950 sm:p-6 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50\">\n      <GoldenGrid\n        items={COLORWAYS}\n        index={index}\n        onIndexChange={setIndex}\n        side=\"right\"\n        guide={false}\n        interval={2.6}\n        label=\"Mero task chair colorways\"\n        className=\"rounded-xl\"\n      />\n\n      <div className=\"mt-5 flex flex-col gap-5 px-1 sm:flex-row sm:items-end sm:justify-between\">\n        <div>\n          <p className=\"text-xs font-medium tracking-[0.14em] text-zinc-500 uppercase dark:text-zinc-400\">Mero Seating</p>\n          <p className=\"mt-1.5 text-lg font-semibold tracking-[-0.02em]\">\n            Task chair <span aria-hidden className=\"text-zinc-400 dark:text-zinc-500\">/</span> {colorway.name}\n          </p>\n          <p className=\"mt-0.5 text-sm text-zinc-500 tabular-nums dark:text-zinc-400\">$640 · ships in 2 weeks</p>\n        </div>\n\n        <div className=\"flex flex-col gap-4 sm:items-end\">\n          <div role=\"radiogroup\" aria-label=\"Colorway\" className=\"flex flex-wrap gap-2\">\n            {COLORWAYS.map((c, i) => (\n              <button\n                key={c.name}\n                type=\"button\"\n                role=\"radio\"\n                aria-checked={i === index}\n                aria-label={c.name}\n                onClick={() => setIndex(i)}\n                className=\"grid size-8 place-items-center rounded-full ring-1 ring-zinc-200 transition-shadow focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 aria-checked:ring-2 aria-checked:ring-zinc-950 dark:ring-zinc-800 dark:focus-visible:outline-white dark:aria-checked:ring-white\"\n              >\n                <span className=\"size-5 rounded-full\" style={{ background: c.swatch }} />\n              </button>\n            ))}\n          </div>\n          <button\n            type=\"button\"\n            onClick={() => setAdded(colorway.name)}\n            className=\"h-10 rounded-full bg-zinc-950 px-5 text-sm font-medium text-white transition-colors hover:bg-zinc-800 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-zinc-950 dark:bg-white dark:text-zinc-950 dark:hover:bg-zinc-200 dark:focus-visible:outline-white\"\n          >\n            {added === colorway.name ? \"Added to cart\" : `Add ${colorway.name} to cart`}\n          </button>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}