Skip to content
Browse blocks

A hero for design studios and agencies, drawn as their design canvas: rulers, layout columns and the work as artboards a collaborator selects one by one.

Used forDesign and product studiosWeb and brand agenciesFreelance designersTemplate and theme shops

Install with the shadcn CLI

$ npx shadcn@latest add @hairline/deck-hero

Older shadcn CLI, or a network that blocks ui.shadcn.com? Install by URL: shadcn add https://hairlineui.com/r/deck-hero.json. More

Templates

Need the whole page?

64 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.

Where it’s used

  • Design and product studios

    Lead with the work: each shipped site is an artboard with its client, type and result.

  • Web and brand agencies

    The canvas says “we make things” before a word is read, and every card links to its case study.

  • Freelance designers

    Six projects, your name on the cursor and your availability in the line above the headline.

  • Template and theme shops

    Show the range of what you sell as a moving deck of real screens.

What it handles for you

A work showcase in a hero is usually a carousel with arrows and dots, or a fan of tilted cards with soft shadows that crowds the headline and breaks on phones.

Instead of wiring upportfolio carouselcard fanmarquee of screenshotshero navbar
  1. A canvas, not a backdrop

    Rulers count the section’s real pixels and the twelve layout columns behind the copy are the ones the nav and headline sit on.

  2. The work, selected

    A cursor with a name moves to an artboard, the selection box follows with handles and a size tag, and the label shows the result.

  3. Yours to point at

    Pointing at an artboard selects it and eases the pan to a stop; every artboard can link to its case study and is reachable by keyboard.

  4. Phones get a real row

    Under 720px the deck becomes a native swipe row with snap points, and the selection follows the card you land on.

  5. Its own look

    Dark and light canvases ship as --dh-* variables; pass your display face through --dh-display and it sets the headline and nav.

  6. Light to run

    One loop moves the row, the selection and the cursor with transforms; it stops off screen and in background tabs.

Overview

Studio heroes usually fan a few screenshots behind a pill navbar, the same page every agency has. Deck hero draws the place the work is made. Rulers run along the top and left of the section and read its real pixels; the layout grid’s twelve columns sit faintly behind the nav and the copy, which are placed on them. The headline’s key words are a selected text layer, with handles and a Text tag. Under the copy the studio’s work pans slowly across the canvas as artboards with frame labels. A collaborator’s cursor moves to the next artboard and the selection follows it, with its size tag; the top ruler marks the selection’s width and the frame label turns from the project type to its result. Pointing at an artboard selects it and holds the pan; on phones the deck becomes a swipeable row and the selection follows the card you land on.

States

arrival
The text layer’s selection draws around the highlighted words at 520ms; the first artboard is already selected and the deck starts panning at 18px a second.
select
About 0.9s in, and every 3.4s after, the cursor glides to the next artboard over 760ms and the selection morphs to it over 460ms. When the next one would be off the right edge it goes back to the first one fully on screen.
result
The selected artboard’s label crossfades from its type and year to its result; the top ruler’s band moves to the selection’s width.
point
Pointing at an artboard selects it over 260ms, hides the cursor and eases the pan to a stop; leaving lets it drift on again.
phone
Under 720px the row scrolls natively with snap points; the selection follows the nearest card and the cursor and left ruler are left out.
reduced motion
No pan and no cursor: the first artboard stays selected and pointing at another moves the selection.

Usage

usage.tsx
import { DeckHero } from "@/components/deck-hero";<DeckHero  brand="Fieldwork"  headline={["Websites that", "sell the product"]}  highlight="sell"  subheadline="Fieldwork designs and builds launch sites for software companies."  primaryAction={{ label: "Start a project", href: "/contact" }}  projects={[    { name: "Keel", kind: "Business banking", year: "2026", result: "+31% account opens", image: "/work/keel.webp", href: "/work/keel" },    { name: "Earshot", kind: "AI receptionist", year: "2026", result: "2.4× demo bookings", image: "/work/earshot.webp", href: "/work/earshot" },    { name: "Mordant", kind: "Apparel", year: "2025", result: "+18% add to cart", image: "/work/mordant.webp", href: "/work/mordant" },  ]}/>

Depends on lucide-react, installed for you by the CLI along with the keyframes it needs.

With your own display face

The hero reads its headline and nav face from --dh-display. Load one with next/font and pass it in; any colour can be overridden the same way.

