Page sections / Blog & articles

Featured and Stacked Blog Cards

Asymmetric layout: one large card with 1.9:1 dark cover image plus meta line (date · category), 22px title, muted excerpt and small round author avatar; right column stacks smaller cards with similar structure including a looping muted video cover.

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

npx shadcn@latest add https://justyoink.it/r/warm-paper-editorial/blocks/editorial-post-grid.json

Looks exactly like cursor.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 `featured` and `stacked` (arrays of {meta,title,excerpt,author,read,initials}) plus `coverSrc` for the photo cover; renders standalone with defaults. Cards tint on hover.

components/editorial-post-grid.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Post = {
  meta: string;
  title: string;
  excerpt: string;
  author: string;
  read: string;
  initials: string;
};

type Props = {
  featured?: Post;
  stacked?: Post[];
  coverSrc?: string;
};

const defaultFeatured: Post = {
  meta: "Mar 03, 2026 · Company",
  title: "Northwind opens a second studio in Lisbon",
  excerpt: "Our growing team now has a new home base for design and research.",
  author: "Northwind Team",
  read: "2 min read",
  initials: "NT",
};

const defaultStacked: Post[] = [
  {
    meta: "Apr 12, 2026 · Release",
    title: "Meet Altura Notes 2.0",
    excerpt: "A faster editor with shared folders, offline mode and simpler search.",
    author: "Northwind Team",
    read: "3 min read",
    initials: "NT",
  },
  {
    meta: "Feb 20, 2026 · Guide",
    title: "Designing calm dashboards",
    excerpt: "Practical spacing and colour rules we use for dense data screens.",
    author: "Mara Ellison",
    read: "12 min read",
    initials: "ME",
  },
];

function Mark() {
  return (
    <svg viewBox="0 0 24 24" className="h-full w-full" aria-hidden="true">
      <circle cx="12" cy="12" r="12" fill="currentColor" />
      <path d="M12 6l5 3v6l-5 3-5-3V9z" fill="#f7f7f4" />
    </svg>
  );
}

function Meta({ p }: { p: Post }) {
  return (
    <div className="flex flex-col gap-2 p-[18px]">
      <p className="text-ui text-ink-faint">{p.meta}</p>
      <h3 className="text-lead text-ink">{p.title}</h3>
      <p className="text-ui text-ink-muted">{p.excerpt}</p>
      <div className="mt-3 flex items-center gap-2 text-ui text-ink-faint">
        <span className="h-6 w-6 text-ink"><Mark /></span>
        <span>{p.author} · {p.read}</span>
      </div>
    </div>
  );
}

export default function FeaturedAndStackedBlogCards({
  featured = defaultFeatured,
  stacked = defaultStacked,
  coverSrc = "https://yoink-app.fly.dev/stock/abstract-3.jpg",
}: Props) {
  const cardCls =
    "group block overflow-hidden rounded-xs border border-hairline bg-surface transition-colors duration-hover-color ease-hover-color hover:bg-surface-sunken focus-visible:outline focus-visible:outline-2 focus-visible:outline-ink";
  return (
    <section className="bg-canvas px-4 py-16 md:px-[70px]">
      <div className="mx-auto grid max-w-[1300px] gap-[10px] lg:grid-cols-[2fr_1fr]">
        <Reveal from="up">
          <a href="#" className={cardCls}>
            <div className="relative flex aspect-[1.9/1] items-center justify-center bg-[#0a0a0a]">
              <div className="flex items-center gap-6 text-[#f2f1ed]">
                <svg viewBox="0 0 24 24" className="h-16 w-16" aria-hidden="true">
                  <path d="M12 2l9 5v10l-9 5-9-5V7z" fill="currentColor" />
                </svg>
                <span className="h-16 w-px bg-white/30" />
                <span className="text-h1 tracking-[0.2em]">LUMEN</span>
              </div>
            </div>
            <Meta p={featured} />
          </a>
        </Reveal>
        <div className="flex flex-col gap-[10px]">
          {stacked.map((p, i) => (
            <Reveal key={p.title} from="up" delay={120 * (i + 1)}>
              <a href="#" className={cardCls}>
                <div className="relative aspect-[1.9/1] overflow-hidden bg-media-slate">
                  {i === 0 ? (
                    <>
                      <img src={coverSrc} alt="" width={427} height={224} loading="lazy" className="h-full w-full object-cover opacity-80" />
                      <span className="absolute inset-0 flex items-center justify-center text-h2 text-white">Altura 2.0</span>
                    </>
                  ) : (
                    <svg viewBox="0 0 400 210" className="h-full w-full bg-media-stone" aria-hidden="true">
                      <g stroke="#8fd0b4" fill="none" strokeWidth="1">
                        <rect x="20" y="20" width="360" height="170" />
                        <path d="M20 80h360M20 130h360M140 20v170M290 20v170" />
                        <path d="M60 190L190 20M100 190L380 20M140 190L380 90" strokeDasharray="2 3" stroke="#26251e" />
                      </g>
                    </svg>
                  )}
                </div>
                <Meta p={p} />
              </a>
            </Reveal>
          ))}
        </div>
      </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 · 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