Page sections / Heroes

Weathered Texture Compare Hero

Cobalt hero with a 40% opacity grainy charcoal-sketch texture image fading to solid cobalt at the bottom; breadcrumb eyebrow, uppercase tall condensed title, intro paragraph, mono byline and a pale button pair.

Rebuilt from hermes-agent.nousresearch.com/compare in the Electric Ultramarine Engraving style.

npx shadcn@latest add https://justyoink.it/r/electric-ultramarine-engraving/blocks/textured-compare-hero.json

Looks exactly like hermes-agent.nousresearch.com: brings its fonts and colours, namespaced so your own theme stays untouched.

ImagesSwap it for a library image or one of your own.All images in this style →

Choose an image

Image

Loading…

Usage

Pass eyebrow, title (array of lines), intro, byline, button labels and imageSrc as props; all have defaults. Texture image sits at 40% opacity and fades into solid cobalt at the bottom.

components/textured-compare-hero.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Props = {
  eyebrow?: string;
  title?: string[];
  intro?: string;
  byline?: string;
  primaryLabel?: string;
  secondaryLabel?: string;
  imageSrc?: string;
};

export default function WeatheredTextureCompareHero({
  eyebrow = "Compare",
  title = ["Meridian", "Notebook", "Compared"],
  intro = "Meridian Notebook is a free, open-source writing tool for people who want one quiet place that works with the editor they choose and keeps syncing. Run it locally or in the hosted workspace, which keeps going while your laptop sleeps.",
  byline = "Researched by the Northwind editorial team · Updated March 3, 2026",
  primaryLabel = "Install Meridian",
  secondaryLabel = "See the field",
  imageSrc = "https://yoink-app.fly.dev/stock/texture-2.jpg",
}: Props) {
  const btn =
    "relative overflow-hidden px-3 py-2.5 font-display text-button uppercase tracking-wide transition-colors duration-300 bg-[length:200%_100%] bg-[position:100%_0] hover:bg-[position:0_0] focus-visible:outline focus-visible:outline-2 focus-visible:outline-paper";
  return (
    <section className="relative isolate overflow-hidden bg-cobalt text-paper min-h-[734px]">
      <img
        src={imageSrc}
        alt=""
        width={1600}
        height={805}
        className="absolute inset-0 -z-20 h-full w-full object-cover opacity-40 mix-blend-luminosity scale-110 -rotate-3"
      />
      <div className="absolute inset-0 -z-10 bg-cobalt" style={{ opacity: 0.55, mixBlendMode: "multiply" }} />
      <div className="absolute inset-0 -z-10 bg-[linear-gradient(to_top,var(--color-cobalt),transparent_50%)]" />
      <div className="mx-auto max-w-[1100px] px-6 pt-14 pb-24 md:px-0 md:ml-[175px]">
        <Reveal from="up">
          <p className="font-mono text-micro uppercase tracking-wider">{eyebrow}</p>
          <h1 className="mt-10 font-display font-light uppercase leading-[0.85] tracking-tight text-[88px] md:text-[120px]">
            {title.map((t) => (
              <span key={t} className="block">{t}</span>
            ))}
          </h1>
          <p className="mt-9 max-w-[490px] text-body-lg leading-6">{intro}</p>
          <p className="mt-9 font-mono text-micro uppercase">{byline}</p>
          <div className="mt-9 flex">
            <a href="#" className={`${btn} bg-paper-tint text-cobalt-deep`}>{primaryLabel}</a>
            <a href="#" className={`${btn} bg-paper/20 text-paper hover:text-cobalt-deep`}>{secondaryLabel}</a>
          </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 · 5d ago
—

More from Electric Ultramarine Engraving

The whole style →

Numbered Engraving Feature Grid

Feature sections

Cobalt Engraving Hero

Heroes

Spaced Mono Navigation Bar

Headers & nav bars

Install Command Tabs

Code blocks

Condensed Uppercase Button Pair

Buttons

Muted Painting Terminal Video

Media & mockups