example.tsx
import { Bricolage_Grotesque } from "next/font/google";import { DeckHero } from "@/components/deck-hero";import { projects } from "@/content/work";const display = Bricolage_Grotesque({ subsets: ["latin"], axes: ["opsz", "wdth"] });export default function Page() {  return (    <DeckHero      className="min-h-dvh"      style={{        "--dh-display": display.style.fontFamily,        "--dh-display-axes": "'opsz' 96, 'wdth' 92",        "--dh-accent": "#ff4d8d",      } as React.CSSProperties}      tone="dark"      brand="Fieldwork"      navLinks={[        { label: "Work", href: "/work" },        { label: "Services", href: "/services" },        { label: "Studio", href: "/studio" },      ]}      navPrimaryAction={{ label: "Book a call", href: "/call" }}      eyebrow="Product design studio · Lisbon and remote"      headline={["Websites that", "sell the product"]}      highlight="sell"      subheadline="Fieldwork designs and builds launch sites for software companies. Brief on Monday, live in five weeks."      primaryAction={{ label: "Start a project", href: "/contact" }}      secondaryAction={{ label: "See the work", href: "/work" }}      projects={projects}      cursorName="Ana"    />  );}

Props

brand
string
Name in the nav, set in the display face.
logo
ReactNode
Mark beside the name. Defaults to a selected square in the accent.
navLinks
{ label: string; href: string }[]
Links in the nav; under 900px they fold into a menu set large in the display face.
navSecondaryAction / navPrimaryAction
{ label: string; href?: string; onClick?: () => void }
A quiet link and a solid action on the right of the nav.
eyebrow
string
One plain line above the headline, e.g. what you do and where.
headline
string | string[]
The headline; an array sets the line breaks.
highlight
string
Words inside the headline drawn as a selected text layer.
subheadline
string
One sentence beside the headline (under it on narrow screens).
primaryAction / secondaryAction
{ label: string; href?: string; onClick?: () => void }
The main action in the accent and a quiet one.
projects
DeckHeroProject[]
The work: name, kind, year, result, a 16:10 image, alt and href. Three or more.
cursorName= "Ana"
string
Name on the collaborator’s cursor.
frameSize= "1440 × 900"
string
Size written under the selection.
tone= "dark"
"dark" | "light"
A dark or light canvas. Every colour is a --dh-* variable you can override.
autoPlay= true
boolean
Pan the deck and move the selection on its own.

Accessibility and motion

  • The hero has its own palette (--dh-canvas, --dh-ink, --dh-rule, --dh-ruler, --dh-column, --dh-accent and their pairs) and never reads your shadcn theme.
  • Set --dh-display for the headline, brand and phone menu, --dh-display-axes for a variable face’s settings, and --dh-text for everything else (defaults to your page font).
  • Artboards are links when a project has an href; copies used to fill the endless row are hidden from screen readers and the tab order.
  • One requestAnimationFrame loop writes transforms only; it stops when the hero is off screen or the tab is hidden.
  • Respects prefers-reduced-motion: no pan and no cursor; the selection still follows pointing and focus.

Requirements

React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.

Source

