Page sections / Heroes

Floating Triangle Hero with Logo Strip

Left-aligned oversized tight-tracked headline with CTA pair, a glowing black triangle rendered on a canvas with concentric soft halo and heavy drop shadow in the center, a short three-line descriptor list on the right, and a grayscale logo row spanning the bottom.

Rebuilt from vercel.com in the Monochrome Precision style.

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

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

Usage

Props: headline, primaryLabel, secondaryLabel, descriptors (3 short lines), logos (names rendered with generic geometric marks). Renders standalone with defaults; the triangle fades in over 1.2s.

components/agentic-hero-canvas.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Props = {
  headline?: string;
  primaryLabel?: string;
  secondaryLabel?: string;
  descriptors?: string[];
  logos?: string[];
};

function Mark({ i }: { i: number }) {
  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 3l9 18H3z" />,
    <path key="d" d="M3 12h18M12 3v18" />,
    <path key="e" d="M4 18L12 4l8 14z" />,
    <path key="f" d="M4 6h16v12H4z M4 6l16 12" />,
  ];
  return (
    <svg viewBox="0 0 24 24" width="26" height="26" fill="none" stroke="currentColor" strokeWidth="2.2" aria-hidden="true">
      {shapes[i % shapes.length]}
    </svg>
  );
}

export default function FloatingTriangleHeroWithLogoStrip({
  headline = "Serverless Platform for Teams",
  primaryLabel = "Start building",
  secondaryLabel = "Contact us",
  descriptors = ["For product teams", "To launch services fast", "Scaled by automation"],
  logos = ["Northwind", "Altura", "Lumen", "Kitefield", "Brightline", "Orbital"],
}: Props) {
  return (
    <section className="relative isolate flex min-h-[760px] flex-col overflow-hidden bg-canvas text-ink">
      <div className="relative flex flex-1 flex-col items-start justify-center gap-12 px-6 py-20 lg:flex-row lg:items-center lg:justify-between">
        <Reveal from="up" className="relative z-10 max-w-md">
          <h1 className="text-[56px] font-normal leading-[0.95] tracking-[-0.045em] sm:text-[68px]">{headline}</h1>
          <div className="mt-8 flex flex-wrap gap-3">
            <a href="#" className="rounded-pill bg-ink px-[18px] py-[10px] text-ui text-surface outline-none transition-colors duration-hover-fill ease-hover-fill hover:bg-ink-hover focus-visible:ring-2 focus-visible:ring-link-blue">{primaryLabel}</a>
            <a href="#" className="rounded-pill bg-surface px-[18px] py-[10px] text-ui text-ink shadow-ring outline-none transition-colors duration-hover-fill ease-hover-fill hover:bg-surface-muted focus-visible:ring-2 focus-visible:ring-link-blue">{secondaryLabel}</a>
          </div>
        </Reveal>

        <div aria-hidden="true" className="pointer-events-none relative mx-auto h-[360px] w-[360px] animate-[fadeIn_1.2s_ease-out_both] lg:absolute lg:left-1/2 lg:top-1/2 lg:-translate-x-1/2 lg:-translate-y-1/2">
          <style>{`@keyframes fadeIn{from{opacity:0}to{opacity:1}}`}</style>
          <div className="absolute inset-0 rounded-full bg-[radial-gradient(circle,#fff_0%,#fff_30%,transparent_70%)] opacity-90 shadow-[0_0_80px_20px_rgba(0,0,0,0.04)]" />
          <div className="absolute inset-12 rounded-full bg-[radial-gradient(circle,#fff,transparent_70%)]" />
          <div className="absolute left-1/2 top-1/2 h-[166px] w-[192px] -translate-x-1/2 -translate-y-[44%] bg-black [clip-path:polygon(50%_0,100%_100%,0_100%)] drop-shadow-[14px_18px_14px_rgba(0,0,0,0.35)]" />
        </div>

        <ul className="relative z-10 space-y-2 text-body text-ink lg:mr-24">
          {descriptors.map((d) => (
            <li key={d}>{d}</li>
          ))}
        </ul>
      </div>

      <ul className="flex flex-wrap items-center justify-between gap-x-8 gap-y-4 px-6 pb-10 text-ink grayscale">
        {logos.map((l, i) => (
          <li key={l} className="flex items-center gap-2 text-lead font-semibold tracking-tight">
            <Mark i={i} />
            {l}
          </li>
        ))}
      </ul>
    </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

Product Screenshot Story Blocks

Feature sections