Page sections / Blog & articles

Dated Article Row

Rows split by hairlines: a purple category label with marker, a large bold navy title, a muted excerpt and a 'Read more' arrow link on the left; on the right, a date and an author with a round avatar and role, over a large shadowed image card with colorful silk framing.

Rebuilt from stripe.com/blog in the Iridescent Ledger style.

npx shadcn@latest add https://justyoink.it/r/iridescent-ledger/blocks/blog-feature-post.json

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

Usage

Pass an `articles` array (category, date, title, excerpt, author, role, initials, variant: "confirm" | "chat") to render rows; it renders with two sample rows by default. Hovering a row shifts the link chevron, tints the title and lifts the image card.

components/blog-feature-post.tsx
"use client";

import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type ElementType, type ReactNode, type RefObject } from "react";
type Article = {
  category: string;
  date: string;
  title: string;
  excerpt: string;
  author: string;
  role: string;
  initials: string;
  variant: "confirm" | "chat";
};

const defaults: Article[] = [
  {
    category: "Product",
    date: "March 12, 2026",
    title: "Let your assistants reconcile invoices and schedule payouts safely",
    excerpt:
      "Ledgerline now lets assistants match invoices, convert balances and queue vendor payouts inside limits you define, with an approval step for every large transfer.",
    author: "Julia Hartwell",
    role: "Product Lead, Payments",
    initials: "JH",
    variant: "confirm",
  },
  {
    category: "Product",
    date: "February 26, 2026",
    title: "Explore your revenue data by simply asking a question",
    excerpt:
      "Describe the report you want in plain language and get a polished summary or live dashboard that explains what moved your numbers last month.",
    author: "Marcus Odell",
    role: "Product Lead, Insights",
    initials: "MO",
    variant: "chat",
  },
];

function Confirm() {
  return (
    <div className="relative aspect-square w-full overflow-hidden rounded-md bg-surface">
      <div className="absolute inset-0 bg-[radial-gradient(60%_50%_at_30%_5%,var(--color-signal-orange),transparent),radial-gradient(50%_50%_at_0%_40%,var(--color-accent-soft),transparent),radial-gradient(40%_40%_at_100%_85%,var(--color-signal-magenta),transparent)] opacity-80" />
      <div className="absolute left-[15%] right-[15%] top-[10%] bottom-[8%] rounded-md bg-surface p-5 shadow-floating">
        <div className="mb-3 flex gap-1">
          <span className="h-2 w-2 rounded-pill border border-accent" />
          <span className="h-2 w-2 rounded-pill bg-hairline" />
          <span className="h-2 w-2 rounded-pill bg-hairline" />
        </div>
        <p className="text-h3 font-semibold text-ink-deep">Approve transfer</p>
        <p className="mt-2 text-caption text-ink-muted">Please verify you authorized this action before it completes.</p>
        <div className="my-4 h-px bg-hairline" />
        <p className="text-caption font-semibold text-ink-deep">Outbound payment</p>
        <dl className="mt-3 grid grid-cols-[70px_1fr] gap-y-2 text-micro text-ink-muted">
          <dt className="font-semibold text-ink">Amount</dt><dd>$2,400</dd>
          <dt className="font-semibold text-ink">From</dt><dd className="underline">Operating Account</dd>
          <dt className="font-semibold text-ink">Recipient</dt><dd>Harbor Supply Co.</dd>
        </dl>
        <div className="mt-4 rounded-sm bg-surface-tint px-3 py-2 text-micro text-ink">› Request details</div>
        <div className="mt-4 flex justify-end gap-2 text-micro">
          <span className="rounded-sm border border-hairline px-3 py-1.5 text-ink">Deny</span>
          <span className="rounded-sm bg-accent px-3 py-1.5 text-surface">Confirm</span>
        </div>
      </div>
    </div>
  );
}

