Cards & content / Media & mockups

Glow-Backed Connection Diagram

Code-drawn UI: provider avatars atop a repo card with folder rows, curved gradient connector lines to three white deploy cards, all floating on a blurred blue/pink/violet radial glow, paired with a heading and relaxed-leading paragraph on the right.

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

npx shadcn@latest add https://justyoink.it/r/monochrome-precision/blocks/glow-flow-diagram.json

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

Usage

Props: title, titleSecond, description, repoName, folders (string[]) and targets ({name,url,color,glyph}[]). Renders standalone with defaults; the glow is pure CSS and the cards enter via Stagger.

components/glow-flow-diagram.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Target = { name: string; url: string; color: string; glyph: string };

type Props = {
  title?: string;
  titleSecond?: string;
  description?: string;
  repoName?: string;
  folders?: string[];
  targets?: Target[];
};

const defaultTargets: Target[] = [
  { name: "web", url: "northwind.dev", color: "#171717", glyph: "W" },
  { name: "console", url: "console.northwind.dev", color: "#e5484d", glyph: "C" },
  { name: "docs", url: "docs.northwind.dev", color: "#2ec27e", glyph: "D" },
];

function Folder({ dim }: { dim?: boolean }) {
  return (
    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" className={dim ? "text-tertiary" : "text-ink"} aria-hidden="true">
      <path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
    </svg>
  );
}

export default function GlowBackedConnectionDiagram({
  title = "Every service. Wired together.",
  titleSecond = "No setup required.",
  description = "Northwind links your repository to each deployment target automatically, so shipping a new service takes seconds and never touches your infrastructure settings.",
  repoName = "north/platform",
  folders = ["landing", "console", "journal"],
  targets = defaultTargets,
}: Props) {
  const ys = [248, 362, 476];
  const rows = [362, 406, 450];
  return (
    <section className="relative overflow-hidden bg-canvas py-16 md:py-24">
      <div className="mx-auto grid max-w-[1200px] items-center gap-10 px-6 lg:grid-cols-[1fr_420px]">
        <div className="relative mx-auto h-[420px] w-full max-w-[560px] md:h-[460px]">
          <div aria-hidden="true" className="absolute left-1/2 top-1/2 h-[420px] w-[520px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-[radial-gradient(closest-side,var(--color-aurora-pink),transparent)] opacity-80 blur-3xl" />
          <div aria-hidden="true" className="absolute left-0 top-10 h-[300px] w-[300px] rounded-full bg-[radial-gradient(closest-side,var(--color-aurora-blue),transparent)] opacity-90 blur-3xl" />
          <div aria-hidden="true" className="absolute left-24 top-40 h-[240px] w-[240px] rounded-full bg-[radial-gradient(closest-side,var(--color-accent-violet),transparent)] opacity-20 blur-3xl" />
          <div className="relative h-full w-full">
            <div className="absolute left-0 top-0 flex">
              {["#171717", "#e8590c", "#1d6ff2"].map((c, i) => (
                <span key={i} className="-ml-0 mr-[-4px] flex h-12 w-12 items-center justify-center rounded-pill bg-surface shadow-card">
                  <span className="h-5 w-5 rounded-[6px]" style={{ background: c }} />
                </span>
              ))}
            </div>
            <Reveal from="up" className="absolute left-0 top-[64px] h-[228px] w-[178px] rounded-lg bg-surface shadow-float">
              <div className="flex items-center gap-3 p-5">
                <span className="flex h-8 w-8 items-center justify-center rounded-pill bg-surface-muted"><span className="h-3 w-3 rounded-xs bg-ink" /></span>
                <span className="text-ui font-medium text-secondary">{repoName}</span>
              </div>
            </Reveal>
            <div className="absolute left-5 top-[132px] w-[185px] overflow-hidden rounded-md bg-surface shadow-float">
              {folders.map((f, i) => (
                <div key={f} className={`flex h-11 items-center gap-3 px-5 text-ui ${i > 0 ? "border-t border-hairline text-tertiary" : "text-ink"}`}>
                  <Folder dim={i > 0} />
                  {f}
                  <span className="ml-auto h-2 w-2 rounded-pill border border-link-blue bg-surface" />
                </div>
              ))}
            </div>
            <svg className="absolute inset-0 h-full w-full" viewBox="0 0 560 460" fill="none" aria-hidden="true">
              <defs>
                <linearGradient id="cn-g" x1="0" x2="1">
                  <stop offset="0" stopColor="#6aa5ff" />
                  <stop offset="1" stopColor="#d65db1" />
                </linearGradient>
              </defs>
              {[0, 1, 2].map((i) => {
                const y1 = 230 + i * 44 - 50 + 0;
                const y2 = 60 + i * 114 + 36;
                return <path key={i} d={`M 200 ${y1 + 8} C 260 ${y1 + 8}, 250 ${y2}, 320 ${y2}`} stroke="url(#cn-g)" strokeWidth="1.4" pathLength="1" strokeDasharray="1" strokeDashoffset="0" />;
              })}
            </svg>
            <Stagger step={290} from="up" distance={14} className="absolute right-0 top-[40px] flex w-[185px] flex-col gap-[30px]">
              {targets.map((t) => (
                <div key={t.name} className="flex h-[72px] items-center gap-3 rounded-md bg-surface px-5 shadow-float">
                  <span className="flex h-10 w-10 items-center justify-center rounded-md bg-surface-muted text-ui font-semibold" style={{ color: t.color }}>{t.glyph}</span>
                  <span className="min-w-0">
                    <span className="block text-ui font-semibold text-ink">{t.name}</span>
                    <span className="block truncate text-caption text-tertiary">{t.url}</span>
                  </span>
                </div>
              ))}
            </Stagger>
          </div>
        </div>
        <Reveal from="up">
          <h2 className="text-h1 font-semibold tracking-[-0.03em] text-ink">
            {title}<br />{titleSecond}
          </h2>
          <p className="mt-5 text-lead leading-9 text-secondary">{description}</p>
        </Reveal>
      </div>
    </section>
  );
}

// ---- Yoink motion (inlined, no dependencies): Reveal, 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;
}

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

/** 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

Customer Story Index List

Lists

Centered Quote with Meta Row

Testimonials

Hairline Navigation Bar

Headers & nav bars

Floating Triangle Hero with Logo Strip

Heroes