{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bento-tilted-plane",
  "type": "registry:component",
  "title": "Bento Tilted Plane",
  "description": "An infrastructure bento laid on a tilted 3D plane, tiles lifted to different heights, that settles flat as the section scrolls into view. Accepts a controlled progress or loops by itself for previews.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "bento",
    "bento",
    "3d",
    "perspective",
    "scroll",
    "infrastructure",
    "edge"
  ],
  "docs": "https://hyperblur.dev/effects/bento-tilted-plane",
  "files": [
    {
      "path": "registry/hyperblur/bento-tilted-plane.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/bento-tilted-plane.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface BentoTiltedPlaneProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  cta?: { label: string; href: string } | null;\n  progress?: number;\n  autoPlay?: boolean;\n  accent?: string;\n}\n\nconst css = `\n@property --hb-wa12-p { syntax: \"<number>\"; inherits: true; initial-value: 0; }\n@keyframes hb-wa12-loop { 0%, 12% { --hb-wa12-p: 0; } 46%, 66% { --hb-wa12-p: 1; } 100% { --hb-wa12-p: 0; } }\n@keyframes hb-wa12-bar { from { transform: scaleY(.2); } to { transform: scaleY(1); } }\n@keyframes hb-wa12-dash { to { stroke-dashoffset: -1; } }\n@keyframes hb-wa12-blink { 50% { opacity: .3; } }\n.hb-wa12 {\n  --hb-wa12-accent: #8b5cf6;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  container-type: inline-size;\n  background: #08070c;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wa12[data-auto=\"true\"] { animation: hb-wa12-loop 7s cubic-bezier(.65, 0, .35, 1) infinite; }\n.hb-wa12 *, .hb-wa12 *::before, .hb-wa12 *::after { box-sizing: border-box; }\n.hb-wa12 em, .hb-wa12 i { font-style: normal; }\n.hb-wa12::before { content: \"\"; position: absolute; left: 50%; top: 30%; width: 900px; height: 600px; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-wa12-accent) 22%, transparent), transparent); pointer-events: none; }\n.hb-wa12-in { position: relative; max-width: 1120px; margin: 0 auto; padding: clamp(56px, 8cqi, 104px) clamp(16px, 5cqi, 48px); }\n.hb-wa12-head { max-width: 660px; margin: 0 auto; text-align: center; }\n.hb-wa12-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; color: #c4b5fd; font-size: 12.5px; font-weight: 500; }\n.hb-wa12-eyebrow::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: var(--hb-wa12-accent); animation: hb-wa12-blink 1.6s ease infinite; }\n.hb-wa12-title { margin: 0; font-family: var(--font-grotesk, inherit); font-size: clamp(30px, 4.8cqi, 54px); font-weight: 600; line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }\n.hb-wa12-sub { margin: 14px auto 0; max-width: 520px; color: #8f8c99; font-size: 15.5px; line-height: 1.6; }\n.hb-wa12-cta { display: inline-flex; margin-top: 22px; padding: 10px 18px; border-radius: 999px; background: #ededed; color: #08070c; font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .2s ease, background .2s ease; }\n.hb-wa12-cta:hover { background: #fff; transform: translate3d(0, -1px, 0); }\n.hb-wa12-cta:focus-visible { outline: 2px solid var(--hb-wa12-accent); outline-offset: 3px; }\n.hb-wa12-scene { margin-top: clamp(20px, 3cqi, 36px); perspective: 1400px; perspective-origin: 50% 0%; }\n.hb-wa12-plane { --q: calc(1 - var(--hb-wa12-p)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 200px 190px; grid-template-areas: \"lat lat rps cache\" \"reg cold cold dep\"; gap: 12px; transform-style: preserve-3d; transform-origin: 50% 30%; transform: rotateX(calc(var(--q) * 48deg)) rotateZ(calc(var(--q) * -14deg)) scale(calc(.82 + var(--hb-wa12-p) * .18)) translateY(calc(var(--q) * -40px)); will-change: transform; }\n.hb-wa12-t { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 16px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px; background: linear-gradient(180deg, #14121b, #0e0d13); transform: translateZ(calc(var(--q) * var(--z) * 1px)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 calc(var(--q) * var(--z) * .9px) calc(var(--q) * var(--z) * 1.2px + 10px) rgba(0, 0, 0, .55); }\n.hb-wa12-t h3 { margin: 0; display: flex; justify-content: space-between; gap: 8px; color: #a8a4b5; font-size: 12px; font-weight: 500; }\n.hb-wa12-t h3 small { color: #6b6878; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10.5px; }\n.hb-wa12-big { margin-top: 6px; font-family: var(--font-grotesk, inherit); font-size: clamp(26px, 3.4cqi, 38px); font-weight: 600; letter-spacing: -.04em; }\n.hb-wa12-big em { margin-left: 6px; color: #4ade80; font-family: var(--font-sans, inherit); font-size: 12px; font-weight: 500; letter-spacing: 0; }\n.hb-wa12-lat { grid-area: lat; }\n.hb-wa12-map { position: absolute; inset: 52px 0 0; width: 100%; height: calc(100% - 52px); }\n.hb-wa12-map circle.hb-wa12-d { fill: #2a2734; }\n.hb-wa12-map path { fill: none; stroke: var(--hb-wa12-accent); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: .05 .1; vector-effect: non-scaling-stroke; animation: hb-wa12-dash 3s linear infinite; }\n.hb-wa12-map circle.hb-wa12-n { fill: var(--hb-wa12-accent); stroke: #08070c; stroke-width: 1.5; }\n.hb-wa12-lat .hb-wa12-big { position: relative; z-index: 1; }\n.hb-wa12-rps { grid-area: rps; }\n.hb-wa12-bars { display: flex; align-items: flex-end; gap: 4px; flex: 1; margin-top: 8px; }\n.hb-wa12-bars i { flex: 1; height: var(--h); border-radius: 3px; background: linear-gradient(180deg, var(--hb-wa12-accent), color-mix(in srgb, var(--hb-wa12-accent) 20%, #111)); transform-origin: bottom; animation: hb-wa12-bar 1.2s ease-in-out infinite alternate; animation-delay: calc(var(--j) * -110ms); }\n.hb-wa12-cache { grid-area: cache; align-items: center; }\n.hb-wa12-cache h3 { align-self: stretch; }\n.hb-wa12-gauge { width: 100%; max-width: 170px; margin-top: auto; }\n.hb-wa12-gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }\n.hb-wa12-gauge text { fill: #ededed; font-family: var(--font-grotesk, inherit); font-size: 22px; font-weight: 600; letter-spacing: -.03em; }\n.hb-wa12-reg { grid-area: reg; }\n.hb-wa12-rl { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12px; }\n.hb-wa12-rl li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: #d4d2dc; }\n.hb-wa12-rl li::before { content: \"\"; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }\n.hb-wa12-rl li[data-warm=\"true\"]::before { background: #fbbf24; }\n.hb-wa12-rl small { color: #6b6878; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10.5px; }\n.hb-wa12-cold { grid-area: cold; }\n.hb-wa12-hb { display: grid; gap: 10px; margin-top: auto; }\n.hb-wa12-hb div { display: grid; grid-template-columns: 86px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 11.5px; color: #a8a4b5; }\n.hb-wa12-hb span:last-child { color: #ededed; font-family: var(--font-mono, ui-monospace, monospace); text-align: right; }\n.hb-wa12-hb i { height: 8px; border-radius: 4px; background: #1d1b25; overflow: hidden; }\n.hb-wa12-hb i::after { content: \"\"; display: block; width: var(--w); height: 100%; border-radius: 4px; background: var(--c, var(--hb-wa12-accent)); }\n.hb-wa12-dep { grid-area: dep; }\n.hb-wa12-sha { margin-top: 8px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; color: #c4b5fd; }\n.hb-wa12-dsteps { display: flex; gap: 4px; margin-top: auto; }\n.hb-wa12-dsteps i { flex: 1; height: 6px; border-radius: 3px; background: var(--hb-wa12-accent); }\n.hb-wa12-dsteps i:last-child { background: #2a2734; animation: hb-wa12-blink 1.2s ease infinite; }\n.hb-wa12-dep p { margin: 10px 0 0; color: #8f8c99; font-size: 12px; }\n@container (max-width: 820px) {\n  .hb-wa12-plane { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 200px 180px 180px; grid-template-areas: \"lat lat\" \"rps cache\" \"reg dep\"; }\n  .hb-wa12-cold { display: none; }\n}\n@container (max-width: 520px) {\n  .hb-wa12-plane { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: 180px; grid-template-areas: \"lat\" \"rps\" \"cache\" \"reg\" \"dep\"; transform: none; }\n  .hb-wa12-t { transform: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-wa12, .hb-wa12 *, .hb-wa12 *::before, .hb-wa12 *::after { animation: none !important; transition: none !important; }\n  .hb-wa12-plane { transform: none; }\n  .hb-wa12-t { transform: none; }\n}\n`;\n\nfunction hash(n: number) {\n  let x = (n + 7) * 2654435761;\n  x = (x ^ (x >>> 16)) >>> 0;\n  x = Math.imul(x, 2246822519) >>> 0;\n  return ((x ^ (x >>> 13)) >>> 0) / 4294967295;\n}\n\nconst dots: [number, number][] = [];\nfor (let r = 0; r < 9; r++) {\n  for (let c = 0; c < 40; c++) {\n    if (hash(r * 40 + c) > 0.42 && Math.sin(c * 0.35 + r * 0.6) > -0.4) dots.push([6 + c * 10, 8 + r * 10]);\n  }\n}\n\nconst nodes: [number, number][] = [[70, 30], [190, 22], [214, 62], [330, 40], [120, 70], [366, 76]];\n\nexport function BentoTiltedPlane({\n  eyebrow = \"Cobalt Edge\",\n  title = \"Infrastructure that lands flat in front of you\",\n  subtitle = \"Scroll and the whole stack settles into place: latency, throughput, cache and every region, on one plane.\",\n  cta = { label: \"Deploy to the edge\", href: \"#\" },\n  progress,\n  autoPlay = false,\n  accent = \"#8b5cf6\",\n  className,\n  style,\n  ...rest\n}: BentoTiltedPlaneProps) {\n  const ref = React.useRef<HTMLElement>(null);\n  const [scrollP, setScrollP] = React.useState(0);\n  const controlled = progress !== undefined;\n\n  React.useEffect(() => {\n    if (controlled || autoPlay) return;\n    const el = ref.current;\n    if (!el) return;\n    let raf = 0;\n    const update = () => {\n      raf = 0;\n      const r = el.getBoundingClientRect();\n      const vh = window.innerHeight || 1;\n      const v = Math.max(0, Math.min(1, (vh - r.top) / (vh * 0.85)));\n      setScrollP(Math.round(v * 1000) / 1000);\n    };\n    const onScroll = () => {\n      if (!raf) raf = requestAnimationFrame(update);\n    };\n    raf = requestAnimationFrame(update);\n    document.addEventListener(\"scroll\", onScroll, { capture: true, passive: true });\n    window.addEventListener(\"resize\", onScroll);\n    return () => {\n      document.removeEventListener(\"scroll\", onScroll, { capture: true });\n      window.removeEventListener(\"resize\", onScroll);\n      if (raf) cancelAnimationFrame(raf);\n    };\n  }, [controlled, autoPlay]);\n\n  const p = controlled ? Math.max(0, Math.min(1, progress)) : scrollP;\n  const rootStyle = { \"--hb-wa12-accent\": accent, ...(autoPlay ? {} : { \"--hb-wa12-p\": p }), ...style } as React.CSSProperties;\n  const z = (v: number) => ({ \"--z\": v }) as React.CSSProperties;\n\n  return (\n    <section ref={ref} className={[\"hb-wa12\", className].filter(Boolean).join(\" \")} data-auto={autoPlay} style={rootStyle} {...rest}>\n      <style href=\"hb-bento-tilted-plane\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wa12-in\">\n        <div className=\"hb-wa12-head\">\n          <p className=\"hb-wa12-eyebrow\">{eyebrow}</p>\n          <h2 className=\"hb-wa12-title\">{title}</h2>\n          <p className=\"hb-wa12-sub\">{subtitle}</p>\n          {cta && <a className=\"hb-wa12-cta\" href={cta.href}>{cta.label}</a>}\n        </div>\n        <div className=\"hb-wa12-scene\">\n          <div className=\"hb-wa12-plane\">\n            <article className=\"hb-wa12-t hb-wa12-lat\" style={z(60)}>\n              <h3>Global p50 latency <small>6 regions</small></h3>\n              <div className=\"hb-wa12-big\">23 ms<em>−9 ms this week</em></div>\n              <svg className=\"hb-wa12-map\" viewBox=\"0 0 400 100\" preserveAspectRatio=\"xMidYMid slice\" aria-hidden=\"true\">\n                {dots.map(([x, y], j) => (\n                  <circle key={j} className=\"hb-wa12-d\" cx={x} cy={y} r=\"1.6\" />\n                ))}\n                <path d=\"M70 30 Q 130 0 190 22 T 330 40\" pathLength={1} />\n                <path d=\"M120 70 Q 170 90 214 62 T 366 76\" pathLength={1} />\n                {nodes.map(([x, y], j) => (\n                  <circle key={j} className=\"hb-wa12-n\" cx={x} cy={y} r=\"4\" />\n                ))}\n              </svg>\n            </article>\n            <article className=\"hb-wa12-t hb-wa12-rps\" style={z(110)}>\n              <h3>Requests / sec <small>live</small></h3>\n              <div className=\"hb-wa12-big\">48.2k</div>\n              <div className=\"hb-wa12-bars\" aria-hidden=\"true\">\n                {[40, 62, 48, 70, 56, 82, 66, 90, 74, 96].map((h, j) => (\n                  <i key={j} style={{ \"--h\": `${h}%`, \"--j\": j } as React.CSSProperties} />\n                ))}\n              </div>\n            </article>\n            <article className=\"hb-wa12-t hb-wa12-cache\" style={z(150)}>\n              <h3>Cache hit <small>24h</small></h3>\n              <svg className=\"hb-wa12-gauge\" viewBox=\"0 0 120 70\" aria-hidden=\"true\">\n                <path d=\"M12 62 A 48 48 0 0 1 108 62\" stroke=\"#1d1b25\" />\n                <path d=\"M12 62 A 48 48 0 0 1 108 62\" stroke={accent} pathLength={100} strokeDasharray=\"91 100\" />\n                <text x=\"60\" y=\"60\" textAnchor=\"middle\">91%</text>\n              </svg>\n            </article>\n            <article className=\"hb-wa12-t hb-wa12-reg\" style={z(90)}>\n              <h3>Regions <small>all healthy</small></h3>\n              <ul className=\"hb-wa12-rl\">\n                <li>Frankfurt <small>14 ms</small></li>\n                <li>São Paulo <small>31 ms</small></li>\n                <li>Singapore <small>19 ms</small></li>\n                <li data-warm=\"true\">Sydney <small>warming</small></li>\n              </ul>\n            </article>\n            <article className=\"hb-wa12-t hb-wa12-cold\" style={z(40)}>\n              <h3>Cold start by runtime <small>p95</small></h3>\n              <div className=\"hb-wa12-hb\">\n                {[[\"Edge (V8)\", 8, \"4 ms\"], [\"Node 24\", 46, \"112 ms\"], [\"Python 3.14\", 72, \"240 ms\"]].map(([n, w, v], j) => (\n                  <div key={String(n)}>\n                    <span>{n}</span>\n                    <i style={{ \"--w\": `${w}%`, \"--c\": j === 0 ? accent : \"#4b4760\" } as React.CSSProperties} />\n                    <span>{v}</span>\n                  </div>\n                ))}\n              </div>\n            </article>\n            <article className=\"hb-wa12-t hb-wa12-dep\" style={z(130)}>\n              <h3>Deploying <small>3/4</small></h3>\n              <div className=\"hb-wa12-sha\">main · 8e1f04c</div>\n              <p>Propagating to Sydney, about 6 s left.</p>\n              <div className=\"hb-wa12-dsteps\" aria-hidden=\"true\">\n                <i />\n                <i />\n                <i />\n                <i />\n              </div>\n            </article>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}