{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bento-shuffle",
  "type": "registry:component",
  "title": "Bento Shuffle",
  "description": "A white creative-tool bento that glides between three arrangements of the same six tiles. Each tile adapts its content to its new size, and view buttons with a progress line let people pick or pause the layout.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "bento",
    "bento",
    "light",
    "layout",
    "shuffle",
    "animation",
    "creative"
  ],
  "docs": "https://hyperblur.dev/effects/bento-shuffle",
  "files": [
    {
      "path": "registry/hyperblur/bento-shuffle.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/bento-shuffle.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface BentoShuffleProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onChange\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  autoPlay?: boolean;\n  interval?: number;\n  layout?: number;\n  onLayoutChange?: (index: number) => void;\n  accent?: string;\n}\n\ntype Box = [number, number, number, number];\n\nconst layouts: Box[][] = [\n  [[0, 0, 2, 2], [2, 0, 1, 1], [3, 0, 1, 2], [2, 1, 1, 1], [0, 2, 1, 1], [1, 2, 3, 1]],\n  [[1, 0, 3, 2], [0, 1, 1, 2], [0, 0, 1, 1], [1, 2, 1, 1], [2, 2, 1, 1], [3, 2, 1, 1]],\n  [[1, 1, 2, 2], [0, 0, 1, 2], [3, 1, 1, 1], [3, 2, 1, 1], [0, 2, 1, 1], [1, 0, 3, 1]],\n];\n\nconst layoutNames = [\"Canvas\", \"Gallery\", \"Board\"];\n\nconst css = `\n@keyframes hb-wa11-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6%, -4%) scale(1.08); } }\n@keyframes hb-wa11-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }\n@keyframes hb-wa11-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n.hb-wa11 {\n  --hb-wa11-accent: #6d28d9;\n  --hb-wa11-g: 12px;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: #ffffff;\n  color: #111;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wa11 *, .hb-wa11 *::before, .hb-wa11 *::after { box-sizing: border-box; }\n.hb-wa11 em, .hb-wa11 i { font-style: normal; }\n.hb-wa11-in { max-width: 1120px; margin: 0 auto; padding: clamp(56px, 8cqi, 104px) clamp(16px, 5cqi, 48px); }\n.hb-wa11-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; margin-bottom: clamp(22px, 3.4cqi, 36px); }\n.hb-wa11-eyebrow { margin: 0 0 12px; color: var(--hb-wa11-accent); font-size: 13px; font-weight: 600; }\n.hb-wa11-title { margin: 0; max-width: 600px; font-family: var(--font-grotesk, inherit); font-size: clamp(28px, 4.4cqi, 50px); font-weight: 600; line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }\n.hb-wa11-sub { margin: 12px 0 0; max-width: 500px; color: #666; font-size: 15px; line-height: 1.6; }\n.hb-wa11-ctrl { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid #ececec; border-radius: 999px; background: #fafafa; }\n.hb-wa11-ctrl button { position: relative; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; padding: 7px 12px; border: 0; border-radius: 999px; background: none; color: #666; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .25s ease, color .25s ease; }\n.hb-wa11-ctrl button[aria-pressed=\"true\"] { background: #111; color: #fff; }\n.hb-wa11-ctrl button:focus-visible { outline: 2px solid var(--hb-wa11-accent); outline-offset: 2px; }\n.hb-wa11-ctrl button i.hb-wa11-bar { position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .7); transform-origin: left; animation: hb-wa11-tick var(--hb-wa11-t) linear both; }\n.hb-wa11[data-paused=\"true\"] .hb-wa11-bar { animation-play-state: paused; }\n.hb-wa11-ctrl > span { width: 1px; height: 18px; background: #e5e5e5; }\n.hb-wa11-stage { position: relative; aspect-ratio: 16 / 8.6; }\n.hb-wa11-tile { position: absolute; container-type: size; left: calc(var(--x) * (100% + var(--hb-wa11-g)) / 4); top: calc(var(--y) * (100% + var(--hb-wa11-g)) / 3); width: calc(var(--w) * (100% + var(--hb-wa11-g)) / 4 - var(--hb-wa11-g)); height: calc(var(--h) * (100% + var(--hb-wa11-g)) / 3 - var(--hb-wa11-g)); overflow: hidden; border: 1px solid #ececec; border-radius: 20px; background: #f7f7f8; transition: left .8s cubic-bezier(.65, 0, .2, 1), top .8s cubic-bezier(.65, 0, .2, 1), width .8s cubic-bezier(.65, 0, .2, 1), height .8s cubic-bezier(.65, 0, .2, 1); transition-delay: calc(var(--i) * 40ms); animation: hb-wa11-rise .7s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--i) * 70ms); }\n.hb-wa11-tile:hover { border-color: #d9d9d9; }\n.hb-wa11-lab { position: absolute; left: 14px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px); color: #333; font-size: 11.5px; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }\n.hb-wa11-art { position: absolute; inset: 0; overflow: hidden; background: #1b1033; }\n.hb-wa11-art i { position: absolute; border-radius: 50%; filter: blur(30px); animation: hb-wa11-drift 9s ease-in-out infinite; }\n.hb-wa11-art b { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 4px); mix-blend-mode: overlay; }\n.hb-wa11-art span { position: absolute; left: 7cqw; top: 9cqh; color: #fff; font-family: var(--font-grotesk, inherit); font-size: clamp(22px, 11cqmin, 64px); font-weight: 600; line-height: .95; letter-spacing: -.04em; mix-blend-mode: difference; }\n.hb-wa11-pal { position: absolute; inset: 12px 12px 46px; display: flex; gap: 6px; }\n.hb-wa11-pal i { flex: 1; border-radius: 10px; background: var(--c); transition: flex .5s cubic-bezier(.22, 1, .36, 1); }\n.hb-wa11-pal i:hover { flex: 2.2; }\n@container (max-aspect-ratio: 1 / 1.2) { .hb-wa11-pal { flex-direction: column; } }\n.hb-wa11-type { position: absolute; inset: 14px 16px 44px; display: flex; flex-direction: column; justify-content: space-between; }\n.hb-wa11-type strong { font-family: var(--font-grotesk, inherit); font-size: clamp(40px, 46cqmin, 130px); font-weight: 600; line-height: .85; letter-spacing: -.05em; }\n.hb-wa11-type small { color: #777; font-family: var(--font-mono, ui-monospace, monospace); font-size: 10.5px; line-height: 1.6; }\n@container (max-height: 160px) { .hb-wa11-type small { display: none; } }\n.hb-wa11-exp { position: absolute; inset: 14px 14px 46px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }\n.hb-wa11-exp span { padding: 5px 9px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; color: #444; }\n.hb-wa11-exp span:first-child { border-color: transparent; background: var(--hb-wa11-accent); color: #fff; }\n.hb-wa11-layers { position: absolute; inset: 14px 14px 46px; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: #555; }\n.hb-wa11-layers div { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 7px; white-space: nowrap; overflow: hidden; }\n.hb-wa11-layers div[data-on=\"true\"] { background: color-mix(in srgb, var(--hb-wa11-accent) 12%, #fff); color: var(--hb-wa11-accent); font-weight: 600; }\n.hb-wa11-layers i { flex: none; width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid currentColor; }\n.hb-wa11-quote { position: absolute; inset: 0; display: flex; align-items: center; gap: 4cqw; padding: 18px 20px 44px; background: #111; color: #fff; }\n.hb-wa11-quote p { margin: 0; font-family: var(--font-grotesk, inherit); font-size: clamp(14px, 14cqh, 24px); font-weight: 500; line-height: 1.25; letter-spacing: -.015em; }\n.hb-wa11-quote small { display: block; margin-top: 8px; color: #a3a3a3; font-family: var(--font-sans, inherit); font-size: 12px; font-weight: 400; }\n.hb-wa11-avs { display: flex; flex: none; }\n.hb-wa11-avs span { display: grid; place-items: center; width: 34px; height: 34px; margin-left: -8px; border: 2px solid #111; border-radius: 50%; color: #111; font-size: 11px; font-weight: 800; }\n@container (max-width: 300px) { .hb-wa11-avs { display: none; } .hb-wa11-quote p { font-size: 14px; } }\n.hb-wa11-quote .hb-wa11-lab { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }\n@container (max-width: 640px) {\n  .hb-wa11-ctrl { display: none; }\n  .hb-wa11-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; gap: var(--hb-wa11-g); aspect-ratio: auto; }\n  .hb-wa11-tile { position: relative; left: auto !important; top: auto !important; width: auto !important; height: auto !important; }\n  .hb-wa11-tile[data-k=\"0\"], .hb-wa11-tile[data-k=\"5\"] { grid-column: span 2; }\n  .hb-wa11-tile[data-k=\"0\"] { height: 240px !important; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-wa11 *, .hb-wa11 *::before, .hb-wa11 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst palette = [\"#1b1033\", \"#6d28d9\", \"#c084fc\", \"#f0abfc\", \"#fde68a\"];\n\nexport function BentoShuffle({\n  eyebrow = \"Glasswing for brand teams\",\n  title = \"A board that rearranges itself around the work\",\n  subtitle = \"Artwork, palette, type and exports live on one canvas. Switch views and every tile finds its new place.\",\n  autoPlay = true,\n  interval = 3600,\n  layout,\n  onLayoutChange,\n  accent = \"#6d28d9\",\n  className,\n  style,\n  ...rest\n}: BentoShuffleProps) {\n  const [inner, setInner] = React.useState(0);\n  const [paused, setPaused] = React.useState(false);\n  const [hover, setHover] = React.useState(false);\n  const active = (layout ?? inner) % layouts.length;\n\n  const go = (i: number) => {\n    const n = ((i % layouts.length) + layouts.length) % layouts.length;\n    if (layout === undefined) setInner(n);\n    onLayoutChange?.(n);\n  };\n\n  const boxes = layouts[active];\n\n  const tiles: React.ReactNode[] = [\n    <>\n      <div className=\"hb-wa11-art\" aria-hidden=\"true\">\n        <i style={{ left: \"-10%\", top: \"-20%\", width: \"70%\", height: \"90%\", background: \"#7c3aed\" }} />\n        <i style={{ right: \"-15%\", top: \"10%\", width: \"60%\", height: \"80%\", background: \"#f0abfc\", animationDelay: \"-3s\" }} />\n        <i style={{ left: \"20%\", bottom: \"-30%\", width: \"60%\", height: \"70%\", background: \"#fbbf24\", animationDelay: \"-6s\" }} />\n        <b />\n        <span>Fall<br />Campaign</span>\n      </div>\n      <span className=\"hb-wa11-lab\">Artboard · 1920×1080</span>\n    </>,\n    <>\n      <div className=\"hb-wa11-pal\" aria-hidden=\"true\">\n        {palette.map((c) => (\n          <i key={c} style={{ \"--c\": c } as React.CSSProperties} />\n        ))}\n      </div>\n      <span className=\"hb-wa11-lab\">Palette · 5 tokens</span>\n    </>,\n    <>\n      <div className=\"hb-wa11-type\">\n        <strong>Aa</strong>\n        <small>Grotesk 600<br />-4% tracking<br />Display / 64</small>\n      </div>\n      <span className=\"hb-wa11-lab\">Type scale</span>\n    </>,\n    <>\n      <div className=\"hb-wa11-exp\">\n        {[\"PNG\", \"SVG\", \"PDF\", \"MP4\", \"Lottie\", \"WebP\"].map((f) => (\n          <span key={f}>{f}</span>\n        ))}\n      </div>\n      <span className=\"hb-wa11-lab\">Export</span>\n    </>,\n    <>\n      <div className=\"hb-wa11-layers\">\n        <div><i />Headline</div>\n        <div data-on=\"true\"><i />Gradient blob</div>\n        <div><i />Grain</div>\n      </div>\n      <span className=\"hb-wa11-lab\">Layers · 14</span>\n    </>,\n    <>\n      <div className=\"hb-wa11-quote\">\n        <span className=\"hb-wa11-avs\" aria-hidden=\"true\">\n          {[[\"RV\", \"#f0abfc\"], [\"DK\", \"#fde68a\"], [\"AO\", \"#a7f3d0\"]].map(([n, c]) => (\n            <span key={n} style={{ background: c }}>{n}</span>\n          ))}\n        </span>\n        <p>\n          We shipped the whole fall campaign from one board, without a single handoff file.\n          <small>Rosa Vidal, Brand Lead at Fernwood</small>\n        </p>\n        <span className=\"hb-wa11-lab\">3 editing now</span>\n      </div>\n    </>,\n  ];\n\n  return (\n    <section\n      className={[\"hb-wa11\", className].filter(Boolean).join(\" \")}\n      data-paused={paused || hover || !autoPlay}\n      style={{ \"--hb-wa11-accent\": accent, \"--hb-wa11-t\": `${interval}ms`, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-bento-shuffle\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wa11-in\">\n        <div className=\"hb-wa11-head\">\n          <div>\n            <p className=\"hb-wa11-eyebrow\">{eyebrow}</p>\n            <h2 className=\"hb-wa11-title\">{title}</h2>\n            <p className=\"hb-wa11-sub\">{subtitle}</p>\n          </div>\n          <div className=\"hb-wa11-ctrl\" role=\"group\" aria-label=\"Board layout\">\n            {layoutNames.map((n, i) => (\n              <button key={n} type=\"button\" aria-pressed={i === active} onClick={() => go(i)}>\n                {n}\n                {i === active && autoPlay && <i key={active} className=\"hb-wa11-bar\" aria-hidden=\"true\" onAnimationEnd={() => go(active + 1)} />}\n              </button>\n            ))}\n            <span aria-hidden=\"true\" />\n            <button type=\"button\" aria-pressed={paused} aria-label={paused ? \"Resume shuffle\" : \"Pause shuffle\"} onClick={() => setPaused((p) => !p)}>\n              {paused ? (\n                <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\"><path d=\"M3 2v8l7-4z\" fill=\"currentColor\" /></svg>\n              ) : (\n                <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\"><path d=\"M3 2h2v8H3zM7 2h2v8H7z\" fill=\"currentColor\" /></svg>\n              )}\n            </button>\n          </div>\n        </div>\n        <div className=\"hb-wa11-stage\" onPointerEnter={() => setHover(true)} onPointerLeave={() => setHover(false)}>\n          {tiles.map((t, i) => {\n            const [x, y, w, h] = boxes[i];\n            return (\n              <div key={i} className=\"hb-wa11-tile\" data-k={i} style={{ \"--x\": x, \"--y\": y, \"--w\": w, \"--h\": h, \"--i\": i } as React.CSSProperties}>\n                {t}\n              </div>\n            );\n          })}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}