Cards & content / Lists

Customer Story Index List

Borderless 5-column rows: name in ink, two-line story summary in gray, grayscale logo, centered uppercase mono industry tag, and right-aligned mono 'READ STORY →' link. Ends with a centered pill 'View all stories' sitting on a faded rule.

Rebuilt from vercel.com/customers in the Monochrome Precision style.

npx shadcn@latest add https://justyoink.it/r/monochrome-precision/blocks/story-index-table.json

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

Usage

Pass `stories` (array of {name, summary, industry, href}) plus optional `ctaLabel` and `ctaHref`; renders with defaults and no props. Logos are generic geometric marks derived from each name, hidden on mobile.

components/story-index-table.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Story = { name: string; summary: string; industry: string; href?: string };

type Props = {
  stories?: Story[];
  ctaLabel?: string;
  ctaHref?: string;
};

const defaults: Story[] = [
  { name: "Northwind Health", summary: "How Northwind Health scales clinical search for 400K nurses", industry: "Healthcare" },
  { name: "Altura", summary: "How Altura ships automated releases to production in 4 minutes", industry: "Finance & Insurance" },
  { name: "Kitefield", summary: "Kitefield rebuilds its storefront stack for faster checkout", industry: "Ecommerce, Software" },
  { name: "Lumen Labs", summary: "How Lumen Labs turns customer requests into features within an hour", industry: "AI" },
  { name: "Harbor Weather", summary: "How Harbor Weather serves live forecasts to 200 million daily users", industry: "Software" },
  { name: "Brightside Studio", summary: "How Brightside Studio cut prototyping time by 60%", industry: "Agency" },
  { name: "Orchard", summary: "How Orchard went from zero to launch in five weeks", industry: "Software" },
];

function Mark({ i, name }: { i: number; name: string }) {
  const shapes = [
    <circle key="a" cx="12" cy="12" r="9" />,
    <rect key="b" x="4" y="4" width="16" height="16" rx="3" />,
    <path key="c" d="M12 3 22 21H2z" />,
    <path key="d" d="M12 2 22 12 12 22 2 12z" />,
  ];
  return (
    <div className="flex items-center gap-2 text-tertiary grayscale">
      <svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">{shapes[i % shapes.length]}</svg>
      <span className="text-lead font-semibold tracking-[-0.03em] text-secondary">{name.split(" ")[0]}</span>
    </div>
  );
}

export default function CustomerStoryIndexList({ stories = defaults, ctaLabel = "View all stories", ctaHref = "#" }: Props) {
  return (
    <section className="bg-canvas px-6 py-8">
      <Stagger step={60} from="up" distance={12} className="mx-auto flex max-w-[1392px] flex-col">
        {stories.map((s, i) => (
          <a
            key={s.name}
            href={s.href ?? "#"}
            className="group grid min-h-24 grid-cols-1 items-center gap-3 py-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-link-blue md:grid-cols-[235px_1fr_320px_320px_1fr] md:gap-0 md:py-0"
          >
            <span className="text-ui font-medium text-ink">{s.name}</span>
            <p className="max-w-[300px] text-ui text-secondary">{s.summary}</p>
            <div className="hidden md:block"><Mark i={i} name={s.name} /></div>
            <span className="font-mono text-caption uppercase text-secondary md:text-center">{s.industry}</span>
            <span className="flex items-center gap-1.5 font-mono text-caption uppercase text-ink md:justify-end">
              Read story
              <svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.4" className="transition-transform duration-hover-fill ease-hover-fill group-hover:translate-x-1 motion-reduce:transition-none" aria-hidden="true">
                <path d="M2 8h11M9 4l4 4-4 4" />
              </svg>
            </span>
          </a>
        ))}
      </Stagger>
      <div className="relative mx-auto mt-16 flex max-w-[1056px] justify-center">
        <div className="absolute inset-x-0 top-1/2 h-px bg-gradient-to-r from-transparent via-hairline to-transparent" />
        <a
          href={ctaHref}
          className="relative rounded-pill bg-surface-muted px-[18px] py-2 text-ui font-medium text-ink transition-colors duration-hover-fill ease-hover-fill hover:bg-hairline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-link-blue"
        >
          {ctaLabel}
        </a>
      </div>
    </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 Monochrome Precision

The whole style →

Ink and Ghost Button Pair

Buttons

Dashed Orbit Integration Ring

Animated graphics

Centered Quote with Meta Row

Testimonials

Hairline Navigation Bar

Headers & nav bars

Floating Triangle Hero with Logo Strip

Heroes

Product Screenshot Story Blocks

Feature sections