Page sections / Heroes

Aurora Perspective Grid Hero

Centered bold black headline over a pastel blue-left to pink-right wash with a receding perspective line grid in blue and pink, partner logo lockup above, dual CTAs, and a pill-outlined seven-segment odometer with gradient border and tracked uppercase gradient caption.

Rebuilt from vercel.com/solutions/turborepo in the Monochrome Precision style.

npx shadcn@latest add https://justyoink.it/r/monochrome-precision/blocks/aurora-grid-hero.json

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

Usage

Props: brand, headline (array of lines), description, primaryCta, secondaryCta, counter, caption. Renders standalone with defaults; the perspective grid is an inline SVG masked to fade upward.

components/aurora-grid-hero.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
export default function AuroraPerspectiveGridHero(props: {
  brand?: string;
  partner?: string;
  headline?: string[];
  description?: string;
  primaryCta?: string;
  secondaryCta?: string;
  counter?: string;
  caption?: string;
}) {
  const {
    brand = "NORTHWIND",
    headline = ["Ship faster.", "Scale calmly."],
    description = "Pair Northwind's smart task runner with Altura cloud hosting for quicker pipelines and far less upkeep.",
    primaryCta = "Start building",
    secondaryCta = "Talk to sales",
    counter = "2,408,117,935",
    caption = "Total hours saved by Altura shared caching",
  } = props;

  const vlines = Array.from({ length: 13 }, (_, i) => i - 6);
  const hlines = [0, 6, 14, 26, 42, 62, 88];

  return (
    <section className="relative isolate overflow-hidden bg-canvas font-sans text-ink">
      <style>{`@keyframes pgDrift{from{transform:translateY(0)}to{transform:translateY(100%)}}`}</style>
      <div className="absolute inset-0 -z-10 bg-[linear-gradient(to_right,var(--color-aurora-blue)_0%,transparent_50%,var(--color-aurora-pink)_100%)] opacity-70" />
      <div className="absolute inset-x-0 top-0 -z-10 h-[70%] bg-[linear-gradient(to_bottom,var(--color-canvas),transparent)]" />
      <div
        className="absolute inset-x-0 bottom-0 -z-10 h-[50%] overflow-hidden"
        style={{ maskImage: "linear-gradient(to bottom, transparent, black 40%)", WebkitMaskImage: "linear-gradient(to bottom, transparent, black 40%)" }}
        aria-hidden="true"
      >
        <svg className="absolute inset-0 h-full w-full" viewBox="-100 0 200 100" preserveAspectRatio="none">
          <defs>
            <linearGradient id="pgG" x1="0" x2="1">
              <stop offset="0.4" stopColor="#6fb2ff" />
              <stop offset="0.6" stopColor="#f06aa8" />
            </linearGradient>
          </defs>
          {vlines.map((v) => (
            <line key={v} x1={v * 6} y1="0" x2={v * 22} y2="100" stroke="url(#pgG)" strokeWidth="0.4" opacity="0.7" vectorEffect="non-scaling-stroke" />
          ))}
          {hlines.map((h) => (
            <line key={h} x1="-100" x2="100" y1={h + 6} y2={h + 6} stroke="url(#pgG)" strokeWidth="0.4" opacity="0.5" vectorEffect="non-scaling-stroke" />
          ))}
        </svg>
      </div>

      <Reveal from="up" distance={24} duration={500} className="mx-auto flex max-w-4xl flex-col items-center px-6 pb-24 pt-16 text-center md:pt-20">
        <div className="flex items-center gap-3">
          <span className="h-9 w-9 rounded-full bg-brand-conic p-[5px]" aria-hidden="true">
            <span className="block h-full w-full rounded-full bg-canvas" />
          </span>
          <span className="text-2xl font-black tracking-tight">{brand}</span>
          <span className="text-tertiary">+</span>
          <svg width="28" height="24" viewBox="0 0 28 24" aria-hidden="true"><path d="M14 0l14 24H0z" fill="currentColor" /></svg>
        </div>

        <h1 className="mt-10 text-5xl font-bold leading-[1.02] tracking-[-0.04em] sm:text-7xl md:text-[88px]">
          {headline.map((l) => (
            <span key={l} className="block">{l}</span>
          ))}
        </h1>
        <p className="mt-8 max-w-xl text-lg text-ink">{description}</p>

        <div className="mt-9 flex flex-wrap justify-center gap-3">
          <a href="#" className="rounded-md bg-ink px-9 py-3 text-sm font-medium text-canvas transition-colors duration-150 hover:bg-ink-hover focus-visible:outline-2 focus-visible:outline-link-blue">{primaryCta}</a>
          <a href="#" className="rounded-md bg-surface px-9 py-3 text-sm font-medium shadow-ring transition-colors duration-150 hover:bg-surface-muted focus-visible:outline-2 focus-visible:outline-link-blue">{secondaryCta}</a>
        </div>

        <div className="mt-14 rounded-pill bg-brand-conic p-px">
          <div className="rounded-pill bg-canvas px-10 py-3 font-mono text-4xl tracking-widest tabular-nums" aria-label={counter}>
            {counter}
          </div>
        </div>
        <p className="mt-6 bg-[linear-gradient(to_right,var(--color-accent-azure),var(--color-accent-magenta))] bg-clip-text text-[11px] font-semibold uppercase tracking-[0.2em] text-transparent">{caption}</p>
      </Reveal>
    </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