{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "exploded-ui-demo",
  "type": "registry:block",
  "title": "Exploded UI: Dashboard",
  "description": "3D Exploded View example, Dashboard: A dashboard comes apart into its shell, sidebar, live cards, command menu and a teammate's cursor, walks through each one, then lands back as the screenshot it started as. Hover a layer once it's open, or click a label to jump to it. 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-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/exploded-ui.json"
  ],
  "files": [
    {
      "path": "components/exploded-ui-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// Everything inside the screenshot is sized off the plane's width (Tailwind's\n// spacing, text and radius scales are set in container units), so it scales\n// like an image while staying real, theme-aware HTML.\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] [--radius-md:0.6cqw] [--radius-lg:0.8cqw] [--radius-xl:1.2cqw]\";\n\n// For a full-page section, drop the scroll box, `containerRef` and\n// `stageClassName`: the stage fills the window and sticks while the page scrolls.\nexport function ExplodedUIDemo() {\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-zinc-50 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-indigo-600 dark:text-indigo-400\">Inside Northwind</p>\n          <h2 className=\"mt-3 text-3xl font-semibold tracking-tight text-balance sm:text-4xl\">\n            Everything your revenue team needs, in one window\n          </h2>\n          <p className=\"mt-4 text-zinc-600 dark:text-zinc-400\">Scroll to take it apart.</p>\n        </header>\n\n        <ExplodedUI\n          walkthrough\n          containerRef={scrollRef}\n          stageClassName=\"h-[var(--demo-height,36rem)]\"\n          className={cn(\"aspect-[16/10] w-full max-w-3xl\", screen)}\n        >\n          <ExplodedUI.Layer label=\"App shell\" description=\"Navigation, search and settings.\">\n            <Shell />\n          </ExplodedUI.Layer>\n          <ExplodedUI.Layer\n            label=\"Sidebar\"\n            description=\"Every workspace in one list.\"\n            className=\"top-[5.6%] bottom-0 left-0 w-[20%]\"\n          >\n            <Sidebar />\n          </ExplodedUI.Layer>\n          <ExplodedUI.Layer\n            label=\"Live cards\"\n            description=\"Metrics update in real time.\"\n            className=\"top-[17.5%] left-[23%] w-[74%]\"\n          >\n            <MetricCards />\n          </ExplodedUI.Layer>\n          <ExplodedUI.Layer\n            label=\"Command menu\"\n            description=\"Press ⌘K to do anything.\"\n            className=\"top-[36%] left-[40%] w-[38%]\"\n          >\n            <CommandMenu />\n          </ExplodedUI.Layer>\n          <ExplodedUI.Layer\n            label=\"Live cursors\"\n            description=\"See where your team is working.\"\n            bare\n            className=\"top-[58%] left-[66%] w-[11%]\"\n          >\n            <Cursor />\n          </ExplodedUI.Layer>\n        </ExplodedUI>\n\n        <section className=\"mx-auto grid max-w-3xl gap-8 px-6 py-16 sm:grid-cols-3\">\n          {[\n            [\"Built for speed\", \"Every screen loads in under 100ms, even with a million rows.\"],\n            [\"Keyboard first\", \"Anything you can click, you can do from the command menu.\"],\n            [\"Live by default\", \"Numbers, comments and cursors update the moment they change.\"],\n          ].map(([title, body]) => (\n            <div key={title}>\n              <h3 className=\"font-medium\">{title}</h3>\n              <p className=\"mt-2 text-sm leading-relaxed text-pretty text-zinc-600 dark:text-zinc-400\">{body}</p>\n            </div>\n          ))}\n        </section>\n      </div>\n    </div>\n  );\n}\n\nconst nav = [\"Overview\", \"Pipeline\", \"Accounts\", \"Reports\"];\nconst workspaces = [\n  [\"Acme Corp\", \"bg-indigo-500\"],\n  [\"Globex\", \"bg-emerald-500\"],\n  [\"Initech\", \"bg-amber-500\"],\n  [\"Umbrella\", \"bg-rose-500\"],\n];\n\nfunction Shell() {\n  return (\n    <div className=\"flex size-full flex-col bg-white text-xs text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100\">\n      <div className=\"flex h-[5.6%] shrink-0 items-center gap-1.5 border-b border-zinc-950/5 px-3 dark:border-white/5\">\n        {[0, 1, 2].map((dot) => (\n          <span key={dot} className=\"size-2.5 rounded-full bg-zinc-200 dark:bg-zinc-700\" />\n        ))}\n        <span className=\"mx-auto rounded-md bg-zinc-100 px-3 py-0.5 text-zinc-500 dark:bg-zinc-800\">\n          app.northwind.io/overview\n        </span>\n      </div>\n      <div className=\"flex min-h-0 flex-1\">\n        {/* The sidebar's slot */}\n        <div className=\"w-[20%] shrink-0 bg-zinc-50 dark:bg-zinc-900\" />\n        <div className=\"flex min-w-0 flex-1 flex-col gap-4 bg-zinc-50 p-5 dark:bg-zinc-950\">\n          <div className=\"flex items-center justify-between\">\n            <span className=\"text-lg font-semibold tracking-tight\">Overview</span>\n            <div className=\"flex items-center gap-2 text-zinc-500\">\n              <span className=\"flex w-40 items-center gap-2 rounded-md bg-white px-2.5 py-1.5 ring-1 ring-zinc-950/5 dark:bg-zinc-900 dark:ring-white/10\">\n                <SearchIcon />\n                Search\n                <kbd className=\"ml-auto font-sans text-zinc-400\">⌘K</kbd>\n              </span>\n              <span className=\"size-7 rounded-full bg-linear-to-br from-amber-300 to-rose-400\" />\n            </div>\n          </div>\n          {/* The cards' slot */}\n          <div className=\"h-[22%] shrink-0\" />\n          <div className=\"grid min-h-0 flex-1 grid-cols-[1.6fr_1fr] gap-4\">\n            <div className=\"flex flex-col rounded-lg bg-white p-4 ring-1 ring-zinc-950/5 dark:bg-zinc-900 dark:ring-white/5\">\n              <div className=\"flex justify-between text-zinc-500\">\n                <span>Revenue</span>\n                <span>Last 12 weeks</span>\n              </div>\n              <div className=\"mt-4 flex min-h-0 flex-1 items-end gap-2\">\n                {[38, 52, 44, 61, 57, 70, 64, 78, 72, 86, 81, 94].map((h, i) => (\n                  <span\n                    key={i}\n                    className={cn(\"flex-1 rounded-sm\", i === 11 ? \"bg-indigo-500\" : \"bg-indigo-500/20 dark:bg-indigo-400/25\")}\n                    style={{ height: `${h}%` }}\n                  />\n                ))}\n              </div>\n            </div>\n            <div className=\"rounded-lg bg-white p-4 ring-1 ring-zinc-950/5 dark:bg-zinc-900 dark:ring-white/5\">\n              <span className=\"text-zinc-500\">Top accounts</span>\n              <ul className=\"mt-3 space-y-3\">\n                {workspaces.map(([name, color], i) => (\n                  <li key={name} className=\"flex items-center gap-2\">\n                    <span className={cn(\"size-5 rounded-md\", color)} />\n                    <span className=\"font-medium\">{name}</span>\n                    <span className=\"ml-auto text-zinc-500 tabular-nums\">${[48, 36, 22, 17][i]}k</span>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction Sidebar() {\n  return (\n    <div className=\"flex size-full flex-col gap-0.5 border-r border-zinc-950/5 bg-white p-3 text-xs text-zinc-900 dark:border-white/5 dark:bg-zinc-900 dark:text-zinc-100\">\n      <div className=\"mb-4 flex items-center gap-2 px-2 pt-1 text-sm font-semibold\">\n        <span className=\"size-5 rounded-md bg-indigo-600\" />\n        Northwind\n      </div>\n      {nav.map((item, i) => (\n        <span\n          key={item}\n          className={cn(\"rounded-md px-2 py-1.5\", i === 0 ? \"bg-zinc-100 font-medium dark:bg-zinc-800\" : \"text-zinc-500\")}\n        >\n          {item}\n        </span>\n      ))}\n      <span className=\"mt-5 mb-1 px-2 text-zinc-400\">Workspaces</span>\n      {workspaces.map(([name, color]) => (\n        <span key={name} className=\"flex items-center gap-2 px-2 py-1.5 text-zinc-500\">\n          <span className={cn(\"size-2 rounded-full\", color)} />\n          {name}\n        </span>\n      ))}\n    </div>\n  );\n}\n\nconst metrics = [\n  { label: \"Revenue\", value: \"$48.2k\", delta: \"+12.4%\", points: \"0,30 15,26 30,28 45,18 60,20 75,10 90,12 100,4\" },\n  { label: \"Active users\", value: \"2,931\", delta: \"+8.1%\", points: \"0,24 15,28 30,20 45,22 60,14 75,16 90,8 100,10\" },\n  { label: \"Conversion\", value: \"3.8%\", delta: \"+0.6%\", points: \"0,28 15,22 30,24 45,20 60,22 75,14 90,16 100,8\" },\n];\n\nfunction MetricCards() {\n  return (\n    <div className=\"grid grid-cols-3 gap-4 bg-zinc-50 text-xs text-zinc-900 dark:bg-zinc-950 dark:text-zinc-100\">\n      {metrics.map((metric) => (\n        <div key={metric.label} className=\"rounded-lg bg-white p-4 ring-1 ring-zinc-950/5 dark:bg-zinc-900 dark:ring-white/5\">\n          <div className=\"flex items-center justify-between text-zinc-500\">\n            {metric.label}\n            <span className=\"flex items-center gap-1 text-emerald-600 dark:text-emerald-400\">\n              <span className=\"size-1.5 rounded-full bg-current\" />\n              Live\n            </span>\n          </div>\n          <div className=\"mt-2 flex items-end justify-between gap-2\">\n            <span className=\"text-2xl font-semibold tracking-tight tabular-nums\">{metric.value}</span>\n            <svg viewBox=\"0 0 100 34\" preserveAspectRatio=\"none\" aria-hidden className=\"h-8 w-[45%] overflow-visible\">\n              <polyline\n                points={metric.points}\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth=\"2\"\n                vectorEffect=\"non-scaling-stroke\"\n                className=\"text-indigo-500\"\n              />\n            </svg>\n          </div>\n          <span className=\"mt-1 block text-emerald-600 tabular-nums dark:text-emerald-400\">{metric.delta} this week</span>\n        </div>\n      ))}\n    </div>\n  );\n}\n\nconst commands = [\n  { label: \"Create invoice\", keys: \"I\" },\n  { label: \"Invite teammate\", keys: \"T\" },\n  { label: \"Export report\", keys: \"E\" },\n  { label: \"Switch workspace\", keys: \"W\" },\n];\n\nfunction CommandMenu() {\n  return (\n    <div className=\"overflow-hidden rounded-lg bg-white text-xs text-zinc-900 shadow-2xl ring-1 shadow-zinc-950/20 ring-zinc-950/10 dark:bg-zinc-800 dark:text-zinc-100 dark:ring-white/10\">\n      <div className=\"flex items-center gap-2 border-b border-zinc-950/5 px-3 py-2.5 text-sm text-zinc-500 dark:border-white/5\">\n        <SearchIcon />\n        Type a command…\n      </div>\n      <div className=\"p-1.5\">\n        <span className=\"block px-2 py-1 text-zinc-400\">Suggestions</span>\n        {commands.map((command, i) => (\n          <span\n            key={command.label}\n            className={cn(\n              \"flex items-center justify-between rounded-md px-2 py-1.5\",\n              i === 1 && \"bg-indigo-500/10 text-indigo-700 dark:text-indigo-300\",\n            )}\n          >\n            {command.label}\n            <kbd className=\"rounded bg-zinc-100 px-1.5 font-sans text-zinc-500 dark:bg-zinc-700 dark:text-zinc-300\">\n              {command.keys}\n            </kbd>\n          </span>\n        ))}\n      </div>\n    </div>\n  );\n}\n\nfunction Cursor() {\n  return (\n    <div className=\"flex flex-col items-start text-xs\">\n      <svg viewBox=\"0 0 16 16\" aria-hidden className=\"size-5 drop-shadow-md\">\n        <path d=\"M2 1.5 14 7.2l-5.2 1.4L6.6 14Z\" className=\"fill-rose-500 stroke-white\" strokeWidth=\"1.2\" strokeLinejoin=\"round\" />\n      </svg>\n      <span className=\"mt-0.5 ml-3 rounded-full bg-rose-500 px-2 py-0.5 font-medium text-white shadow-md\">Maya</span>\n    </div>\n  );\n}\n\nfunction SearchIcon() {\n  return (\n    <svg viewBox=\"0 0 16 16\" aria-hidden className=\"size-3.5 shrink-0 fill-none stroke-current\" strokeWidth=\"1.6\">\n      <circle cx=\"7\" cy=\"7\" r=\"4.5\" />\n      <path d=\"m10.5 10.5 3 3\" strokeLinecap=\"round\" />\n    </svg>\n  );\n}\n"
    }
  ]
}