components/deck-hero.tsx
"use client";import * as React from "react";import { ArrowRight, ArrowUpRight, Menu, X } from "lucide-react";/* ───────────────────────────────────────────────────────── * DECK HERO: a studio's first screen, drawn as its design canvas * *   canvas    rulers along the top and left read the real pixels of *             the section; the layout grid's columns sit faintly behind *   nav       brand, links and actions laid on the same columns *   copy      a large headline whose highlighted words are a selected *             text layer, one sentence and the actions *   deck      the studio's work as artboards with frame labels, panning *             slowly across the canvas. A collaborator's cursor moves to *             the next artboard, the selection box follows with its size *             tag, the ruler marks its width and the label turns to the *             result. Pointing at an artboard selects it and holds the *             pan; on phones the deck is a swipeable row. * ───────────────────────────────────────────────────────── */export interface DeckHeroLink {  label: string;  href: string;}export interface DeckHeroAction {  label: string;  href?: string;  onClick?: () => void;}export interface DeckHeroProject {  /** Name on the frame label, e.g. the client. */  name: string;  /** What it was, e.g. "Fintech · Website". */  kind?: string;  year?: string;  /** Shown on the label while the artboard is selected, e.g. "+31% trial starts". */  result?: string;  /** A 16:10 screenshot of the work. */  image: string;  alt?: string;  /** Where the case study lives. */  href?: string;}export interface DeckHeroProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {  brand: string;  /** Mark beside the name. Defaults to a selected square in the accent. */  logo?: React.ReactNode;  navLinks?: DeckHeroLink[];  navSecondaryAction?: DeckHeroAction;  navPrimaryAction?: DeckHeroAction;  /** One plain line above the headline. */  eyebrow?: string;  /** The headline; an array sets the line breaks. */  headline: string | string[];  /** Words inside the headline drawn as a selected text layer. */  highlight?: string;  subheadline: string;  primaryAction: DeckHeroAction;  secondaryAction?: DeckHeroAction;  /** The work on the canvas, 3 or more. */  projects: DeckHeroProject[];  /** Name on the collaborator's cursor. */  cursorName?: string;  /** Size written under the selection, e.g. "1440 × 900". */  frameSize?: string;  /** "dark" (default) or "light". Every colour is a --dh-* variable you can override. */  tone?: "dark" | "light";  /** Pan the deck and move the selection on its own. */  autoPlay?: boolean;}const TONES: Record<"dark" | "light", Record<string, string>> = {  dark: {    "--dh-canvas": "#101113",    "--dh-ink": "#f4f4f5",    "--dh-ink-2": "#a3a3ab",    "--dh-ink-3": "#686870",    "--dh-rule": "rgba(244,244,245,0.08)",    "--dh-hover": "rgba(244,244,245,0.07)",    "--dh-ruler": "#16171a",    "--dh-tick": "rgba(244,244,245,0.22)",    "--dh-column": "rgba(255,77,141,0.035)",    "--dh-frame": "#1b1c1f",    "--dh-paper": "#f4f4f5",    "--dh-on-paper": "#101113",    "--dh-accent": "#ff4d8d",    "--dh-on-accent": "#120a0d",  },  light: {    "--dh-canvas": "#eff0f2",    "--dh-ink": "#0d0e10",    "--dh-ink-2": "#4c4e55",    "--dh-ink-3": "#8a8c93",    "--dh-rule": "rgba(13,14,16,0.09)",    "--dh-hover": "rgba(13,14,16,0.06)",    "--dh-ruler": "#f8f8f9",    "--dh-tick": "rgba(13,14,16,0.25)",    "--dh-column": "rgba(240,36,110,0.022)",    "--dh-frame": "#e2e3e6",    "--dh-paper": "#0d0e10",    "--dh-on-paper": "#f8f8f9",    "--dh-accent": "#f0246e",    "--dh-on-accent": "#ffffff",  },};const NO_LINKS: DeckHeroLink[] = [];const RULER = 20;const PAN_SPEED = 18; // px a secondconst HOLD_MS = 2600; // how long each artboard stays selectedconst CURSOR_MS = 760;const MORPH_MS = 460;const easeInOut = (t: number) => (t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2);const easeOut = (t: number) => 1 - Math.pow(1 - t, 3);const clamp01 = (t: number) => Math.max(0, Math.min(1, t));function useReducedMotion() {  const [reduced, setReduced] = React.useState(false);  React.useEffect(() => {    const mq = window.matchMedia("(prefers-reduced-motion: reduce)");    const on = () => setReduced(mq.matches);    on();    mq.addEventListener("change", on);    return () => mq.removeEventListener("change", on);  }, []);  return reduced;}function ActionLink({ action, className, style, children }: { action: DeckHeroAction; className: string; style?: React.CSSProperties; children: React.ReactNode }) {  if (action.href)    return (      <a href={action.href} onClick={action.onClick} className={className} style={style}>        {children}      </a>    );  return (    <button type="button" onClick={action.onClick} className={className} style={style}>      {children}    </button>  );}/** Four square handles on the corners of a selection. */function Handles({ size = 7 }: { size?: number }) {  const s = { width: size, height: size, background: "var(--dh-canvas)", border: "1.5px solid var(--dh-accent)" } as React.CSSProperties;  const o = -size / 2 - 0.75;  return (    <>      <span className="absolute" style={{ ...s, left: o, top: o }} />      <span className="absolute" style={{ ...s, right: o, top: o }} />      <span className="absolute" style={{ ...s, left: o, bottom: o }} />      <span className="absolute" style={{ ...s, right: o, bottom: o }} />    </>  );}/** The default logo: a selected square. */function FrameMark() {  return (    <span aria-hidden="true" className="relative grid size-[18px] shrink-0 place-items-center">      <span className="absolute inset-[3px]" style={{ background: "var(--dh-accent)" }} />      <span className="absolute inset-0" style={{ border: "1.5px solid var(--dh-accent)" }} />    </span>  );}/** Ticks every 10px, longer every 50 and numbered every 100: the canvas's own ruler, in real pixels. */function TopRuler({ width, bandRef }: { width: number; bandRef: React.Ref<HTMLSpanElement> }) {  const marks = Math.floor(width / 100);  return (    <div      aria-hidden="true"      className="relative h-[20px] overflow-hidden border-b"      style={{        background: "var(--dh-ruler)",        borderColor: "var(--dh-rule)",        backgroundImage:          "repeating-linear-gradient(90deg, var(--dh-tick) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, var(--dh-tick) 0 1px, transparent 1px 50px)",        backgroundSize: "100% 4px, 100% 8px",        backgroundPosition: `${RULER}px 100%, ${RULER}px 100%`,        backgroundRepeat: "no-repeat",      }}    >      <span ref={bandRef} className="absolute bottom-0 left-0 h-[20px] w-0 opacity-0" style={{ background: "color-mix(in oklab, var(--dh-accent) 22%, transparent)", borderLeft: "1px solid var(--dh-accent)", borderRight: "1px solid var(--dh-accent)" }} />      {Array.from({ length: marks + 1 }, (_, i) => (        <span key={i} className="absolute top-[2px] text-[9px] leading-none font-medium tabular-nums" style={{ left: RULER + i * 100 + 3, color: "var(--dh-ink-3)" }}>          {i * 100}        </span>      ))}    </div>  );}export function DeckHero({  brand,  logo,  navLinks = NO_LINKS,  navSecondaryAction,  navPrimaryAction,  eyebrow,  headline,  highlight,  subheadline,  primaryAction,  secondaryAction,  projects,  cursorName = "Ana",  frameSize = "1440 × 900",  tone = "dark",  autoPlay = true,  className = "",  style,  ...rest}: DeckHeroProps) {  const reduced = useReducedMotion();  const [menuOpen, setMenuOpen] = React.useState(false);  const [width, setWidth] = React.useState(1280);  const [shown, setShown] = React.useState(false);  const phone = width < 720;  const rootRef = React.useRef<HTMLElement>(null);  const deckRef = React.useRef<HTMLDivElement>(null);  const rowRef = React.useRef<HTMLDivElement>(null);  const selRef = React.useRef<HTMLDivElement>(null);  const cursorRef = React.useRef<HTMLDivElement>(null);  const bandRef = React.useRef<HTMLSpanElement>(null);  const cardRefs = React.useRef<(HTMLAnchorElement | HTMLDivElement | null)[]>([]);  const hoverRef = React.useRef<number | null>(null);  const n = projects.length;  const copies = phone ? 1 : 3;  const cards = React.useMemo(() => Array.from({ length: n * copies }, (_, j) => projects[j % n]), [projects, n, copies]);  // Card size follows the section: about a third of it on desktop, most of the screen on a phone.  const cardW = phone ? Math.round(Math.min(width - 72, 420)) : Math.round(Math.max(300, Math.min(480, width * 0.3)));  const cardH = Math.round(cardW * 0.625);  const gap = phone ? 16 : 40;  const LABEL = 28;  React.useEffect(() => {    const el = rootRef.current;    if (!el) return;    const ro = new ResizeObserver(([entry]) => setWidth(Math.round(entry.contentRect.width)));    ro.observe(el);    const id = requestAnimationFrame(() => setShown(true));    return () => {      ro.disconnect();      cancelAnimationFrame(id);    };  }, []);  // One loop: pan, the cursor's trip, the selection's morph, the ruler band and the selected label.  React.useEffect(() => {    const deck = deckRef.current;    const row = rowRef.current;    const sel = selRef.current;    const cursor = cursorRef.current;    const band = bandRef.current;    if (!deck || !row || !sel || n === 0) return;    const step = cardW + gap;    const period = n * step;    const pad = phone ? 24 : RULER + 40;    const moving = autoPlay && !reduced && !phone;    let offset = 0;    let speed = moving ? PAN_SPEED : 0;    let k = 0; // the selected artboard, counted along the endless row    let nextAt = 0;    let from = k;    let morphAt = -1e9;    let morphMs = MORPH_MS;    let cursorFrom = { x: 0, y: 0 };    let cursorAt = -1e9;    let cursorTo = k;    let lastSelected = -1;    let raf = 0;    let last = 0;    let visible = false;    let now = 0;    const target = (idx: number) => ({ x: idx * step + cardW * 0.64, y: LABEL + cardH * 0.56 });    const cursorPos = () => {      const t = easeInOut(clamp01((now - cursorAt) / CURSOR_MS));      const to = target(cursorTo);      return { x: cursorFrom.x + (to.x - cursorFrom.x) * t, y: cursorFrom.y + (to.y - cursorFrom.y) * t };    };    const select = (idx: number, ms: number) => {      if (idx === k) return;      const t = clamp01((now - morphAt) / morphMs);      from = from + (k - from) * easeOut(t); // start from wherever the box is now      k = idx;      morphAt = now;      morphMs = ms;    };    let pendingSelect = -1;    const draw = () => {      const base = phone ? 0 : offset % period;      row.style.transform = phone ? "" : `translate3d(${(-base).toFixed(2)}px,0,0)`;      const t = easeOut(clamp01((now - morphAt) / morphMs));      const at = from + (k - from) * t;      const scroll = phone ? row.parentElement?.scrollLeft ?? 0 : 0;      const x = pad + at * step - (phone ? scroll : offset);      sel.style.transform = `translate3d(${x.toFixed(2)}px,${LABEL}px,0)`;      if (band) {        band.style.transform = `translate3d(${(x).toFixed(2)}px,0,0)`;        band.style.width = `${cardW}px`;        band.style.opacity = "1";      }      if (cursor) {        const c = cursorPos();        cursor.style.transform = `translate3d(${(pad + c.x - offset).toFixed(2)}px,${c.y.toFixed(2)}px,0)`;        const o = hoverRef.current === null ? "1" : "0";        if (cursor.style.opacity !== o) cursor.style.opacity = o;      }      // The selected label: the copy of artboard k that is on screen.      const j = phone ? k : k - n * Math.floor(offset / period);      if (j !== lastSelected) {        cardRefs.current[lastSelected]?.removeAttribute("data-selected");        cardRefs.current[j]?.setAttribute("data-selected", "");        lastSelected = j;      }    };    const frame = (time: number) => {      const dt = last ? Math.min(0.05, (time - last) / 1000) : 1 / 60;      last = time;      now = time;      const hovering = hoverRef.current !== null;      const want = moving && !hovering ? PAN_SPEED : 0;      speed += (want - speed) * (1 - Math.exp(-dt * 4));      offset += speed * dt;      if (!nextAt) nextAt = now + 900;      if (hovering) nextAt = Math.max(nextAt, now + 1400);      if (moving && !hovering && pendingSelect < 0) {        // Every few seconds the cursor goes to the next artboard, then selects it; when the next one would be        // off the right edge, it goes back to the first one fully on screen. It also moves on if the        // selected artboard is panning out on the left.        const left = (i: number) => pad + i * step - offset;        if (now >= nextAt || left(k) < RULER) {          let cand = k + 1;          if (left(cand) + cardW > width - 16) cand = Math.ceil((RULER + 12 - pad + offset) / step);          if (cand === k) cand = k + 1;          cursorFrom = cursorPos();          cursorTo = cand;          cursorAt = now;          pendingSelect = cand;          nextAt = now + CURSOR_MS + HOLD_MS;        }      }      if (pendingSelect >= 0 && now - cursorAt > CURSOR_MS * 0.78) {        select(pendingSelect, MORPH_MS);        pendingSelect = -1;      }      draw();      raf = requestAnimationFrame(frame);    };    const start = () => {      if (raf || !visible || document.hidden) return;      last = 0;      raf = requestAnimationFrame(frame);    };    const stop = () => {      cancelAnimationFrame(raf);      raf = 0;    };    // Pointing at an artboard selects it at once and holds the pan.    const onHover = (e: Event) => {      const idx = hoverRef.current;      if (idx === null) return;      const abs = phone ? idx : idx + n * Math.floor(offset / period);      pendingSelect = -1;      select(abs, 260);      cursorFrom = cursorPos();      cursorTo = abs;      cursorAt = now;      if (!raf) {        now = performance.now();        draw();      }      void e;    };    deck.addEventListener("dh-hover", onHover);    // Phones: the row scrolls natively; the selection follows the card nearest the left edge.    const scroller = row.parentElement;    const onScroll = () => {      if (!scroller) return;      const idx = Math.max(0, Math.min(n - 1, Math.round(scroller.scrollLeft / step)));      now = performance.now();      select(idx, 220);      if (!raf) requestAnimationFrame(() => {        now = performance.now();        draw();        if (now - morphAt < 240) onScroll();      });    };    if (phone) {      k = 0;      from = 0;      scroller?.addEventListener("scroll", onScroll, { passive: true });    }    cursorFrom = target(k);    cursorTo = k;    now = performance.now();    draw();    const io = new IntersectionObserver(([entry]) => {      visible = entry.isIntersecting;      if (visible && (moving || hoverRef.current !== null)) start();      else if (!visible) stop();    });    io.observe(deck);    // While not panning, the loop still runs briefly after each hover so the morph plays.    const kick = () => {      if (!moving) {        start();        window.setTimeout(() => {          if (!moving) stop();        }, MORPH_MS + 80);      }    };    deck.addEventListener("dh-hover", kick);    const onVis = () => (document.hidden ? stop() : moving && start());    document.addEventListener("visibilitychange", onVis);    return () => {      stop();      io.disconnect();      deck.removeEventListener("dh-hover", onHover);      deck.removeEventListener("dh-hover", kick);      scroller?.removeEventListener("scroll", onScroll);      document.removeEventListener("visibilitychange", onVis);      cardRefs.current.forEach((el) => el?.removeAttribute("data-selected"));    };  }, [n, cardW, cardH, gap, phone, autoPlay, reduced, width]);  const hover = (j: number | null) => {    hoverRef.current = j;    if (j !== null) deckRef.current?.dispatchEvent(new Event("dh-hover"));  };  const lines = Array.isArray(headline) ? headline : [headline];  const paint = (text: string) => {    if (!highlight || !text.includes(highlight)) return text;    const i = text.indexOf(highlight);    return (      <>        {text.slice(0, i)}        <span className="relative inline-block">          {highlight}          <span            aria-hidden="true"            className="pointer-events-none absolute -inset-x-[0.08em] top-[0.08em] -bottom-[0.02em]"            style={{              border: "1.5px solid var(--dh-accent)",              opacity: shown || reduced ? 1 : 0,              transform: shown || reduced ? "none" : "scale(0.97)",              transition: reduced ? undefined : "opacity 420ms ease 520ms, transform 520ms cubic-bezier(0.22,1,0.36,1) 520ms",            }}          >            <Handles size={8} />            <span              className="absolute bottom-full left-[-1.5px] mb-[6px] px-1.5 py-[3px] text-[11px] leading-none font-semibold tracking-normal whitespace-nowrap"              style={{ background: "var(--dh-accent)", color: "var(--dh-on-accent)", fontFamily: "var(--dh-text, inherit)" }}            >              Text            </span>          </span>        </span>        {text.slice(i + highlight.length)}      </>    );  };  const tones = TONES[tone];  const navButton =    "h-9 cursor-pointer items-center rounded-[4px] px-3 text-[14px] font-medium transition-[background-color,transform] duration-150 [touch-action:manipulation] [-webkit-tap-highlight-color:transparent] hover:bg-[var(--dh-hover)] active:translate-y-px focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--dh-accent)]";  const deckH = LABEL + cardH + 44;  return (    <section      ref={rootRef}      className={`@container relative isolate flex w-full flex-col overflow-hidden ${className}`}      style={{ ...tones, background: "var(--dh-canvas)", color: "var(--dh-ink)", fontFamily: "var(--dh-text, inherit)", ...style } as React.CSSProperties}      {...rest}    >      {/* The canvas: ruler on top, ruler down the left, the layout grid's columns behind everything */}      <TopRuler width={width} bandRef={bandRef} />      <div        aria-hidden="true"        className="absolute top-[20px] bottom-0 left-0 z-20 hidden w-[20px] border-r @min-[720px]:block"        style={{          background: "var(--dh-ruler)",          borderColor: "var(--dh-rule)",          backgroundImage:            "repeating-linear-gradient(180deg, var(--dh-tick) 0 1px, transparent 1px 10px), repeating-linear-gradient(180deg, var(--dh-tick) 0 1px, transparent 1px 50px)",          backgroundSize: "4px 100%, 8px 100%",          backgroundPosition: "100% 0, 100% 0",          backgroundRepeat: "no-repeat",        }}      />      <div aria-hidden="true" className="pointer-events-none absolute inset-x-0 top-[20px] bottom-0 -z-10 px-5 @min-[720px]:pr-10 @min-[720px]:pl-[60px]">        <div className="mx-auto grid h-full max-w-[1320px] grid-cols-4 gap-4 @min-[720px]:grid-cols-12 @min-[720px]:gap-6">          {Array.from({ length: 12 }, (_, i) => (            <span key={i} className={i >= 4 ? "hidden @min-[720px]:block" : ""} style={{ background: "var(--dh-column)" }} />          ))}        </div>      </div>      <div className="relative px-5 @min-[720px]:pr-10 @min-[720px]:pl-[60px]">        <div className="mx-auto max-w-[1320px]">          {/* Nav */}          <header className="relative z-20 flex h-[68px] items-center gap-6 border-b" style={{ borderColor: "var(--dh-rule)" }}>            <a href="#" className="flex shrink-0 items-center gap-2.5 text-[17px] font-semibold tracking-[-0.02em]" style={{ fontFamily: "var(--dh-display, inherit)" }}>              {logo ?? <FrameMark />}              {brand}            </a>            <nav aria-label="Main" className="hidden items-center gap-0.5 @min-[900px]:flex">              {navLinks.map((l) => (                <a key={l.href + l.label} href={l.href} className={`${navButton} inline-flex`} style={{ color: "var(--dh-ink-2)" }}>                  {l.label}                </a>              ))}            </nav>            <div className="ml-auto flex items-center gap-1.5">              {navSecondaryAction && (                <ActionLink action={navSecondaryAction} className={`${navButton} hidden @min-[560px]:inline-flex`} style={{ color: "var(--dh-ink)" }}>                  {navSecondaryAction.label}                </ActionLink>              )}              {navPrimaryAction && (                <ActionLink                  action={navPrimaryAction}                  className="hidden h-9 cursor-pointer items-center gap-1.5 rounded-[4px] px-3.5 text-[14px] font-semibold transition-[opacity,transform] duration-150 [touch-action:manipulation] hover:opacity-90 active:translate-y-px focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--dh-accent)] @min-[440px]:inline-flex"                  style={{ background: "var(--dh-paper)", color: "var(--dh-on-paper)" }}                >                  {navPrimaryAction.label}                  <ArrowUpRight aria-hidden="true" className="size-4" />                </ActionLink>              )}              {navLinks.length > 0 && (                <button                  type="button"                  aria-label={menuOpen ? "Close menu" : "Open menu"}                  aria-expanded={menuOpen}                  onClick={() => setMenuOpen((v) => !v)}                  className="grid size-9 cursor-pointer place-items-center rounded-[4px] transition-[background-color,transform] duration-150 [touch-action:manipulation] hover:bg-[var(--dh-hover)] active:translate-y-px focus-visible:outline-2 focus-visible:outline-[var(--dh-accent)] @min-[900px]:hidden"                >                  {menuOpen ? <X className="size-[18px]" aria-hidden="true" /> : <Menu className="size-[18px]" aria-hidden="true" />}                </button>              )}            </div>            {menuOpen && (              <nav                aria-label="Main"                className="absolute inset-x-0 top-full z-30 flex flex-col border-b py-3 @min-[900px]:hidden"                style={{ background: "var(--dh-canvas)", borderColor: "var(--dh-rule)" }}              >                {navLinks.map((l) => (                  <a                    key={l.href + l.label}                    href={l.href}                    onClick={() => setMenuOpen(false)}                    className="flex h-12 items-center border-b text-[24px] font-semibold tracking-[-0.03em]"                    style={{ borderColor: "var(--dh-rule)", fontFamily: "var(--dh-display, inherit)" }}                  >                    {l.label}                  </a>                ))}                <div className="mt-4 flex flex-wrap gap-2">                  {navPrimaryAction && (                    <ActionLink action={navPrimaryAction} className="inline-flex h-11 items-center gap-1.5 rounded-[4px] px-4 text-[15px] font-semibold" style={{ background: "var(--dh-paper)", color: "var(--dh-on-paper)" }}>                      {navPrimaryAction.label}                      <ArrowUpRight aria-hidden="true" className="size-4" />                    </ActionLink>                  )}                  {navSecondaryAction && (                    <ActionLink action={navSecondaryAction} className={`${navButton} inline-flex h-11 text-[15px] @min-[560px]:hidden`} style={{ color: "var(--dh-ink)" }}>                      {navSecondaryAction.label}                    </ActionLink>                  )}                </div>              </nav>            )}          </header>          {/* Copy */}          <div className="grid grid-cols-1 gap-x-6 pt-12 pb-10 @min-[720px]:pt-16 @min-[1040px]:grid-cols-12 @min-[1040px]:pt-[84px] @min-[1040px]:pb-14">            <div className="@min-[1040px]:col-span-8">              {eyebrow && (                <p className="mb-6 text-[14px] font-medium" style={{ color: "var(--dh-ink-2)" }}>                  {eyebrow}                </p>              )}              <h1                className="text-[44px] leading-[0.94] font-semibold tracking-[-0.045em] @min-[420px]:text-[52px] @min-[720px]:text-[76px] @min-[1040px]:text-[84px] @min-[1280px]:text-[100px]"                style={{ fontFamily: "var(--dh-display, inherit)", fontVariationSettings: "var(--dh-display-axes, normal)" }}              >                {lines.map((t, i) => (                  <span key={i} className="block">                    {paint(t)}                  </span>                ))}              </h1>            </div>            <div className="mt-8 flex flex-col justify-end @min-[1040px]:col-span-4 @min-[1040px]:mt-0 @min-[1040px]:pb-2">              <p className="max-w-[40ch] text-[16px] leading-[1.55] font-medium @min-[720px]:text-[17px]" style={{ color: "var(--dh-ink-2)" }}>                {subheadline}              </p>              <div className="mt-7 flex flex-wrap items-center gap-2">                <ActionLink                  action={primaryAction}                  className="group inline-flex h-12 cursor-pointer items-center gap-2 rounded-[4px] px-5 text-[15px] font-semibold transition-transform duration-150 [touch-action:manipulation] [-webkit-tap-highlight-color:transparent] active:translate-y-px focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--dh-ink)]"                  style={{ background: "var(--dh-accent)", color: "var(--dh-on-accent)" }}                >                  {primaryAction.label}                  <ArrowRight aria-hidden="true" className="size-[18px] transition-transform duration-200 group-hover:translate-x-0.5" />                </ActionLink>                {secondaryAction && (                  <ActionLink action={secondaryAction} className={`${navButton} inline-flex h-12 px-4 text-[15px]`} style={{ color: "var(--dh-ink)" }}>                    {secondaryAction.label}                  </ActionLink>                )}              </div>            </div>          </div>        </div>      </div>      {/* The deck: artboards on the canvas */}      <div        ref={deckRef}        className="relative mt-auto"        style={{ height: deckH }}        onPointerLeave={() => hover(null)}      >        <div          className={phone ? "absolute inset-0 snap-x snap-mandatory overflow-x-auto overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : "absolute inset-0 overflow-hidden"}          style={phone ? { scrollPaddingLeft: 24 } : undefined}        >          <div ref={rowRef} className="flex will-change-transform" style={{ gap, paddingLeft: phone ? 24 : RULER + 40, paddingRight: phone ? 24 : 0 }}>            {cards.map((p, j) => {              const body = (                <>                  <span className="relative flex h-[28px] items-start justify-between gap-3 text-[13px] leading-none font-medium">                    <span className="truncate" style={{ color: "var(--dh-ink)" }}>                      {p.name}                    </span>                    <span className="relative shrink-0 text-right">                      <span className="block transition-opacity duration-300 [[data-selected]_&]:opacity-0" style={{ color: "var(--dh-ink-3)" }}>                        {[p.kind, p.year].filter(Boolean).join(" · ")}                      </span>                      {p.result && (                        <span className="absolute top-0 right-0 block whitespace-nowrap opacity-0 transition-opacity duration-300 [[data-selected]_&]:opacity-100" style={{ color: "var(--dh-accent)" }}>                          {p.result}                        </span>                      )}                    </span>                  </span>                  <span className="block overflow-hidden" style={{ height: cardH, background: "var(--dh-frame)", outline: "1px solid var(--dh-rule)", outlineOffset: -1 }}>                    {/* eslint-disable-next-line @next/next/no-img-element */}                    <img src={p.image} alt={p.alt ?? `${p.name}${p.kind ? `, ${p.kind}` : ""}`} width={cardW} height={cardH} loading={j < 4 ? "eager" : "lazy"} draggable={false} className="block h-full w-full object-cover object-top select-none" />                  </span>                </>              );              const common = {                className: "block shrink-0 snap-start outline-none focus-visible:[&>span:last-child]:outline-2 focus-visible:[&>span:last-child]:outline-[var(--dh-accent)]",                style: { width: cardW },                onPointerEnter: () => hover(j),                onFocus: () => hover(j),                "aria-hidden": !phone && j >= n ? true : undefined,                tabIndex: !phone && j >= n ? -1 : undefined,              };              return p.href ? (                <a key={j} href={p.href} ref={(el) => void (cardRefs.current[j] = el)} {...common}>                  {body}                </a>              ) : (                <div key={j} ref={(el) => void (cardRefs.current[j] = el)} {...common}>                  {body}                </div>              );            })}          </div>        </div>        {/* The selection, its size tag, and the collaborator's cursor */}        <div ref={selRef} aria-hidden="true" className="pointer-events-none absolute top-0 left-0" style={{ width: cardW, height: cardH, border: "1.5px solid var(--dh-accent)" }}>          <Handles />          <span            className="absolute top-full left-1/2 mt-[8px] -translate-x-1/2 px-1.5 py-[3px] text-[11px] leading-none font-semibold whitespace-nowrap tabular-nums"            style={{ background: "var(--dh-accent)", color: "var(--dh-on-accent)" }}          >            {frameSize}          </span>        </div>        {!phone && !reduced && autoPlay && (          <div ref={cursorRef} aria-hidden="true" className="pointer-events-none absolute top-0 left-0" style={{ transition: "opacity 200ms" }}>            <svg width="18" height="20" viewBox="0 0 18 20" className="block">              <path d="M1.5 1.5 L16 9 L9.4 10.6 L6.4 17.5 Z" fill="var(--dh-accent)" stroke="var(--dh-canvas)" strokeWidth="1.5" strokeLinejoin="round" />            </svg>            <span className="absolute top-[17px] left-[12px] px-1.5 py-[3px] text-[11px] leading-none font-semibold whitespace-nowrap" style={{ background: "var(--dh-accent)", color: "var(--dh-on-accent)" }}>              {cursorName}            </span>          </div>        )}      </div>    </section>  );}

Registry item: /r/deck-hero.json