{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "exploded-ui-design-system-demo",
  "type": "registry:block",
  "title": "Exploded UI: Design System",
  "description": "3D Exploded View example, Design System: A page lifts off the components it's built from, which lift off the tokens under them. Numbered labels, with the active layer's description under the stack. A take on the 3D (three dimensional) and scroll animation (on scroll). Fits features and hero sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "features",
    "hero",
    "3d",
    "scroll-animation",
    "scroll",
    "showcase"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/exploded-ui#exploded-ui-design-system-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/exploded-ui.json"
  ],
  "files": [
    {
      "path": "components/exploded-ui-design-system-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { ExplodedUI } from \"@/components/ui/exploded-ui\";\n\n// Sized off the plane's width, so each layer scales like an image.\nconst screen =\n  \"[--spacing:0.4cqw] [--text-xs:1.2cqw] [--text-sm:1.4cqw] [--text-base:1.6cqw] [--text-lg:1.9cqw] [--text-2xl:2.6cqw] [--text-4xl:4cqw] [--radius-md:0.6cqw] [--radius-lg:0.8cqw] [--radius-xl:1.2cqw]\";\n\n// The page on top is built from the components under it, which are built from\n// the tokens at the bottom: the same three colors run through all of them.\nexport function ExplodedUIDesignSystemDemo() {\n  const scrollRef = React.useRef<HTMLDivElement>(null);\n\n  return (\n    <div className=\"relative w-full overflow-hidden rounded-xl border border-zinc-200 bg-stone-100 text-zinc-950 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50\">\n      <div ref={scrollRef} className=\"relative h-[var(--demo-height,36rem)] overflow-y-auto overscroll-contain\">\n        <header className=\"mx-auto max-w-2xl px-6 pt-16 pb-4 text-center sm:pt-20\">\n          <p className=\"text-sm font-medium text-orange-600 dark:text-orange-400\">Fieldwork Design System</p>\n          <h2 className=\"mt-3 text-3xl font-semibold tracking-tight text-balance sm:text-4xl\">\n            Every page starts as three decisions\n          </h2>\n        </header>\n\n        <ExplodedUI\n          walkthrough\n          labels=\"numbered\"\n          spread={0.16}\n          containerRef={scrollRef}\n          stageClassName=\"h-[var(--demo-height,36rem)]\"\n          className={cn(\"aspect-[16/10] w-full max-w-2xl\", screen)}\n        >\n          <ExplodedUI.Layer label=\"Tokens\" description=\"Color, type and spacing, decided once.\">\n            <Tokens />\n          </ExplodedUI.Layer>\n          <ExplodedUI.Layer\n            label=\"Components\"\n            description=\"Buttons, fields and toggles built from the tokens.\"\n            className=\"inset-[7%]\"\n          >\n            <Components />\n          </ExplodedUI.Layer>\n          <ExplodedUI.Layer label=\"Pages\" description=\"Composed from components. Nothing one-off.\">\n            <Page />\n          </ExplodedUI.Layer>\n        </ExplodedUI>\n\n        <section className=\"mx-auto max-w-xl px-6 py-16 text-center text-zinc-600 dark:text-zinc-400\">\n          120 components, 2 themes, 0 hex codes in product code.\n        </section>\n      </div>\n    </div>\n  );\n}\n\nconst palette = [\n  [\"Ink\", [\"bg-zinc-50\", \"bg-zinc-200\", \"bg-zinc-400\", \"bg-zinc-700\", \"bg-zinc-950\"]],\n  [\"Clay\", [\"bg-orange-50\", \"bg-orange-200\", \"bg-orange-400\", \"bg-orange-600\", \"bg-orange-800\"]],\n  [\"Moss\", [\"bg-lime-50\", \"bg-lime-200\", \"bg-lime-400\", \"bg-lime-600\", \"bg-lime-800\"]],\n] as const;\n\nfunction Tokens() {\n  return (\n    <div className=\"grid size-full grid-cols-[1.3fr_1fr] gap-6 bg-white p-6 text-xs text-zinc-500 dark:bg-zinc-900 dark:text-zinc-400\">\n      <div className=\"flex flex-col gap-4\">\n        <span className=\"font-mono\">color</span>\n        {palette.map(([name, swatches]) => (\n          <div key={name} className=\"flex items-center gap-3\">\n            <span className=\"w-10\">{name}</span>\n            <div className=\"flex flex-1 gap-1.5\">\n              {swatches.map((swatch) => (\n                <span key={swatch} className={cn(\"aspect-square flex-1 rounded-md ring-1 ring-zinc-950/5\", swatch)} />\n              ))}\n            </div>\n          </div>\n        ))}\n      </div>\n      <div className=\"flex flex-col gap-3\">\n        <span className=\"font-mono\">type</span>\n        <span className=\"text-4xl leading-none font-semibold tracking-tight text-zinc-950 dark:text-zinc-50\">Aa</span>\n        {[\n          [\"display\", \"40 / 44\"],\n          [\"title\", \"24 / 30\"],\n          [\"body\", \"16 / 24\"],\n        ].map(([name, size]) => (\n          <span key={name} className=\"flex justify-between border-b border-zinc-950/5 pb-1.5 dark:border-white/10\">\n            {name}\n            <span className=\"font-mono\">{size}</span>\n          </span>\n        ))}\n        <span className=\"mt-2 font-mono\">space</span>\n        <div className=\"flex items-end gap-1.5\">\n          {[1, 2, 3, 4, 6, 8].map((n) => (\n            <span key={n} className=\"rounded-sm bg-orange-400/70\" style={{ width: `${n * 0.5}cqw`, height: `${n * 0.5}cqw` }} />\n          ))}\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction Components() {\n  return (\n    <div className=\"grid size-full grid-cols-2 content-center gap-x-8 gap-y-6 bg-stone-50 p-8 text-xs dark:bg-zinc-800\">\n      <div className=\"flex flex-wrap items-center gap-2\">\n        <span className=\"rounded-lg bg-zinc-950 px-4 py-2 font-medium text-white dark:bg-white dark:text-zinc-950\">Primary</span>\n        <span className=\"rounded-lg px-4 py-2 font-medium ring-1 ring-zinc-950/15 ring-inset dark:ring-white/20\">Secondary</span>\n        <span className=\"rounded-lg bg-orange-600 px-4 py-2 font-medium text-white\">Accent</span>\n      </div>\n      <div className=\"flex items-center gap-3\">\n        <span className=\"flex h-6 w-11 items-center rounded-full bg-lime-600 p-0.5\">\n          <span className=\"ml-auto size-5 rounded-full bg-white shadow-sm\" />\n        </span>\n        <span className=\"flex size-5 items-center justify-center rounded-md bg-zinc-950 text-white dark:bg-white dark:text-zinc-950\">\n          <svg viewBox=\"0 0 12 12\" aria-hidden className=\"size-3 fill-none stroke-current\" strokeWidth=\"2\">\n            <path d=\"m2.5 6.5 2.5 2.5 4.5-6\" />\n          </svg>\n        </span>\n        <span className=\"rounded-full bg-lime-100 px-2.5 py-1 font-medium text-lime-800 dark:bg-lime-900/50 dark:text-lime-200\">Shipped</span>\n      </div>\n      <div className=\"flex flex-col gap-1.5\">\n        <span className=\"font-medium\">Email</span>\n        <span className=\"rounded-lg bg-white px-3 py-2 text-zinc-400 ring-1 ring-zinc-950/10 dark:bg-zinc-900 dark:ring-white/10\">you@fieldwork.co</span>\n      </div>\n      <div className=\"flex -space-x-2\">\n        {[\"bg-orange-300\", \"bg-lime-300\", \"bg-zinc-300\", \"bg-orange-500\"].map((color) => (\n          <span key={color} className={cn(\"size-8 rounded-full ring-2 ring-stone-50 dark:ring-zinc-800\", color)} />\n        ))}\n      </div>\n    </div>\n  );\n}\n\nfunction Page() {\n  return (\n    <div className=\"flex size-full flex-col bg-orange-50 p-6 text-xs dark:bg-zinc-900\">\n      <div className=\"flex items-center justify-between\">\n        <span className=\"flex items-center gap-2 text-sm font-semibold\">\n          <span className=\"size-5 rounded-full bg-orange-600\" />\n          Fieldwork\n        </span>\n        <div className=\"flex items-center gap-5 text-zinc-600 dark:text-zinc-400\">\n          <span>Product</span>\n          <span>Pricing</span>\n          <span className=\"rounded-lg bg-zinc-950 px-3 py-1.5 font-medium text-white dark:bg-white dark:text-zinc-950\">Sign up</span>\n        </div>\n      </div>\n      <div className=\"mt-[8%] grid flex-1 grid-cols-[1.2fr_1fr] gap-6\">\n        <div>\n          <span className=\"rounded-full bg-lime-100 px-2.5 py-1 font-medium text-lime-800 dark:bg-lime-900/50 dark:text-lime-200\">Shipped: v4</span>\n          <p className=\"mt-4 text-4xl leading-[1.05] font-semibold tracking-tight text-balance\">Field notes for teams that build</p>\n          <div className=\"mt-6 flex gap-2\">\n            <span className=\"rounded-lg bg-orange-600 px-4 py-2 font-medium text-white\">Start free</span>\n            <span className=\"rounded-lg px-4 py-2 font-medium ring-1 ring-zinc-950/15 ring-inset dark:ring-white/20\">Book a demo</span>\n          </div>\n        </div>\n        <div className=\"flex flex-col gap-3 self-start rounded-xl bg-white p-5 shadow-xl ring-1 shadow-orange-950/10 ring-zinc-950/5 dark:bg-zinc-800 dark:ring-white/10\">\n          <span className=\"font-medium\">Join the beta</span>\n          <span className=\"rounded-lg bg-white px-3 py-2 text-zinc-400 ring-1 ring-zinc-950/10 dark:bg-zinc-900 dark:ring-white/10\">you@fieldwork.co</span>\n          <span className=\"flex items-center gap-2 text-zinc-500\">\n            <span className=\"flex h-5 w-9 items-center rounded-full bg-lime-600 p-0.5\">\n              <span className=\"ml-auto size-4 rounded-full bg-white\" />\n            </span>\n            Weekly digest\n          </span>\n          <span className=\"mt-2 rounded-lg bg-zinc-950 py-2 text-center font-medium text-white dark:bg-white dark:text-zinc-950\">Request access</span>\n        </div>\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}