Cards & content / Lists

Numbered Hairline Row List

Full-bleed rows separated by 10% black rules, each with a two-digit index in the left column and a bold 40px title in a wider column; preceded by a small section label.

Rebuilt from thisislandscape.com in the Gallery White Editorial style.

npx shadcn@latest add https://justyoink.it/r/gallery-white-editorial/blocks/numbered-outcome-list.json

Looks exactly like thisislandscape.com: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Pass `label` for the small heading and `items` as an array of {title, href}. Rows fade in on scroll (1000ms, staggered) and are full-width links separated by hairline rules.

components/numbered-outcome-list.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Item = { title: string; href?: string };

export default function NumberedHairlineRowList({
  label = "Results",
  items = [
    { title: "Validate Initial Demand", href: "#" },
    { title: "Scale Into New Markets", href: "#" },
    { title: "Shape Emerging Segments", href: "#" },
    { title: "Refine & Grow Customer Trust", href: "#" },
    { title: "Unlock Product-Led Growth", href: "#" },
  ],
}: {
  label?: string;
  items?: Item[];
}) {
  return (
    <section className="w-full bg-canvas text-ink font-sans">
      <h2 className="px-4 pb-3 text-body-small font-medium text-ink">{label}</h2>
      <Stagger step={120} from="fade" duration={1000} className="flex flex-col border-t border-hairline" as="ul">
        {items.map((item, i) => (
          <li key={item.title} className="border-b border-hairline">
            <a
              href={item.href ?? "#"}
              className="grid grid-cols-[48px_1fr] md:grid-cols-12 items-center gap-x-4 px-4 py-6 md:py-7 cursor-pointer focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink"
            >
              <span className="md:col-span-1 text-[28px] md:text-[40px] leading-[1.1] font-bold tracking-[-0.02em]">
                {String(i + 1).padStart(2, "0")}
              </span>
              <span className="md:col-span-11 md:pl-[48px] text-[28px] md:text-[40px] leading-[1.1] font-bold tracking-[-0.02em]">
                {item.title}
              </span>
            </a>
          </li>
        ))}
      </Stagger>
    </section>
  );
}

// ---- Yoink motion (inlined, no dependencies): Stagger ----

const YK_EASE = "cubic-bezier(0.16, 1, 0.3, 1)";

const useYkLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;

function ykReducedMotion(): boolean {
  return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
}

// "idle": untouched (visible) · "hidden": waiting below the fold · "shown": play the entrance.
// Content is only hidden once we know we can show it again (IntersectionObserver exists, motion allowed,
// and there is a box to watch), and a safety net reveals anything on screen that is still hidden.
type YkRevealState = "idle" | "hidden" | "shown";

function useYkReveal(ref: RefObject<Element | null>, once = true): YkRevealState {
  const [state, setState] = useState<YkRevealState>("idle");
  useYkLayoutEffect(() => {
    const el = ref.current;
    if (!el || ykReducedMotion() || typeof IntersectionObserver === "undefined") return;
    // watch the element's own box, or its children when it has none (display: contents)
    const boxes = () => (getComputedStyle(el).display === "contents" ? Array.from(el.children) : [el]);
    const onScreen = (t: Element) => {
      const r = t.getBoundingClientRect();
      return (r.width > 0 || r.height > 0) && r.bottom > 0 && r.right > 0 && r.top < window.innerHeight && r.left < window.innerWidth;
    };
    if (!boxes().some((t) => t.getBoundingClientRect().width > 0 || t.getBoundingClientRect().height > 0)) return; // e.g. hidden at mount: leave it visible
    let shown = false;
    const show = (v: boolean) => {
      if (v !== shown) (shown = v), setState(v ? "shown" : "hidden");
    };
    setState("hidden");
    const inView = new Set<Element>();
    const io = new IntersectionObserver((entries) => {
      for (const e of entries) {
        if (e.isIntersecting) inView.add(e.target);
        else inView.delete(e.target);
      }
      if (inView.size) {
        show(true);
        if (once) io.disconnect();
      } else if (!once) show(false);
    });
    const watched = new Set<Element>();
    const watch = () => boxes().forEach((t) => !watched.has(t) && (watched.add(t), io.observe(t)));
    watch();
    // safety net: styles that land after mount (display: contents) get watched too, and nothing
    // stays hidden for more than a moment while it is actually on screen
    const start = Date.now();
    const net = setInterval(() => {
      if (shown) return once && clearInterval(net);
      watch();
      if (Date.now() - start > 2400 && boxes().some(onScreen)) show(true);
    }, 600);
    return () => {
      io.disconnect();
      clearInterval(net);
    };
  }, [once]);
  return state;
}

/** Reveals each direct child one after another when the group scrolls into view. */
function Stagger({
  children,
  step = 90,
  from = "up",
  distance = 20,
  duration = 650,
  delay = 0,
  once = true,
  as = "div",
  className,
  style,
}: {
  children?: ReactNode;
  step?: number;
  from?: "up" | "down" | "left" | "right" | "scale" | "fade";
  distance?: number;
  duration?: number;
  delay?: number;
  once?: boolean;
  as?: ElementType;
  className?: string;
  style?: CSSProperties;
}) {
  const Tag = as;
  const ref = useRef<HTMLElement>(null);
  const state = useYkReveal(ref, once);
  useYkLayoutEffect(() => {
    const items = Array.from(ref.current?.children ?? []) as HTMLElement[];
    if (state === "idle") return;
    const offset = {
      up: `translate3d(0, ${distance}px, 0)`,
      down: `translate3d(0, ${-distance}px, 0)`,
      left: `translate3d(${-distance}px, 0, 0)`,
      right: `translate3d(${distance}px, 0, 0)`,
      scale: "scale(0.92)",
      fade: "none",
    }[from];
    if (state === "hidden") {
      for (const el of items) Object.assign(el.style, { transition: "none", opacity: "0", transform: offset });
      return;
    }
    items.forEach((el, i) => {
      const t = `${duration}ms ${YK_EASE} ${delay + i * step}ms`;
      Object.assign(el.style, { transition: `opacity ${t}, transform ${t}`, opacity: "", transform: "" });
    });
    // hand the children their own transitions back once everything has landed
    const done = setTimeout(() => items.forEach((el) => (el.style.transition = "")), delay + items.length * step + duration + 50);
    return () => clearTimeout(done);
  }, [state]);
  return (
    <Tag ref={ref} className={className} style={style}>
      {children}
    </Tag>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Gallery White Editorial

The whole style →

Hairline Pill Nav Header

Headers & nav bars

Monochrome Client Logo Row

Logo clouds

Giant Type CTA with Arrow Glyph

Calls to action

Pill Footer Link Row

Footers

Hanging-Quote Testimonial Carousel

Testimonials

Twin-Panel Project Slideshow Hero

Heroes