function Chat() {
  return (
    <div className="aspect-square w-full overflow-hidden rounded-md bg-night text-surface">
      <div className="flex items-center gap-1.5 bg-night-panel px-3 py-2">
        <span className="h-2.5 w-2.5 rounded-pill bg-signal-magenta" />
        <span className="h-2.5 w-2.5 rounded-pill bg-signal-orange" />
        <span className="h-2.5 w-2.5 rounded-pill bg-cyan-action" />
        <span className="mx-auto rounded-pill bg-night px-10 py-0.5 text-micro text-ink-faint">assistant.app</span>
      </div>
      <div className="border-b border-white/10 px-6 py-3 text-center text-caption">Monthly revenue summary</div>
      <div className="p-6">
        <div className="ml-auto max-w-[85%] rounded-md bg-night-panel px-4 py-3 text-caption">Summarize how revenue changed this month for my team update.</div>
        <p className="mt-8 text-caption text-ink-faint">Preparing a slide deck.</p>
        <p className="mt-3 text-caption">I'll pull last month's figures, compare them with the prior quarter, and build the deck.</p>
        <p className="mt-4 flex items-center gap-2 text-caption text-ink-faint"><span className="h-4 w-4 rounded-xs bg-accent" />Using Analytics</p>
      </div>
    </div>
  );
}

export default function DatedArticleRow({ articles = defaults }: { articles?: Article[] }) {
  return (
    <section className="bg-canvas px-4 py-16 font-sans">
      <div className="mx-auto max-w-[1080px] border-x border-dashed border-hairline">
        {articles.map((a, i) => (
          <Reveal key={i}>
            <article className="group grid gap-8 py-12 lg:grid-cols-[1fr_540px] lg:gap-0">
              <div className="lg:contents">
                <div className="px-4 lg:col-start-1 lg:row-start-1">
                  <p className="border-l border-accent pl-4 text-ui text-accent">{a.category}</p>
                  <h2 className="mt-6 max-w-[640px] pl-0 text-h1 font-semibold text-ink-deep transition-colors duration-smooth ease-smooth group-hover:text-accent lg:pl-4">
                    {a.title}
                  </h2>
                  <p className="mt-5 max-w-[480px] text-lead text-ink-muted lg:pl-4">{a.excerpt}</p>
                  <a href="#" className="mt-5 inline-flex items-center gap-2 text-ui font-medium text-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent lg:ml-4">
                    Read more
                    <svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" strokeWidth="1.6" className="transition-transform duration-smooth ease-smooth group-hover:translate-x-1" aria-hidden="true"><path d="M4 2l4 4-4 4" /></svg>
                  </a>
                </div>
              </div>
              <div className="px-4 lg:col-start-2 lg:row-start-1 lg:px-0">
                <p className="border-l border-accent pl-4 text-ui text-ink-muted">{a.date}</p>
                <div className="mt-6 flex items-start gap-4 pl-4">
                  <span className="flex h-12 w-12 shrink-0 items-center justify-center rounded-pill bg-gradient-to-br from-accent-soft to-signal-magenta text-ui font-semibold text-ink-deep">{a.initials}</span>
                  <div>
                    <p className="text-ui font-semibold text-ink-deep">{a.author}</p>
                    <p className="text-ui text-ink-muted">{a.role}</p>
                  </div>
                </div>
                <div className="mt-8 rounded-md bg-surface p-3 shadow-floating transition-transform duration-smooth ease-smooth group-hover:-translate-y-1">
                  {a.variant === "confirm" ? <Confirm /> : <Chat />}
                </div>
              </div>
            </article>
          </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 Iridescent Ledger

The whole style →

Checklist Feature Columns

Feature sections

Iridescent Ribbon Hero

Heroes

Saturated Highlight Card Strip

Carousels

Frosted Hairline Header

Headers & nav bars

Sticky Pill Sub-Navigation

Tab bars

Mockup Bento Grid

Feature sections