Page sections / Feature sections

Product Screenshot Story Blocks

Alternating split layouts with a huge headline, a framed app screenshot (white card, hairline ring, bottom fade to canvas) and a side column pairing a bold-then-muted quote line with a small 'Features' list. Screenshot bottoms dissolve via a to-top canvas gradient.

Rebuilt from vercel.com in the Monochrome Precision style.

npx shadcn@latest add https://justyoink.it/r/monochrome-precision/blocks/customer-feature-showcase.json

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

Usage

Pass `blocks` (array of headline, strong, muted, features, variant 'chat' | 'site') to customise; blocks alternate sides automatically and render with no props.

components/customer-feature-showcase.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Block = {
  headline: string;
  strong: string;
  muted: string;
  features: string[];
  variant: "chat" | "site";
};

type Props = {
  blocks?: Block[];
};

const defaults: Block[] = [
  {
    headline: "Run assistants on a platform that adapts to their pace",
    strong: "Northwind handles millions",
    muted: " of assistant sessions every day on our cloud.",
    features: ["Resumable Workflows", "Isolated Runtimes", "Model Routing", "Elastic Compute"],
    variant: "chat",
  },
  {
    headline: "Launch products that grow from a handful to a crowd",
    strong: "Altura delivers over\n40 million",
    muted: " page views each month on our edge.",
    features: ["Edge Delivery", "Preview Environments", "Background Functions", "Traffic Shield"],
    variant: "site",
  },
];

function Mark({ className = "" }: { className?: string }) {
  return (
    <div className={"grid h-16 w-16 place-items-center rounded-lg bg-ink shadow-card " + className}>
      <div className="h-8 w-8 rotate-45 rounded-xs bg-canvas" />
    </div>
  );
}

function Chat() {
  return (
    <div className="relative h-[420px] md:h-[486px] overflow-hidden">
      <div className="absolute left-0 top-[74px] hidden h-full w-[45%] rounded-xl bg-surface shadow-ring sm:block">
        <Mark className="absolute left-[58px] -top-6" />
        <p className="absolute left-[58px] top-[72px] text-h2 text-hairline-strong">Roadmap doc</p>
      </div>
      <div className="absolute inset-y-0 right-0 w-full rounded-xl bg-surface p-5 shadow-ring sm:w-[58%]">
        <div className="flex items-center justify-between text-ui text-secondary">
          <span>New chat ▾</span>
          <span className="flex gap-3 text-tertiary">▢ ▣ ✕</span>
        </div>
        <div className="mt-5 grid h-12 w-12 place-items-center rounded-pill shadow-ring">
          <div className="h-4 w-4 rounded-pill border-2 border-ink" />
        </div>
        <p className="mt-5 text-h3 text-ink">What can I do for you?</p>
        <ul className="mt-5 space-y-4 text-ui text-ink">
          <li>◇ Summarize this page</li>
          <li>◇ Find key themes</li>
          <li>◇ Draft a checklist</li>
        </ul>
        <div className="mt-6 h-40 rounded-xl p-3 shadow-ring">
          <span className="rounded-pill px-3 py-1.5 text-caption shadow-ring">Roadmap doc</span>
          <p className="mt-4 text-caption text-tertiary">Ask, search, or make anything...</p>
        </div>
      </div>
    </div>
  );
}

