Blog sections
Recent posts on a landing page or a blog index: a row of cards, one featured post beside three more, or a compact list with a topic filter. The covers are typographic, in the theme's colors, so no photos are needed.
3 blocks below, each one file and one command. They wear whichever DressCode theme you install, in light and dark.
Post cards
Three recent posts as cards, each with its own typographic cover, under a heading with a link to every article.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/blog-cards.jsoncomponents/dresscode/blog-cards.tsx
// Blog, post cards: three recent posts under a heading with a link to every article. Each card is one
// link. The covers are typographic panels in the theme's colors (an icon, a word, a big number), a
// different one per post, and hidden from screen readers since the title says what the post is.
import { ArrowRight, BellRing, FileText } from "lucide-react"
import type { ReactNode } from "react"
const POSTS: { tag: string; title: string; excerpt: string; date: string; iso: string; time: string; cover: ReactNode }[] = [
{
tag: "Guide",
title: "How to write a reminder that gets paid, not ignored",
excerpt: "Three short lines, sent at the right moment, do more than a stern paragraph.",
date: "Nov 18, 2026",
iso: "2026-11-18",
time: "6 min read",
cover: (
<div className="flex h-full flex-col justify-between bg-[color:var(--dc-highlight)] p-5 text-[color:var(--dc-highlight-fg)]">
<span className="flex items-center justify-between text-[13px] font-semibold">
<span className="opacity-80">Reminders</span>
<BellRing className="size-6" strokeWidth={1.75} />
</span>
<span className="dc-h max-w-[280px] text-[23px] leading-[1.15]">“A friendly nudge that INV-1042 is due on Friday.”</span>
</div>
),
},
{
tag: "Template",
title: "A freelance invoice template your accountant will like",
excerpt: "Every field an invoice needs, in the order your client reads them.",
date: "Nov 6, 2026",
iso: "2026-11-06",
time: "4 min read",
cover: (
<div className="flex h-full flex-col justify-between bg-muted p-5">
<FileText className="size-7 self-end text-muted-foreground" strokeWidth={1.5} />
<span className="dc-h text-[44px] leading-none">Invoice</span>
</div>
),
},
{
tag: "Story",
title: "How Fernwood Studio cut late payments in half",
excerpt: "A six-person studio, one change to their terms and a lot fewer awkward calls.",
date: "Oct 28, 2026",
iso: "2026-10-28",
time: "5 min read",
cover: (
<div className="flex h-full flex-col justify-end bg-[color:color-mix(in_oklab,var(--dc-accent)_14%,var(--card))] p-5">
<span className="dc-h dc-num text-[64px] leading-none text-[color:var(--dc-accent)]">50%</span>
<span className="mt-2 text-[13px] font-semibold text-muted-foreground">fewer late payments</span>
</div>
),
},
]
export default function BlogCards() {
return (
<section aria-labelledby="blog-cards-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="flex flex-wrap items-end justify-between gap-x-8 gap-y-5">
<div className="max-w-[560px]">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">From the blog</p>
<h2 id="blog-cards-title" className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
Get paid, and get paid sooner
</h2>
</div>
<a
href="#blog"
className="inline-flex items-center gap-1.5 rounded-sm text-[15px] font-semibold outline-none hover:text-[color:var(--dc-accent)] focus-visible:ring-3 focus-visible:ring-ring/50"
>
All articles <ArrowRight className="size-4" aria-hidden="true" />
</a>
</div>
<ul className="mt-10 grid gap-4 md:grid-cols-3">
{POSTS.map((p) => (
<li key={p.title}>
<a
href="#post"
className="dc-card group flex h-full flex-col overflow-hidden outline-none transition-transform focus-visible:ring-3 focus-visible:ring-ring/50 motion-safe:hover:-translate-y-0.5"
>
<div aria-hidden="true" className="h-44 border-b border-border">
{p.cover}
</div>
<div className="flex flex-1 flex-col p-5">
<span className="text-[13px] font-semibold text-[color:var(--dc-accent)]">{p.tag}</span>
<h3 className="dc-h mt-2 text-[20px] leading-snug group-hover:underline group-hover:underline-offset-4">{p.title}</h3>
<p className="mt-2 text-[15px] leading-relaxed text-muted-foreground">{p.excerpt}</p>
<p className="mt-auto pt-5 text-[13px] text-muted-foreground">
<time dateTime={p.iso}>{p.date}</time> · {p.time}
</p>
</div>
</a>
</li>
))}
</ul>
</div>
</section>
)
}npx shadcn@latest add https://dresscodeui.com/r/dresscode/blog-featured.jsoncomponents/dresscode/blog-featured.tsx
// Blog, featured post: one large post with a big-number cover on the left, three more as a list on the
// right whose top and bottom lines meet the card's edges. Every post is one link. The covers are
// typographic panels in the theme's colors, hidden from screen readers; the titles say what they are.
import { ArrowRight, Globe, Mail } from "lucide-react"
import type { ReactNode } from "react"
const MORE: { tag: string; title: string; date: string; iso: string; time: string; tile: ReactNode }[] = [
{
tag: "Pricing",
title: "How to raise your rates without losing your best clients",
date: "Nov 12, 2026",
iso: "2026-11-12",
time: "7 min read",
tile: (
<span className="grid size-full place-items-center bg-[color:color-mix(in_oklab,var(--dc-accent)_14%,var(--card))]">
<span className="dc-h dc-num text-[22px] text-[color:var(--dc-accent)]">+15%</span>
</span>
),
},
{
tag: "Template",
title: "A late-payment email you can send today",
date: "Nov 6, 2026",
iso: "2026-11-06",
time: "3 min read",
tile: (
<span className="grid size-full place-items-center bg-muted">
<Mail className="size-8 text-muted-foreground" strokeWidth={1.5} />
</span>
),
},
{
tag: "Story",
title: "How Kato & Lee bill clients in four time zones",
date: "Oct 30, 2026",
iso: "2026-10-30",
time: "5 min read",
tile: (
<span className="grid size-full place-items-center bg-[color:color-mix(in_oklab,var(--chart-2)_24%,var(--card))]">
<Globe className="size-8" strokeWidth={1.5} />
</span>
),
},
]
export default function BlogFeatured() {
return (
<section aria-labelledby="blog-featured-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="flex flex-wrap items-end justify-between gap-x-8 gap-y-5">
<div className="max-w-[560px]">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">The Orbit journal</p>
<h2 id="blog-featured-title" className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
Notes on getting paid
</h2>
</div>
<a
href="#blog"
className="inline-flex items-center gap-1.5 rounded-sm text-[15px] font-semibold outline-none hover:text-[color:var(--dc-accent)] focus-visible:ring-3 focus-visible:ring-ring/50"
>
All articles <ArrowRight className="size-4" aria-hidden="true" />
</a>
</div>
<div className="mt-10 grid gap-10 lg:grid-cols-[1.35fr_1fr] lg:gap-12">
<article className="min-w-0">
<a href="#post" className="dc-card group flex h-full flex-col overflow-hidden outline-none focus-visible:ring-3 focus-visible:ring-ring/50">
<div
aria-hidden="true"
className="flex h-64 flex-col justify-between border-b border-border bg-[color:var(--dc-highlight)] p-6 text-[color:var(--dc-highlight-fg)] sm:h-72 sm:p-8"
>
<span className="text-[14px] font-semibold opacity-80">The Orbit payment report, 2026</span>
<div className="flex items-end gap-x-4">
<span className="dc-h dc-num shrink-0 text-[88px] leading-[0.8] sm:text-[128px]">11</span>
<span className="pb-1">
<span className="dc-h block text-[28px] leading-none">days</span>
<span className="mt-1.5 block max-w-[240px] text-[14px] leading-snug text-balance opacity-80">on average to get paid, down from 23</span>
</span>
</div>
</div>
<div className="flex flex-1 flex-col p-6 sm:p-8">
<p className="text-[13px] text-muted-foreground">
<span className="font-semibold text-[color:var(--dc-accent)]">Report</span> · 9 min read
</p>
<h3 className="dc-h mt-2 text-[26px] leading-[1.15] group-hover:underline group-hover:underline-offset-4 sm:text-[30px]">
We read 40,000 invoices. Here is what gets them paid on time.
</h3>
<p className="mt-3 text-[16px] leading-relaxed text-muted-foreground">
Short terms, a clear due date and one reminder before it falls due cut the wait from 23 days to 11. The numbers, by trade and by invoice size.
</p>
<div className="mt-auto flex items-center gap-3 pt-6 text-[14px]">
<span aria-hidden="true" className="grid size-9 shrink-0 place-items-center rounded-full bg-muted text-[11px] font-bold">
MO
</span>
<span>
<span className="block font-semibold">Maya Okafor</span>
<time dateTime="2026-11-20" className="block text-muted-foreground">
Nov 20, 2026
</time>
</span>
</div>
</div>
</a>
</article>
<div className="flex min-w-0 flex-col">
<h3 className="sr-only">More posts</h3>
<ul className="grid flex-1 border-y border-border lg:grid-rows-3">
{MORE.map((p, i) => (
<li key={p.title} className={i ? "border-t border-border" : undefined}>
<a
href="#post"
className="group flex h-full items-center gap-4 rounded-[var(--radius)] py-5 outline-none focus-visible:ring-3 focus-visible:ring-ring/50 sm:gap-5"
>
<span aria-hidden="true" className="size-20 shrink-0 overflow-hidden rounded-[calc(var(--radius)+4px)] border border-border sm:size-24">
{p.tile}
</span>
<span className="min-w-0">
<span className="block text-[13px] text-muted-foreground">
<span className="font-semibold text-[color:var(--dc-accent)]">{p.tag}</span> · {p.time}
</span>
<span className="dc-h mt-1 block text-[18px] leading-snug group-hover:underline group-hover:underline-offset-4">{p.title}</span>
<time dateTime={p.iso} className="mt-1.5 block text-[13px] text-muted-foreground">
{p.date}
</time>
</span>
</a>
</li>
))}
</ul>
</div>
</div>
</div>
</section>
)
}npx shadcn@latest add https://dresscodeui.com/r/dresscode/blog-list.jsoncomponents/dresscode/blog-list.tsx
"use client"
// Blog, list with a topic filter: a compact list of posts, newest first, each with a small date tile (its
// cover, tinted by topic), the author, the topic and the reading time. Buttons above filter by topic
// (the chosen one is pressed) and a polite live region says how many posts are showing.
import { ArrowRight } from "lucide-react"
import { useId, useState } from "react"
import { cn } from "@/lib/utils"
type Topic = "Guide" | "Template" | "Story" | "Product"
const FILTERS: { value: Topic | "All"; label: string }[] = [
{ value: "All", label: "All posts" },
{ value: "Guide", label: "Guides" },
{ value: "Template", label: "Templates" },
{ value: "Story", label: "Stories" },
{ value: "Product", label: "Product news" },
]
const POSTS: { topic: Topic; title: string; iso: string; time: number; by: string }[] = [
{ topic: "Guide", title: "How to write a reminder that gets paid, not ignored", iso: "2026-11-18", time: 6, by: "Maya Okafor" },
{ topic: "Product", title: "Orbit 3.0: reports your accountant will like", iso: "2026-11-12", time: 3, by: "Jun Sato" },
{ topic: "Template", title: "A freelance invoice template your accountant will like", iso: "2026-11-06", time: 4, by: "Ada Lindqvist" },
{ topic: "Story", title: "How Fernwood Studio cut late payments in half", iso: "2026-10-28", time: 5, by: "Kofi Mensah" },
{ topic: "Guide", title: "Deposits, milestones or monthly: how to bill a long project", iso: "2026-10-21", time: 8, by: "Maya Okafor" },
{ topic: "Template", title: "A late-payment email you can send today", iso: "2026-10-14", time: 3, by: "Ada Lindqvist" },
{ topic: "Story", title: "Ola Bakery's catering side now bills itself", iso: "2026-10-07", time: 4, by: "Kofi Mensah" },
{ topic: "Product", title: "Payment plans: let clients pay in parts", iso: "2026-09-30", time: 2, by: "Jun Sato" },
{ topic: "Guide", title: "What to put in your payment terms, line by line", iso: "2026-09-23", time: 7, by: "Maya Okafor" },
]
// Each topic tints its date tiles differently, so the list reads at a glance.
const TILE: Record<Topic, string> = {
Guide: "bg-[color:color-mix(in_oklab,var(--dc-accent)_13%,var(--card))] text-[color:var(--dc-accent)]",
Template: "bg-muted text-foreground",
Story: "bg-[color:var(--dc-highlight)] text-[color:var(--dc-highlight-fg)]",
Product: "border border-border bg-card text-foreground",
}
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
const parts = (iso: string) => {
const [y, m, d] = iso.split("-").map(Number)
return { day: d, month: MONTHS[m - 1], long: `${MONTHS[m - 1]} ${d}, ${y}` }
}
export default function BlogList() {
const id = useId()
const [topic, setTopic] = useState<Topic | "All">("All")
const shown = topic === "All" ? POSTS : POSTS.filter((p) => p.topic === topic)
const label = FILTERS.find((f) => f.value === topic)?.label
return (
<section aria-labelledby={`${id}-title`} className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="mx-auto max-w-[880px]">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">Blog</p>
<h2 id={`${id}-title`} className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
Everything we have written
</h2>
<p className="mt-4 max-w-[560px] text-[17px] leading-relaxed text-muted-foreground">Guides, templates and stories from people who bill for a living, plus what is new in Orbit.</p>
<div role="group" aria-label="Filter by topic" className="mt-8 flex flex-wrap gap-2">
{FILTERS.map((f) => {
const on = topic === f.value
const n = f.value === "All" ? POSTS.length : POSTS.filter((p) => p.topic === f.value).length
return (
<button
key={f.value}
type="button"
aria-pressed={on}
onClick={() => setTopic(f.value)}
className={cn(
"inline-flex h-9 items-center gap-2 rounded-full border border-border px-3.5 text-[14px] font-semibold text-muted-foreground outline-none transition-colors hover:border-input hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",
on && "border-transparent bg-primary text-primary-foreground hover:border-transparent hover:text-primary-foreground",
)}
>
{f.label}
<span aria-hidden="true" className="dc-num text-[12px] opacity-70">
{n}
</span>
</button>
)
})}
</div>
<p className="sr-only" aria-live="polite">
{topic === "All" ? `Showing all ${shown.length} posts.` : `Showing ${shown.length} posts in ${label}.`}
</p>
<ul className="mt-8 border-t border-border">
{shown.map((p) => {
const d = parts(p.iso)
return (
<li key={p.title} className="border-b border-border">
<a
href="#post"
className="group grid grid-cols-[52px_1fr] items-center gap-x-4 rounded-[var(--radius)] py-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50 sm:grid-cols-[52px_1fr_100px_88px_20px] sm:gap-x-5"
>
<span aria-hidden="true" className={cn("flex size-[52px] flex-col items-center justify-center rounded-[calc(var(--radius)+2px)] leading-none", TILE[p.topic])}>
<span className="dc-h dc-num text-[20px]">{d.day}</span>
<span className="mt-1 text-[11px] font-semibold opacity-80">{d.month}</span>
</span>
<span className="min-w-0">
<span className="block text-[16px] leading-snug font-semibold group-hover:underline group-hover:underline-offset-4 sm:text-[17px]">{p.title}</span>
<span className="mt-1 block text-[13px] text-muted-foreground">
<time dateTime={p.iso} className="sr-only">
{d.long},{" "}
</time>
<span className="hidden sm:inline">By {p.by}</span>
<span className="sm:hidden">
{p.topic} · {p.time} min read
</span>
</span>
</span>
<span className="hidden sm:block">
<span className="dc-pill dc-pill-line">{p.topic}</span>
</span>
<span className="hidden text-right text-[13px] text-muted-foreground sm:block">{p.time} min read</span>
<ArrowRight
aria-hidden="true"
className="hidden size-4 text-muted-foreground transition-transform group-hover:text-foreground motion-safe:group-hover:translate-x-0.5 sm:block"
/>
</a>
</li>
)
})}
</ul>
<div className="mt-8 flex justify-center">
<a
href="#archive"
className="inline-flex items-center gap-1.5 rounded-sm text-[15px] font-semibold outline-none hover:text-[color:var(--dc-accent)] focus-visible:ring-3 focus-visible:ring-ring/50"
>
Older posts <ArrowRight className="size-4" aria-hidden="true" />
</a>
</div>
</div>
</div>
</section>
)
}