Page sections / Logo clouds

Monochrome Logo Tile Row

Eight equal square-cornered tiles on a slightly darker surface with hairline border, each holding a single-color dark wordmark centered. Small centered caption above.

Rebuilt from cursor.com in the Warm Paper Editorial style.

npx shadcn@latest add https://justyoink.it/r/warm-paper-editorial/blocks/logo-cloud-tiles.json

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

Usage

Pass `caption` for the small centered heading and `logos` (array of {name, mark, style}) to change the eight wordmark tiles. Renders standalone with generic fictional brands and geometric marks.

components/logo-cloud-tiles.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Logo = { name: string; mark: "circle" | "square" | "triangle" | "diamond" | "bars" | "ring" | "hex" | "wave"; style?: string };

const defaultLogos: Logo[] = [
  { name: "Northwind", mark: "circle" },
  { name: "ALTURA", mark: "square", style: "tracking-[0.14em] font-semibold text-caption" },
  { name: "Lumen", mark: "ring" },
  { name: "Kitefield", mark: "triangle" },
  { name: "Parcel", mark: "bars" },
  { name: "verso", mark: "wave", style: "lowercase" },
  { name: "HALCYON", mark: "hex", style: "tracking-[0.18em] text-caption font-semibold" },
  { name: "Orbital", mark: "diamond", style: "font-bold" },
];

function Mark({ type }: { type: Logo["mark"] }) {
  const c = "currentColor";
  return (
    <svg width="22" height="22" viewBox="0 0 24 24" aria-hidden="true" fill={c}>
      {type === "circle" && <circle cx="12" cy="12" r="9" />}
      {type === "square" && <rect x="3" y="3" width="18" height="18" rx="2" />}
      {type === "triangle" && <path d="M12 3 22 21H2z" />}
      {type === "diamond" && <path d="M12 2 22 12 12 22 2 12z" />}
      {type === "bars" && <path d="M3 4h4v16H3zM10 8h4v12h-4zM17 12h4v8h-4z" />}
      {type === "ring" && <path fillRule="evenodd" d="M12 2a10 10 0 100 20 10 10 0 000-20zm0 5a5 5 0 110 10 5 5 0 010-10z" />}
      {type === "hex" && <path d="M12 2l9 5v10l-9 5-9-5V7z" />}
      {type === "wave" && <path d="M2 14c3-8 7-8 10 0s7 8 10 0v6H2z" />}
    </svg>
  );
}

export default function MonochromeLogoTileRow({
  caption = "Relied on daily by crews who ship dependable products",
  logos = defaultLogos,
}: {
  caption?: string;
  logos?: Logo[];
}) {
  return (
    <section className="bg-canvas px-4 py-10 sm:px-6">
      <div className="mx-auto max-w-[1300px]">
        <p className="mb-8 text-center text-ui text-ink-muted">{caption}</p>
        <Stagger step={60} from="up" distance={12} className="grid grid-cols-2 gap-2.5 sm:grid-cols-4 lg:grid-cols-8">
          {logos.map((l) => (
            <div
              key={l.name}
              className="flex aspect-square items-center justify-center rounded-xs border border-hairline bg-surface-sunken text-ink lg:aspect-[1.53/1]"
            >
              <div className="flex items-center gap-1.5">
                <Mark type={l.mark} />
                <span className={`font-sans text-lead ${l.style ?? "font-medium"}`}>{l.name}</span>
              </div>
            </div>
          ))}
        </Stagger>
      </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 Warm Paper Editorial

The whole style →

Ink and Ghost Pill Buttons

Buttons

Quote Card Grid

Testimonials

Terminal Install Chip

Code blocks

Dated Blog Index Table

Lists

Customer Story Logo Cards

Cards

Hairline Chevron Accordion

FAQ