function Site() {
  return (
    <div className="h-[420px] md:h-[516px] overflow-hidden rounded-xl bg-surface shadow-ring">
      <div className="flex items-center gap-4 border-b border-hairline px-4 py-3 text-caption text-secondary">
        <b className="text-ui text-ink">_altura</b>
        <span className="hidden sm:inline">Products ▾</span>
        <span className="hidden sm:inline">Solutions ▾</span>
        <span className="hidden sm:inline">Pricing</span>
        <span className="ml-auto rounded-pill bg-surface-muted px-3 py-1">Sign up</span>
      </div>
      <div className="mx-auto mt-12 max-w-md px-4 text-center">
        <p className="text-eyebrow text-tertiary">EDGE PLATFORM, SIMPLIFIED</p>
        <p className="mt-4 text-h2 text-ink">Fast sites. Calm teams.</p>
        <p className="mt-4 text-caption text-secondary">One place to ship, observe and tune every page your customers see.</p>
        <div className="mt-6 flex justify-center gap-3 text-caption">
          <span className="rounded-md bg-surface-muted px-4 py-2 text-tertiary">Start free</span>
          <span className="rounded-md px-4 py-2 shadow-ring">Book a demo</span>
        </div>
        <div className="mt-10 grid grid-cols-3 gap-2 text-secondary">
          {["120K+", "8,500+", "2.1M+"].map((n) => (
            <div key={n}><p className="text-lead">{n}</p><p className="text-caption text-tertiary">Metric</p></div>
          ))}
        </div>
      </div>
    </div>
  );
}

export default function ProductScreenshotStoryBlocks({ blocks = defaults }: Props) {
  return (
    <section className="bg-canvas px-6 py-16 text-ink font-sans">
      <div className="mx-auto max-w-[1392px] space-y-28">
        {blocks.map((b, i) => {
          const flip = i % 2 === 1;
          return (
            <Reveal key={i} from="up">
              <div className="grid gap-10 lg:grid-cols-[minmax(0,921px)_1fr] lg:gap-[8%]">
                <div className={flip ? "lg:order-2" : "lg:order-1"}>
                  <h2 className="mb-12 max-w-[640px] text-display tracking-[-0.04em] text-ink">{b.headline}</h2>
                  <div className="relative">
                    {b.variant === "chat" ? <Chat /> : <Site />}
                    <div className="pointer-events-none absolute inset-x-0 bottom-0 h-40 bg-gradient-to-t from-canvas to-transparent" />
                  </div>
                </div>
                <aside className={(flip ? "lg:order-1" : "lg:order-2") + " flex flex-col justify-center"}>
                  <p className="whitespace-pre-line text-lead text-ink">
                    {b.strong}<span className="text-secondary">{b.muted}</span>
                  </p>
                  <p className="mt-10 text-caption text-tertiary">Features</p>
                  <ul className="mt-2 space-y-2 text-ui text-ink">
                    {b.features.map((f) => <li key={f}>{f}</li>)}
                  </ul>
                </aside>
              </div>
            </Reveal>
          );
        })}
      </div>
    </section>
  );
}

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

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;
}

type YkRevealFrom = "up" | "down" | "left" | "right" | "scale" | "blur" | "none";

/** Fades content in as it scrolls into view. */
function Reveal({
  children,
  from = "up",
  delay = 0,
  duration = 700,
  distance = 24,
  once = true,
  as = "div",
  className,
  style,
}: {
  children?: ReactNode;
  from?: YkRevealFrom;
  delay?: number;
  duration?: number;
  distance?: number;
  once?: boolean;
  as?: ElementType;
  className?: string;
  style?: CSSProperties;
}) {
  const Tag = as;
  const ref = useRef<HTMLElement>(null);
  const state = useYkReveal(ref, once);
  const hidden = state === "hidden";
  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.94)",
    blur: `translate3d(0, ${distance / 2}px, 0)`,
    none: "none",
  }[from];
  const t = `${duration}ms ${YK_EASE} ${delay}ms`;
  return (
    <Tag
      ref={ref}
      className={className}
      style={{
        ...style,
        ...(hidden && { opacity: 0, transform: offset, filter: from === "blur" ? "blur(12px)" : undefined }),
        ...(state === "shown" && { transition: `opacity ${t}, transform ${t}, filter ${t}` }),
      }}
    >
      {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

Customer Story Index List

Lists

Centered Quote with Meta Row

Testimonials

Hairline Navigation Bar

Headers & nav bars

Floating Triangle Hero with Logo Strip

Heroes