{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"three-cloth-bound-sample-books-lying-open-side-by-side-with-a-site-design-across-each-spread-that-close-their-covers-when-you-pick-one","type":"registry:block","title":"Three Cloth-Bound Sample Books Lying Open Side by Side with a Site Design Across Each Spread That Close Their Covers When You Pick One","description":"Design comparison with cloth-bound books lying open, a website design across each spread: pick one and the others close. Free React and HTML code to copy.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/three-cloth-bound-sample-books-lying-open-side-by-side-with-a-site-design-across-each-spread-that-close-their-covers-when-you-pick-one.tsx","type":"registry:component","content":"import { useEffect, useRef, useState } from \"react\";\nimport type { KeyboardEvent as ReactKeyboardEvent, ReactNode } from \"react\";\nimport { motion, useMotionValue, useReducedMotion, useSpring, useTransform } from \"framer-motion\";\n\n// One book is two boards HALF wide and BH tall. A design is printed across the two pages at DW by DH.\nconst HALF = 176;\nconst BH = 250;\nconst EDGE = 9; // cloth turn-in plus the visible block of page edges at the fore-edge\nconst DW = (HALF - EDGE) * 2;\nconst DH = BH - 12;\nconst THICK = 14; // how far a closed cover sits above the pages it lands on\nconst BLUE = \"#4F98FB\"; // the ribbon markers, the foil and the active pill\nconst HOLD = 4200; // rest between steps of the self-running demo, in milliseconds\nconst SANS = '\"Inter Tight\", \"Inter\", ui-sans-serif, system-ui, sans-serif';\nconst SERIF = '\"Iowan Old Style\", \"Palatino Linotype\", Palatino, Georgia, serif';\nconst MONO = 'ui-monospace, \"SF Mono\", Menlo, Consolas, monospace';\n\nconst sentence = \"A ceramics studio that sells small-batch tableware and runs wheel classes.\";\n\nconst GRAIN =\n  \"url(\\\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>\\\")\";\nconst WEAVE = \"repeating-linear-gradient(0deg, rgba(255,255,255,0.07) 0 1px, rgba(0,0,0,0) 1px 2px), repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 1px, rgba(0,0,0,0) 1px 2px)\";\nconst PAGES = \"repeating-linear-gradient(180deg, #F3EFE6 0px, #F3EFE6 1px, #B9B2A3 1px, #B9B2A3 2px)\";\n\nfunction Photo({ src, alt, tone, focus = \"50% 50%\", className = \"\" }: { src: string; alt: string; tone: string; focus?: string; className?: string }) {\n  return (\n    <div className={`overflow-hidden ${className}`} style={{ backgroundColor: tone }}>\n      <img src={src} alt={alt} draggable={false} className=\"h-full w-full object-cover\" style={{ objectPosition: focus }} />\n    </div>\n  );\n}\n\n// Three designs of one invented ceramics studio's homepage, each laid out across a two-page spread.\nconst books: { name: string; note: string; cloth: string; foil: string; ribbon: string; spread: ReactNode }[] = [\n  {\n    name: \"Plinth\",\n    note: \"White space, black grotesque, one picture\",\n    cloth: \"#CFC7B8\",\n    foil: \"#1B1D22\",\n    ribbon: BLUE,\n    spread: (\n      <div className=\"flex h-full w-full bg-[#F8F6F1] text-[#101114]\" style={{ fontFamily: SANS }}>\n        <div className=\"flex w-1/2 flex-col p-[13px]\">\n          <div className=\"flex items-center justify-between text-[5.5px] font-semibold uppercase tracking-[0.16em]\">\n            <span className=\"text-[9px] font-black tracking-[0.02em]\">OSTRA</span><span className=\"text-[#101114]/60\">Shop &nbsp; Classes</span>\n          </div>\n          <div className=\"mt-auto text-[27px] font-black leading-[0.9] tracking-[-0.05em]\">Pots for the everyday table.</div>\n          <div className=\"mt-[8px] text-[6.5px] font-medium leading-[1.45] text-[#101114]/70\">Stoneware thrown in small batches<br />on Calder Row.</div>\n          <div className=\"mt-[9px] inline-flex h-[17px] w-fit items-center rounded-full bg-[#101114] px-[10px] text-[6.5px] font-bold text-white\">Shop the shelf</div>\n        </div>\n        <div className=\"flex w-1/2 flex-col p-[13px] pl-[15px]\">\n          <Photo className=\"min-h-0 flex-1 rounded-[2px]\" tone=\"#E9B48E\" focus=\"50% 55%\" src=\"https://images.pexels.com/photos/5199152/pexels-photo-5199152.jpeg?auto=compress&cs=tinysrgb&w=700\" alt=\"A white jug, a striped jar and a pomegranate on blue and peach paper\" />\n          <div className=\"mt-[7px] flex justify-between text-[5.5px] font-semibold uppercase tracking-[0.14em] text-[#101114]/70\"><span>The pouring jug</span><span>No. 14</span></div>\n        </div>\n      </div>\n    ),\n  },\n  {\n    name: \"Kiln\",\n    note: \"Midnight blue, an italic serif, a still life\",\n    cloth: \"#14171E\",\n    foil: BLUE,\n    ribbon: BLUE,\n    spread: (\n      <div className=\"relative h-full w-full bg-[#0A1526] text-[#F1ECE2]\" style={{ fontFamily: SERIF }}>\n        <Photo className=\"absolute inset-y-0 right-0 w-[56%]\" tone=\"#12305A\" focus=\"50% 62%\" src=\"https://images.pexels.com/photos/40085654/pexels-photo-40085654.jpeg?auto=compress&cs=tinysrgb&w=700\" alt=\"White vases and paper forms arranged against a deep blue cloth\" />\n        <div className=\"absolute inset-0 bg-gradient-to-r from-[#0A1526] from-[42%] via-[#0A1526]/70 via-[54%] to-transparent to-[70%]\" />\n        <div className=\"absolute inset-[8px] border border-[#F1ECE2]/25\" />\n        <div className=\"absolute inset-x-[19px] top-[18px] flex justify-between text-[5.5px] font-semibold uppercase tracking-[0.24em] text-[#F1ECE2]/80\" style={{ fontFamily: SANS }}>\n          <span>Ostra Ceramics</span><span>Collection &nbsp; Studio &nbsp; Visit</span>\n        </div>\n        <div className=\"absolute bottom-[20px] left-[19px] w-[41%]\">\n          <div className=\"text-[21px] italic leading-[1.04] tracking-[-0.015em]\">Thrown, glazed and fired by hand.</div>\n          <div className=\"mt-[9px] inline-block border-b border-[#F1ECE2]/70 pb-[1.5px] text-[6.5px] font-medium\" style={{ fontFamily: SANS }}>See the autumn collection</div>\n        </div>\n      </div>\n    ),\n  },\n  {\n    name: \"Slip\",\n    note: \"Clay red and custard, round shapes, typewriter labels\",\n    cloth: \"#3F7FD9\",\n    foil: \"#F6F4EF\",\n    ribbon: \"#F6F4EF\",\n    spread: (\n      <div className=\"flex h-full w-full\" style={{ fontFamily: MONO }}>\n        <div className=\"relative flex w-1/2 flex-col bg-[#C24E2C] p-[13px] text-[#FBEBD2]\">\n          <div className=\"text-[5.5px] uppercase tracking-[0.14em]\">(studio + shop)</div>\n          <div className=\"mt-[10px] text-[54px] font-black leading-[0.8] tracking-[-0.07em]\" style={{ fontFamily: SANS }}>os<br />tra</div>\n          <div className=\"mt-auto flex items-center gap-[7px]\">\n            <span className=\"inline-flex h-[18px] items-center rounded-full bg-[#FBEBD2] px-[10px] text-[6px] font-bold uppercase tracking-[0.06em] text-[#7A2A12]\">Join a class</span>\n            <span className=\"h-[18px] w-[18px] rounded-full bg-[#F2B93B]\" />\n          </div>\n        </div>\n        <div className=\"flex w-1/2 flex-col bg-[#F3E4C3] p-[13px] pl-[15px] text-[#3A1D10]\">\n          <Photo className=\"mx-auto h-[112px] w-[112px] shrink-0 rounded-full\" tone=\"#C9A27F\" focus=\"50% 40%\" src=\"https://images.pexels.com/photos/20362430/pexels-photo-20362430.jpeg?auto=compress&cs=tinysrgb&w=700\" alt=\"Two clay-covered hands shaping a small pot on a spinning wheel\" />\n          <div className=\"mt-auto text-[6px] uppercase tracking-[0.06em]\">\n            {[[\"Wheel night\", \"Thu\"], [\"Glaze day\", \"Sat\"], [\"Open shelf\", \"Sun\"]].map(([a, b]) => (\n              <div key={a} className=\"flex justify-between border-t border-dashed border-[#3A1D10]/45 py-[5px]\"><span>{a}</span><span>{b}</span></div>\n            ))}\n          </div>\n        </div>\n      </div>\n    ),\n  },\n];\n\n// The visible half of a spread: `side` picks the left or the right page of the same drawing.\nfunction Page({ side, children }: { side: \"left\" | \"right\"; children: ReactNode }) {\n  const left = side === \"left\";\n  return (\n    <div className=\"absolute overflow-hidden bg-[#F3EFE6]\" style={{ top: 6, height: DH, width: DW / 2, left: left ? EDGE : 0, borderRadius: left ? \"2px 0 0 2px\" : \"0 2px 2px 0\" }}>\n      <div className=\"absolute top-0 h-full\" style={{ width: DW, left: left ? 0 : -DW / 2 }}>{children}</div>\n      {/* the page swells up from the fore-edge and dives into the gutter */}\n      <div className=\"pointer-events-none absolute inset-0\" style={{ background: left ? \"linear-gradient(90deg, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0) 7%, rgba(255,255,255,0) 52%, rgba(255,255,255,0.2) 76%, rgba(0,0,0,0.05) 88%, rgba(0,0,0,0.42) 100%)\" : \"linear-gradient(270deg, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0) 7%, rgba(255,255,255,0) 52%, rgba(255,255,255,0.2) 76%, rgba(0,0,0,0.05) 88%, rgba(0,0,0,0.42) 100%)\" }} />\n      <div className=\"pointer-events-none absolute inset-0 opacity-[0.22] mix-blend-multiply\" style={{ backgroundImage: GRAIN }} />\n    </div>\n  );\n}\n\n// One cloth-covered board seen from the inside, with the block of page edges along its outer side.\nfunction Board({ side, cloth, children }: { side: \"left\" | \"right\"; cloth: string; children: ReactNode }) {\n  const left = side === \"left\";\n  return (\n    <div className=\"absolute inset-0\" style={{ backgroundColor: cloth, backgroundImage: `${WEAVE}, ${GRAIN}`, borderRadius: left ? \"4px 0 0 4px\" : \"0 4px 4px 0\", boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.14), inset 0 1px 0 rgba(255,255,255,0.3)\" }}>\n      <div className=\"absolute\" style={{ top: 5, height: DH + 2, width: 6, left: left ? 4 : undefined, right: left ? undefined : 4, backgroundImage: \"repeating-linear-gradient(90deg, #F6F2E9 0px, #F6F2E9 1px, #B5AE9E 1px, #B5AE9E 2px)\", borderRadius: 1 }} />\n      {children}\n    </div>\n  );\n}\n\n// The front edge of a board and its pages, which the camera sees because it looks down the table at an angle.\nfunction Lip({ cloth, deep }: { cloth: string; deep: number }) {\n  return (\n    <div className=\"absolute left-0 w-full\" style={{ top: BH - 1, height: deep, borderRadius: \"0 0 3px 3px\", background: `linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.38)), ${PAGES}`, boxShadow: `inset 0 -2.5px 0 ${cloth}, inset 0 -3.5px 0 rgba(0,0,0,0.35), inset 3px 0 0 ${cloth}, inset -3px 0 0 ${cloth}` }} />\n  );\n}\n\nfunction Book({ book, index, closed, lifted, reduce, flat, onPick }: { book: (typeof books)[number]; index: number; closed: boolean; lifted: boolean; reduce: boolean; flat: boolean; onPick: () => void }) {\n  const target = useMotionValue(closed ? 1 : 0);\n  const fold = useSpring(target, { stiffness: 62, damping: 13.5, mass: 1 });\n  const lift = useSpring(0, { stiffness: 140, damping: 16 });\n  useEffect(() => {\n    target.set(closed ? 1 : 0);\n    if (reduce) fold.jump(closed ? 1 : 0);\n  }, [closed, reduce, fold, target]);\n  useEffect(() => {\n    if (reduce) lift.jump(lifted ? 1 : 0);\n    else lift.set(lifted ? 1 : 0);\n  }, [lifted, reduce, lift]);\n\n  const rot = useTransform(fold, (v) => v * 180);\n  const innerShade = useTransform(fold, (v) => Math.sin(Math.min(Math.max(v, 0), 0.5) * Math.PI) * 0.5);\n  const outerShade = useTransform(fold, (v) => Math.max(0, Math.sin(Math.min(Math.max(v, 0.5), 1) * Math.PI)) * 0.55);\n  const shiftX = useTransform(fold, (v) => -v * (HALF / 2)); // a closed book is half as wide, so it slides back to its own centre\n  const z = useTransform(lift, (v) => v * 22);\n  const scale = useTransform(lift, (v) => 1 + v * 0.035);\n  const shadow = useTransform(lift, (v) => `${14 + v * 16}px ${20 + v * 26}px ${30 + v * 30}px -${10 + v * 4}px rgba(66,48,20,${0.4 - v * 0.08}), 3px 5px 8px rgba(66,48,20,0.22)`);\n  const leafShadow = useTransform(fold, (v) => `${14 * (1 - v)}px ${20 * (1 - v)}px ${30 * (1 - v)}px -10px rgba(66,48,20,${0.4 * (1 - v)}), 3px 5px 8px rgba(66,48,20,${0.22 * (1 - v)})`);\n  const stamp = { color: book.foil, textShadow: book.foil === \"#1B1D22\" ? \"0 1px 0 rgba(255,255,255,0.35)\" : \"0 -1px 0 rgba(0,0,0,0.35), 0 0 6px rgba(255,255,255,0.12)\" };\n\n  return (\n    <motion.div\n      onClick={onPick}\n      className=\"relative shrink-0 cursor-pointer\"\n      style={{ width: HALF * 2, height: BH + THICK, transformStyle: \"preserve-3d\", x: shiftX, z: flat ? 0 : z, scale, rotate: flat ? 0 : [-1.6, 0.5, 1.9][index % 3] }}\n    >\n      {/* the back board with the right-hand pages: this half never moves */}\n      <motion.div className=\"absolute\" style={{ left: HALF, top: 0, width: HALF, height: BH, boxShadow: shadow, borderRadius: \"0 4px 4px 0\" }}>\n        <Lip cloth={book.cloth} deep={THICK} />\n        <Board side=\"right\" cloth={book.cloth}><Page side=\"right\">{book.spread}</Page></Board>\n      </motion.div>\n      {/* the ribbon marker, sewn in at the head and trailing out of the tail */}\n      <div className=\"absolute\" style={{ left: HALF - 4, top: BH - 20, width: 8, height: 58, transform: \"translateZ(1px) rotate(4deg)\", transformOrigin: \"50% 0%\", background: `linear-gradient(90deg, rgba(0,0,0,0.28), rgba(255,255,255,0.3) 38%, rgba(0,0,0,0.12) 70%, rgba(0,0,0,0.3)), ${book.ribbon}`, clipPath: \"polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 7px), 0 100%)\", filter: \"drop-shadow(1px 2px 1px rgba(40,30,10,0.35))\" }} />\n      {/* the front board with the left-hand pages: it swings over on the spine to close the book */}\n      <motion.div className=\"absolute left-0 top-0\" style={{ width: HALF, height: BH, transformStyle: \"preserve-3d\", transformOrigin: `100% 50% ${THICK / 2}px`, rotateY: rot }}>\n        <motion.div className=\"absolute inset-0\" style={{ backfaceVisibility: \"hidden\", WebkitBackfaceVisibility: \"hidden\", boxShadow: leafShadow, borderRadius: \"4px 0 0 4px\" }}>\n          <Lip cloth={book.cloth} deep={THICK} />\n          <Board side=\"left\" cloth={book.cloth}><Page side=\"left\">{book.spread}</Page></Board>\n          <motion.div className=\"pointer-events-none absolute inset-0 rounded-l-[4px] bg-[#1A1206]\" style={{ opacity: innerShade }} />\n        </motion.div>\n        {/* its outside: bookcloth with a blind-stamped frame and a foil title */}\n        <div className=\"absolute inset-0\" style={{ transform: \"rotateY(180deg)\", backfaceVisibility: \"hidden\", WebkitBackfaceVisibility: \"hidden\" }}>\n          <Lip cloth={book.cloth} deep={THICK} />\n          <div className=\"absolute inset-0 overflow-hidden\" style={{ backgroundColor: book.cloth, backgroundImage: `linear-gradient(90deg, rgba(0,0,0,0.42) 0px, rgba(255,255,255,0.16) 5px, rgba(0,0,0,0.3) 11px, rgba(0,0,0,0) 15px), linear-gradient(135deg, rgba(255,255,255,0.14), rgba(0,0,0,0.12)), ${WEAVE}, ${GRAIN}`, borderRadius: \"2px 5px 5px 2px\", boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.16), inset 0 1px 0 rgba(255,255,255,0.32), 16px 22px 34px -10px rgba(66,48,20,0.42), 3px 5px 8px rgba(66,48,20,0.25)\" }}>\n            <div className=\"absolute rounded-[2px]\" style={{ inset: \"14px 13px 14px 26px\", boxShadow: \"inset 0 0 0 1px rgba(0,0,0,0.3), inset 0 0 0 2px rgba(255,255,255,0.09)\" }} />\n            <div className=\"absolute left-[40px] top-[32px]\" style={{ ...stamp, fontFamily: SANS }}>\n              <div className=\"text-[7px] font-bold uppercase tracking-[0.26em] opacity-90\">Design no. {index + 1}</div>\n              <div className=\"mt-[7px] text-[31px] font-black leading-[0.9] tracking-[-0.045em]\">{book.name}</div>\n            </div>\n            <div className=\"absolute bottom-[30px] left-[40px] h-[2px] w-[26px]\" style={{ backgroundColor: book.foil, opacity: 0.9 }} />\n          </div>\n          <motion.div className=\"pointer-events-none absolute inset-0 rounded-[4px] bg-[#1A1206]\" style={{ opacity: outerShade }} />\n        </div>\n      </motion.div>\n    </motion.div>\n  );\n}\n\nexport default function ThreeClothBoundSampleBooks() {\n  const reduce = !!useReducedMotion();\n  const rootRef = useRef<HTMLElement>(null);\n  const [chosen, setChosen] = useState<number | null>(null); // null means all three lie open for comparison\n  const [width, setWidth] = useState(1100);\n  const pausedUntil = useRef(0);\n  const step = useRef(0);\n\n  useEffect(() => {\n    const el = rootRef.current;\n    if (!el) return;\n    const ro = new ResizeObserver(([e]) => setWidth(e.contentRect.width));\n    ro.observe(el);\n    return () => ro.disconnect();\n  }, []);\n\n  // Self-running demo: all open, pick one, all open, pick the next.\n  useEffect(() => {\n    if (reduce) return;\n    let seen = true;\n    const io = new IntersectionObserver(([e]) => { seen = e.isIntersecting; });\n    if (rootRef.current) io.observe(rootRef.current);\n    const order = [1, null, 0, null, 2, null];\n    const id = window.setInterval(() => {\n      if (!seen || document.hidden || Date.now() < pausedUntil.current) return;\n      setChosen(order[step.current % order.length]);\n      step.current += 1;\n    }, HOLD);\n    return () => { window.clearInterval(id); io.disconnect(); };\n  }, [reduce]);\n\n  const pick = (k: number | null) => { pausedUntil.current = Date.now() + 9000; setChosen(k); };\n\n  const onKey = (e: ReactKeyboardEvent<HTMLButtonElement>, i: number) => {\n    const n = books.length;\n    let to = -1;\n    if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") to = (i + 1) % n;\n    else if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\") to = (i + n - 1) % n;\n    else if (e.key === \"Home\") to = 0;\n    else if (e.key === \"End\") to = n - 1;\n    if (to < 0) return;\n    e.preventDefault();\n    pick(to);\n    const group = e.currentTarget.parentElement;\n    window.requestAnimationFrame(() => (group?.children[to] as HTMLElement | undefined)?.focus());\n  };\n\n  const column = width < 760; // phones: the books lie one above the other, seen from straight overhead\n  const gap = column ? 26 : 34;\n  const s = column ? Math.min(1.05, (width - 40) / (HALF * 2)) : Math.min(1.02, (width - 96 - gap * 2) / (HALF * 6));\n  const tableW = column ? HALF * 2 : HALF * 6 + gap * 2;\n  const SLIP = 78; // room at the head of the table for the typed brief\n  const tableH = SLIP + (column ? (BH + THICK) * 3 + gap * 2 + 40 : BH + THICK + 40);\n  const tilt = column ? 0 : 27;\n  const stageH = Math.round(tableH * s * (column ? 1 : 0.93) + (column ? 50 : 150));\n\n  return (\n    <section ref={rootRef} className=\"relative w-full overflow-hidden bg-[#F6F4EF] text-[#0B0D12]\" style={{ fontFamily: SANS, backgroundImage: \"radial-gradient(90% 80% at 50% 38%, #FFFFFF 0%, #F6F4EF 46%, #E7E2D8 100%)\" }}>\n      <h2 className=\"sr-only\">Three sample books, each holding a different design of the same website</h2>\n      <div className=\"relative mx-auto w-full\" style={{ height: stageH, perspective: 1800, perspectiveOrigin: \"50% 0%\" }} role=\"img\" aria-label={chosen === null ? \"A typed brief pinned above three cloth-bound sample books that lie open side by side. Each spread is a different design of a ceramics studio website.\" : `Three cloth-bound sample books. The ${books[chosen].name} design lies open and the other two books are closed.`}>\n        <div className=\"absolute left-1/2\" style={{ top: column ? 26 : 56, width: tableW, height: tableH, marginLeft: -tableW / 2, transformStyle: \"preserve-3d\", transformOrigin: \"50% 0%\", transform: `scale3d(${s}, ${s}, ${s}) rotateX(${tilt}deg)` }}>\n          {/* the brief: one typed sentence on a slip of paper, held by a blue pin */}\n          <div className=\"absolute left-1/2 top-[6px] w-[300px] -translate-x-1/2 -rotate-[1.5deg] rounded-[1px] bg-[#FFFDF8] px-[16px] py-[11px] text-center text-[9.5px] font-medium leading-[1.5] text-[#0B0D12]/85 shadow-[0_1px_0_rgba(255,255,255,0.9)_inset,6px_10px_16px_-6px_rgba(66,48,20,0.35),1px_2px_3px_rgba(66,48,20,0.18)]\" style={{ fontFamily: MONO }}>\n            <span aria-hidden=\"true\" className=\"absolute left-1/2 top-[-6px] h-[12px] w-[12px] -translate-x-1/2 rounded-full\" style={{ background: `radial-gradient(circle at 35% 30%, #CFE3FF 0%, ${BLUE} 42%, #1F4F9E 100%)`, boxShadow: \"2px 4px 4px rgba(40,30,10,0.4)\" }} />\n            {sentence}\n          </div>\n          <div className={`flex ${column ? \"flex-col\" : \"flex-row\"} items-start justify-center`} style={{ gap, transformStyle: \"preserve-3d\", paddingTop: SLIP }}>\n            {books.map((b, i) => (\n              <Book key={b.name} book={b} index={i} closed={chosen !== null && chosen !== i} lifted={chosen === i} reduce={reduce} flat={column} onPick={() => pick(i)} />\n            ))}\n          </div>\n        </div>\n      </div>\n\n      <div className=\"relative z-10 mx-auto flex w-full max-w-[720px] flex-col items-center gap-[13px] px-[16px] pb-[34px]\">\n        <div className=\"flex flex-wrap items-center justify-center gap-[8px]\">\n          <div role=\"radiogroup\" aria-label=\"Choose a design\" className=\"flex items-center gap-[4px] rounded-full bg-white/75 p-[5px] shadow-[inset_0_1px_0_rgba(255,255,255,0.9),0_10px_30px_-12px_rgba(60,45,20,0.35),0_0_0_1px_rgba(11,13,18,0.06)]\">\n            {books.map((b, i) => (\n              <button\n                key={b.name}\n                type=\"button\"\n                role=\"radio\"\n                aria-checked={chosen === i}\n                tabIndex={chosen === i || (chosen === null && i === 0) ? 0 : -1}\n                onClick={() => pick(i)}\n                onKeyDown={(e) => onKey(e, i)}\n                className={`flex h-[40px] items-center gap-[8px] rounded-full px-[15px] text-[13px] font-bold tracking-[-0.01em] transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#4F98FB] focus-visible:ring-offset-2 motion-reduce:transition-none ${chosen === i ? \"bg-[#0B0D12] text-white\" : \"text-[#0B0D12]/70 hover:text-[#0B0D12]\"}`}\n              >\n                <span aria-hidden=\"true\" className=\"h-[7px] w-[7px] rounded-full transition-colors duration-300 motion-reduce:transition-none\" style={{ backgroundColor: chosen === i ? BLUE : \"rgba(11,13,18,0.22)\" }} />\n                {b.name}\n              </button>\n            ))}\n          </div>\n          <button type=\"button\" onClick={() => pick(null)} aria-pressed={chosen === null} className={`h-[40px] rounded-full px-[16px] text-[13px] font-bold tracking-[-0.01em] transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#4F98FB] focus-visible:ring-offset-2 motion-reduce:transition-none ${chosen === null ? \"bg-[#0B0D12]/[0.08] text-[#0B0D12]\" : \"text-[#0B0D12]/70 hover:text-[#0B0D12]\"}`}>\n            Open all three\n          </button>\n        </div>\n        <p aria-live=\"polite\" className=\"text-center text-[12px] font-semibold tracking-[-0.005em] text-[#0B0D12]/65\">{chosen === null ? \"Three designs of the same site, open for comparison\" : books[chosen].note}</p>\n      </div>\n    </section>\n  );\n}\n"}]}
