Blog Grid 2
Blog index that shows a new visitor where to begin: one spotlight post, then start-here paths (stage, three reads in order, the matching offer) behind a segmented stepper that collapses to one path.
Use it in a prompt
Use content/blog-grid-2 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/blog-grid-2.tsx. - Import it and pass your copy and images (Props tab):
import { BlogGrid2 } from "@/components/funneldna/content/blog-grid-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/blog-grid-2/component.tsx 694 lines
// layout: segmented-stepper
// Blog index that shows a new visitor where to begin: one spotlight post, then start-here paths (stage, three reads in order, the matching offer) behind a segmented stepper that collapses to one path.
import * as React from "react"
import { Clock, TrendingUp } from "lucide-react"
import { motion, useReducedMotion } from "motion/react"
import { FX_HOST, Pattern, Spot } from "../fx/fx"
export type BlogPathPost = {
title: string
/** Shown when a single path is open, and on phones. */
excerpt?: string
/** Thumbnail photo (slot item-n), cropped at 8px radius. */
image?: string
imageAlt?: string
/** Imported fx Spot illustration, used when there is no photo. */
spot?: string
href?: string
readTime?: string
}
export type BlogPathOffer = {
title: string
detail?: string
/** e.g. "$47"; the currency sign is set as a superscript. */
price?: string
/** Small line under the price; defaults to copy.priceNote. */
priceNote?: string
label: string
href?: string
/** One plain line under the button. */
secondaryLabel?: string
secondaryHref?: string
disabled?: boolean
}
export type BlogPath = {
id: string
name: string
/** Who this stage is for, one short line. */
who?: string
posts: BlogPathPost[]
/** The value-ladder offer that ends this path. */
offer?: BlogPathOffer
}
export type BlogSpotlight = {
title: string
excerpt?: string
/** Cover photo (slot scene). */
image?: string
imageAlt?: string
href?: string
author?: string
readTime?: string
/** Chip above the title; defaults to copy.spotlightFlag. */
flag?: string
}
export type BlogGrid2Action =
| { type: "spotlight"; post: BlogSpotlight }
| { type: "post"; post: BlogPathPost; path: BlogPath }
| { type: "offer"; offer: BlogPathOffer; path: BlogPath }
export type BlogGrid2Copy = {
/** Accessible name of the segmented stepper. */
filterLabel: string
allLabel: string
/** "{n}" becomes the read's position in its path. */
readLabel: string
/** "{name}" becomes the next path's name. */
next: string
/** Used on the last path; "{name}" is the first path. */
restart: string
readMore: string
spotlightFlag: string
priceNote: string
}
export type BlogGrid2Props = {
headline?: React.ReactNode
/** Phrase inside a string headline that gets the marker stroke. */
highlight?: string
lead?: React.ReactNode
spotlight?: BlogSpotlight | null
pathsHeading?: React.ReactNode
pathsLead?: React.ReactNode
/** Paths with no posts are hidden. */
paths?: BlogPath[]
/** "all" or a path id. */
defaultPath?: string
copy?: Partial<BlogGrid2Copy>
onAction?: (target: BlogGrid2Action) => void
state?: "default" | "hover" | "active"
className?: string
}
const EASE: [number, number, number, number] = [0.2, 0.7, 0.2, 1]
const DEFAULT_COPY: BlogGrid2Copy = {
filterLabel: "Choose your stage",
allLabel: "All three paths",
readLabel: "Read {n}",
next: "Next path: {name}",
restart: "Back to: {name}",
readMore: "Read the full post",
spotlightFlag: "Start here",
priceNote: "one-time payment",
}
const DEFAULT_SPOTLIGHT: BlogSpotlight = {
title: "Start here: the one-page plan behind everything on this blog",
excerpt: "The short version of how we think, in the order we would teach it. Read this first and every other post makes more sense.",
readTime: "9 min read",
}
const DEFAULT_PATHS: BlogPath[] = [
{
id: "starting",
name: "Just starting",
who: "You are setting up the basics",
posts: [
{ title: "Set up the basics in one afternoon", excerpt: "The short list of what to do first, and what can wait.", readTime: "5 min" },
{ title: "The three numbers to check every week", excerpt: "Ten minutes on a Friday tells you where you stand.", readTime: "6 min" },
{ title: "Avoid the first mistake almost everyone makes", excerpt: "Fix it now and you skip months of clean-up later.", readTime: "4 min" },
],
offer: { title: "Get the free starter checklist", detail: "Every step from this path on one page.", label: "Send Me the Checklist", secondaryLabel: "or start with the first read above" },
},
{
id: "growing",
name: "Growing",
who: "You have customers and want more",
posts: [
{ title: "Find the step where people drop off", excerpt: "One simple report shows where the leak is.", readTime: "7 min" },
{ title: "Raise prices without losing your best customers", excerpt: "How to say it, when to say it, and to whom.", readTime: "6 min" },
{ title: "Hand off the work you should not be doing", excerpt: "What to delegate first, and how to check it.", readTime: "8 min" },
],
offer: { title: "Join the free growth workshop", detail: "Walk through this path live, step by step.", label: "Save My Seat", secondaryLabel: "Free workshop · watch online" },
},
{
id: "scaling",
name: "Scaling",
who: "You are building a team",
posts: [
{ title: "Build a weekly report your team will read", excerpt: "Five numbers, one page, no spreadsheets to dig through.", readTime: "7 min" },
{ title: "Plan the next twelve months on one page", excerpt: "A planning format your whole team can follow.", readTime: "9 min" },
{ title: "Know when it is time to bring in help", excerpt: "The signs that you have outgrown doing it yourself.", readTime: "5 min" },
],
offer: { title: "Book a planning call", detail: "Thirty minutes to map your next twelve months.", label: "Book My Call", secondaryLabel: "or read the Scaling path first" },
},
]
export function BlogGrid2(props: BlogGrid2Props) {
const {
headline = "Not sure where to begin? Start with the path that fits you",
highlight = "the path that fits you",
lead = "Pick your stage, read three posts in order, then take the one next step that makes sense.",
spotlight = DEFAULT_SPOTLIGHT,
pathsHeading = "Read three posts. Then take your next step.",
pathsLead = "Every path starts simple and ends with the offer built for that stage.",
paths = DEFAULT_PATHS,
defaultPath,
onAction,
state = "default",
className,
} = props
const copy: BlogGrid2Copy = { ...DEFAULT_COPY, ...props.copy }
const reduce = useReducedMotion() ?? false
const uid = React.useId().replace(/:/g, "")
const panelId = `${uid}-panel`
const visible = React.useMemo(() => paths.filter((p) => p.posts && p.posts.length > 0), [paths])
const initial = defaultPath ?? (state === "active" ? visible[1]?.id ?? visible[0]?.id ?? "all" : "all")
const [selected, setSelected] = React.useState<string>(initial)
React.useEffect(() => {
setSelected(initial)
}, [initial])
const [compact, setCompact] = React.useState(false)
React.useEffect(() => {
if (typeof window === "undefined" || !window.matchMedia) return
const mq = window.matchMedia("(max-width: 1023px)")
const update = () => setCompact(mq.matches)
update()
mq.addEventListener("change", update)
return () => mq.removeEventListener("change", update)
}, [])
const current = visible.some((p) => p.id === selected) ? selected : "all"
const effective = current === "all" && (compact || visible.length === 1) ? visible[0]?.id ?? "all" : current
const shown = effective === "all" ? visible : visible.filter((p) => p.id === effective)
const tabs = [
...(compact ? [] : [{ id: "all", label: copy.allLabel, num: "" }]),
...visible.map((p, i) => ({ id: p.id, label: p.name, num: String(i + 1) })),
]
const tabRefs = React.useRef<(HTMLButtonElement | null)[]>([])
const panelRef = React.useRef<HTMLDivElement>(null)
const onKey = (e: React.KeyboardEvent<HTMLButtonElement>, i: number) => {
const len = tabs.length
let n = -1
if (e.key === "ArrowRight") n = (i + 1) % len
else if (e.key === "ArrowLeft") n = (i - 1 + len) % len
else if (e.key === "Home") n = 0
else if (e.key === "End") n = len - 1
if (n < 0) return
e.preventDefault()
setSelected(tabs[n].id)
tabRefs.current[n]?.focus()
}
const idx = visible.findIndex((p) => p.id === effective)
const nextPath = idx >= 0 && visible.length > 1 ? visible[(idx + 1) % visible.length] : undefined
const nextLabel = nextPath ? fill(idx === visible.length - 1 ? copy.restart : copy.next, { name: nextPath.name }) : ""
const goNext = () => {
if (!nextPath) return
setSelected(nextPath.id)
const el = panelRef.current
if (compact && el && el.getBoundingClientRect().top < 0) {
el.scrollIntoView({ block: "start", behavior: reduce ? "auto" : "smooth" })
}
}
const hasTabs = visible.length > 1
return (
<section className={["cf-blog-grid-2", className].filter(Boolean).join(" ")} aria-labelledby={`${uid}-h`}>
<style>{CSS}</style>
<div className="top">
<div className="wrap">
<header className="head">
<h2 id={`${uid}-h`} className="h2">{withMarker(headline, highlight)}</h2>
{lead ? <p className="lead">{lead}</p> : null}
</header>
{spotlight ? (
<Spotlight post={spotlight} copy={copy} onAction={onAction} />
) : null}
</div>
</div>
{visible.length > 0 ? (
<div className="band" style={FX_HOST}>
<Pattern name="grid" fade="corner" />
<div className="wrap">
<div className="band-head">
<div className="band-copy">
{pathsHeading ? <h3 className="bh">{pathsHeading}</h3> : null}
{pathsLead ? <p className="bl">{pathsLead}</p> : null}
</div>
{hasTabs ? (
<div className="seg" role="tablist" aria-label={copy.filterLabel}>
{tabs.map((t, i) => {
const on = t.id === effective
return (
<button
key={t.id}
ref={(el) => {
tabRefs.current[i] = el
}}
type="button"
role="tab"
id={`${uid}-t-${t.id}`}
aria-selected={on}
aria-controls={panelId}
tabIndex={on ? 0 : -1}
className={t.id === "all" ? "tab tab-all" : "tab"}
onClick={() => setSelected(t.id)}
onKeyDown={(e) => onKey(e, i)}
>
<span className="tl">
{t.num ? <span className="n">{t.num}</span> : null}
{t.label}
</span>
</button>
)
})}
</div>
) : null}
</div>
<div
ref={panelRef}
id={panelId}
className="panel"
role={hasTabs ? "tabpanel" : undefined}
aria-labelledby={hasTabs ? `${uid}-t-${effective}` : undefined}
>
<div
key={effective}
className={effective === "all" ? "cols is-all" : "cols is-one"}
style={{ ["--n" as string]: Math.max(shown.length, 1) } as React.CSSProperties}
>
{shown.map((p, i) => (
<PathColumn
key={p.id}
path={p}
number={visible.indexOf(p) + 1}
copy={copy}
onAction={onAction}
forceHover={state === "hover" && i === 0}
reduce={reduce}
delay={Math.min(i * 0.07, 0.28)}
/>
))}
</div>
{effective !== "all" && nextPath ? (
<div className="next-row">
<button type="button" className="btn2" onClick={goNext}>
{nextLabel}
</button>
</div>
) : null}
</div>
</div>
</div>
) : null}
</section>
)
}
export default BlogGrid2
function Spotlight({ post, copy, onAction }: { post: BlogSpotlight; copy: BlogGrid2Copy; onAction?: (t: BlogGrid2Action) => void }) {
const meta = [post.author, post.readTime].filter(Boolean).join(" · ")
const flag = post.flag ?? copy.spotlightFlag
return (
<article className={post.image ? "spot" : "spot no-img"}>
{post.image ? (
<div className="spot-media">
<img src={post.image} alt={post.imageAlt ?? ""} width={1200} height={825} loading="eager" />
</div>
) : null}
<div className="spot-body">
{flag ? (
<p className="flag">
<TrendingUp size={16} strokeWidth={2.5} aria-hidden="true" />
{flag}
</p>
) : null}
<h3 className="spot-title">
<TitleAct href={post.href} onClick={() => onAction?.({ type: "spotlight", post })}>
{post.title}
</TitleAct>
</h3>
{post.excerpt ? <p className="spot-exc">{post.excerpt}</p> : null}
<div className="spot-foot">
{meta ? (
<p className="spot-meta">
<Clock className="ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{meta}
</p>
) : null}
<span className="readmore" aria-hidden="true">{copy.readMore}</span>
</div>
</div>
</article>
)
}
function PathColumn({
path,
number,
copy,
onAction,
forceHover,
reduce,
delay,
}: {
path: BlogPath
number: number
copy: BlogGrid2Copy
onAction?: (t: BlogGrid2Action) => void
forceHover: boolean
reduce: boolean
delay: number
}) {
return (
<motion.div
className="col"
initial={reduce ? false : { opacity: 0.82, y: 8 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.45, ease: EASE, delay }}
>
<div className="col-head">
<h3 className="cname">
<span className="cnum">{number}</span>
{path.name}
</h3>
{path.who ? <p className="cwho">{path.who}</p> : null}
</div>
<ol className="posts">
{path.posts.map((post, i) => {
const thumb = post.image ? (
<div className="thumb">
<img src={post.image} alt={post.imageAlt ?? ""} loading="lazy" />
</div>
) : post.spot ? (
<div className="thumb is-spot" aria-hidden="true">
<Spot src={post.spot} size={64} />
</div>
) : null
return (
<li
key={`${post.title}-${i}`}
className={thumb ? "post" : "post no-thumb"}
data-force={forceHover && i === 0 ? "hover" : undefined}
>
{thumb}
<div className="pbody">
<p className="meta">
<span className="step">{fill(copy.readLabel, { n: String(i + 1) })}</span>
{post.readTime ? (
<>
<span className="dot" aria-hidden="true">·</span>
<span>{post.readTime}</span>
</>
) : null}
</p>
<h4 className="ptitle">
<TitleAct href={post.href} onClick={() => onAction?.({ type: "post", post, path })}>
{post.title}
</TitleAct>
</h4>
{post.excerpt ? <p className="pexc">{post.excerpt}</p> : null}
</div>
</li>
)
})}
</ol>
{path.offer ? <OfferBlock offer={path.offer} path={path} copy={copy} onAction={onAction} /> : null}
</motion.div>
)
}
function OfferBlock({
offer,
path,
copy,
onAction,
}: {
offer: BlogPathOffer
path: BlogPath
copy: BlogGrid2Copy
onAction?: (t: BlogGrid2Action) => void
}) {
const pr = offer.price ? splitPrice(offer.price) : null
const note = offer.priceNote ?? copy.priceNote
return (
<div className="offer">
<h4 className="otitle">{offer.title}</h4>
{offer.detail ? <p className="odetail">{offer.detail}</p> : null}
{offer.price ? (
<div className="pblock">
{pr ? (
<p className="price">
{pr.cur ? <span className="cur">{pr.cur}</span> : null}
<span>{pr.num}</span>
{pr.rest ? <span className="rest">{pr.rest}</span> : null}
</p>
) : (
<p className="price">{offer.price}</p>
)}
{note ? <p className="pnote">{note}</p> : null}
</div>
) : null}
<div className="ospace" aria-hidden="true" />
<OfferButton href={offer.href} disabled={offer.disabled} onClick={() => onAction?.({ type: "offer", offer, path })}>
{offer.label}
</OfferButton>
{offer.secondaryLabel ? (
<p className="quiet">
{offer.secondaryHref ? <a href={offer.secondaryHref}>{offer.secondaryLabel}</a> : offer.secondaryLabel}
</p>
) : null}
</div>
)
}
/** Stretched title link: the whole card is the hit area. Without an href it acts as a button for onAction. */
function TitleAct({ href, onClick, children }: { href?: string; onClick?: () => void; children: React.ReactNode }) {
if (href) {
return (
<a className="lnk" href={href} onClick={onClick ? () => onClick() : undefined}>
{children}
</a>
)
}
return (
<a
className="lnk"
role="button"
tabIndex={0}
onClick={onClick ? () => onClick() : undefined}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault()
onClick?.()
}
}}
>
{children}
</a>
)
}
/** The path's primary action, built on the --button-* role tokens. */
function OfferButton({
href,
onClick,
disabled,
children,
}: {
href?: string
onClick?: () => void
disabled?: boolean
children: React.ReactNode
}) {
if (href && !disabled) {
return (
<a className="btn" href={href} onClick={onClick ? () => onClick() : undefined}>
{children}
</a>
)
}
return (
<button type="button" className="btn" disabled={disabled} onClick={onClick ? () => onClick() : undefined}>
{children}
</button>
)
}
function fill(template: string, vars: Record<string, string>) {
return template.replace(/\{(\w+)\}/g, (m, k: string) => (k in vars ? vars[k] : m))
}
function splitPrice(price: string) {
const m = price.match(/^\s*([^\d\s]*)\s*(\d[\d.,]*)(.*)$/)
if (!m) return null
return { cur: m[1] ?? "", num: m[2], rest: (m[3] ?? "").trim() }
}
function withMarker(node: React.ReactNode, phrase?: string) {
if (typeof node !== "string" || !phrase) return node
const i = node.indexOf(phrase)
if (i < 0) return node
return (
<>
{node.slice(0, i)}
<span className="mk">{phrase}</span>
{node.slice(i + phrase.length)}
</>
)
}
const R = ".cf-blog-grid-2"
const SH = "var(--shadow, oklch(0.22 0.03 260))"
const MD = `var(--shadow-md, 0 1px 2px oklch(from ${SH} l c h / .22), 0 4px 10px -2px oklch(from ${SH} l c h / .2))`
const LG = `var(--shadow-lg, 0 2px 4px oklch(from ${SH} l c h / .22), 0 12px 24px -8px oklch(from ${SH} l c h / .32))`
const CSS = `
${R}{--g:clamp(16px,5vw,48px);position:relative;background:var(--surface);color:var(--ink);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;overflow-x:clip}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} .wrap{position:relative;z-index:1;max-width:calc(1120px + 2 * var(--g));margin:0 auto;padding:0 var(--g)}
${R} .top{padding:clamp(56px,8vw,112px) 0 clamp(48px,6vw,80px)}
${R} .head{margin:0 0 clamp(32px,4vw,48px)}
${R} .h2{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink)}
${R} .lead{margin:16px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
${R} .mk{--mk-c:color-mix(in oklch,var(--marker,#fae37c) 85%,transparent);background-image:linear-gradient(to bottom,transparent 56%,var(--mk-c) 56%,var(--mk-c) 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .06em;margin:0 -.06em}
${R} .lnk{color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;text-align:inherit;text-decoration:none;background:none;border:0;padding:0;margin:0;cursor:pointer}
${R} .lnk::after{content:"";position:absolute;inset:0;z-index:1;border-radius:var(--card-radius,var(--radius,14px))}
${R} .lnk:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px;border-radius:4px}
${R} .spot{position:relative;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:clamp(24px,3.5vw,48px);padding:clamp(16px,2vw,24px) clamp(20px,3vw,40px) clamp(16px,2vw,24px) clamp(16px,2vw,24px);background:var(--card);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent) 26%,var(--card));border-radius:var(--card-radius,var(--radius,14px));box-shadow:${LG};transition:transform .16s ease,box-shadow .16s ease}
${R} .spot.no-img{grid-template-columns:minmax(0,1fr);padding:clamp(20px,3vw,40px)}
${R} .spot:hover{transform:translateY(-2px)}
${R} .spot:active{transform:translateY(0)}
${R} .spot-media{border-radius:12px;overflow:hidden;aspect-ratio:16/11;background:color-mix(in oklch,var(--ink) 5%,var(--card))}
${R} .spot-media img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
${R} .spot:hover .spot-media img{transform:scale(1.03)}
${R} .spot-body{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:clamp(4px,1vw,16px) 0}
${R} .flag{display:inline-flex;align-items:center;gap:6px;min-height:30px;margin:0 0 16px;padding:4px 12px;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-size:.875rem;font-weight:800;line-height:1.2}
${R} .spot-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.625rem,2.7vw,2.375rem);line-height:1.1;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink)}
${R} .spot-exc{margin:14px 0 0;max-width:54ch;color:var(--muted);text-wrap:pretty}
${R} .spot-foot{margin-top:auto;padding-top:24px;display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px}
${R} .spot-meta{margin:0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
${R} .ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
${R} .readmore{font-weight:700;color:var(--link,var(--accent));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em}
${R} .spot:hover .readmore{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
${R} .band{position:relative;isolation:isolate;background:var(--band);color:var(--band-ink);padding:clamp(48px,6vw,80px) 0 clamp(64px,8.5vw,120px)}
${R} .band-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:20px 32px}
${R} .band-copy{min-width:0;flex:1 1 320px}
${R} .bh{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:balance;color:var(--band-ink)}
${R} .bl{margin:8px 0 0;max-width:56ch;color:var(--band-ink);text-wrap:pretty}
${R} .seg{display:inline-flex;gap:4px;padding:4px;border-radius:calc(var(--radius,12px) + 4px);background:oklch(from var(--band-ink) l c h / .12)}
${R} .tab{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 18px;border:0;border-radius:var(--radius,12px);background:transparent;color:var(--band-ink);font-family:var(--font-body);font-size:.9375rem;font-weight:800;line-height:1.15;white-space:nowrap;cursor:pointer;transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
${R} .tab:hover:not([aria-selected="true"]){background:oklch(from var(--band-ink) l c h / .1)}
${R} .tab:active{transform:scale(.98)}
${R} .tab:focus-visible{outline:3px solid var(--band-ink);outline-offset:2px}
${R} .tab[aria-selected="true"]{background:var(--card);color:var(--ink);box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .1),var(--shadow-sm,0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .25))}
${R} .tab[aria-selected="true"]:focus-visible{outline-color:var(--band-ink)}
${R} .tl{position:relative;z-index:1;display:inline-flex;align-items:baseline;gap:8px}
${R} .n{font-variant-numeric:tabular-nums}
${R} .tab[aria-selected="true"] .n{color:var(--accent)}
${R} .panel{margin-top:clamp(28px,3.5vw,40px);scroll-margin-top:16px}
${R} .cols{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:clamp(16px,2vw,24px);align-items:stretch}
${R} .cols.is-all{row-gap:16px}
@supports (grid-template-rows:subgrid){
${R} .is-all .col{display:grid;grid-template-rows:subgrid;grid-row:span 3;gap:16px}
${R} .is-all .offer{margin-top:8px}
}
${R} .col{display:flex;flex-direction:column;gap:16px;min-width:0}
${R} .col-head{padding:0 4px}
${R} .cname{margin:0;display:flex;align-items:baseline;gap:10px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-transform:var(--display-case,none);color:var(--band-ink)}
${R} .cnum{font-variant-numeric:tabular-nums;color:var(--band-ink);font-weight:500}
${R} .cwho{margin:6px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--band-ink);text-wrap:pretty}
${R} .posts{list-style:none;margin:0;padding:0;display:grid;gap:12px}
${R} .post{position:relative;display:grid;grid-template-columns:72px minmax(0,1fr);gap:16px;align-items:start;padding:16px;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,${MD});transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
${R} .post.no-thumb{grid-template-columns:minmax(0,1fr)}
${R} .post:hover,${R} .post[data-force="hover"]{transform:translateY(-2px);box-shadow:${LG};border-color:color-mix(in oklch,var(--accent) 40%,var(--card))}
${R} .post:active{transform:translateY(0);box-shadow:var(--card-shadow,${MD})}
${R} .thumb{width:72px;height:72px;border-radius:8px;overflow:hidden;display:grid;place-items:center;background:color-mix(in oklch,var(--ink) 5%,var(--card))}
${R} .thumb img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
${R} .post:hover .thumb img,${R} .post[data-force="hover"] .thumb img{transform:scale(1.04)}
${R} .pbody{min-width:0}
${R} .meta{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:.875rem;line-height:1.2;font-weight:600;color:var(--muted)}
${R} .step{font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--accent)}
${R} .ptitle{margin:8px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.28;letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:pretty;color:var(--ink);transition:color .16s ease}
${R} .post:hover .ptitle,${R} .post[data-force="hover"] .ptitle{color:var(--link,var(--accent))}
${R} .pexc{display:none;margin:8px 0 0;font-size:.9375rem;line-height:1.45;color:var(--muted);text-wrap:pretty}
${R} .offer{margin-top:auto;display:flex;flex-direction:column;padding:clamp(20px,2.4vw,28px);border-radius:var(--card-radius,var(--radius,14px));background:oklch(from var(--band-ink) l c h / .08);color:var(--band-ink)}
${R} .otitle{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:balance;color:var(--band-ink)}
${R} .odetail{margin:8px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--band-ink);text-wrap:pretty}
${R} .pblock{margin-top:16px}
${R} .price{margin:0;display:flex;align-items:flex-start;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--band-ink)}
${R} .cur{font-size:.45em;line-height:1;margin:.12em .04em 0 0}
${R} .rest{align-self:flex-end;font-size:.36em;line-height:1;margin:0 0 .12em .12em;letter-spacing:0}
${R} .pnote{margin:20px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--band-ink)}
${R} .ospace{flex:1 0 24px}
${R} .btn{display:flex;width:100%;align-items:center;justify-content:center;min-height:64px;margin-top:0;padding:12px 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) calc(l + 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from ${SH} l c h / .3),0 8px 16px -6px oklch(from ${SH} l c h / .45));cursor:pointer;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
${R} .btn:hover{background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.07) c h))}
${R} .btn:active{transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .35),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h)}
${R} .btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
${R} .btn:disabled{background:var(--secondary);color:var(--secondary-ink);box-shadow:none;text-shadow:none;cursor:not-allowed;transform:none}
${R} .quiet{margin:12px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--band-ink);text-wrap:pretty}
${R} .quiet a{color:inherit;text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / .5);text-underline-offset:.18em}
${R} .quiet a:hover{text-decoration-color:currentColor}
${R} .quiet a:focus-visible{outline:3px solid var(--band-ink);outline-offset:2px;border-radius:4px}
${R} .next-row{display:flex;justify-content:center;margin-top:24px}
${R} .btn2{display:inline-flex;align-items:center;justify-content:center;min-height:56px;max-width:100%;padding:0 28px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(var(--button-2-bg,var(--secondary)),var(--button-2-bg,var(--secondary))),var(--card);color:var(--button-2-ink,var(--secondary-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.15;text-align:center;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:pointer;transition:background .16s ease,transform .16s ease}
${R} .btn2:hover{background:linear-gradient(oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h),oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)),var(--card)}
${R} .btn2:active{transform:translateY(1px)}
${R} .btn2:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
@supports selector(:has(*)){
${R} .post .lnk:focus-visible,${R} .spot .lnk:focus-visible{outline:none}
${R} .spot:has(.lnk:focus-visible){outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px}
${R} .post:has(.lnk:focus-visible){outline:3px solid var(--band-ink);outline-offset:3px}
}
@media (min-width:1024px){
${R} .is-one .col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,1.1fr);column-gap:20px;row-gap:16px}
${R} .is-one .col-head{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 20px}
${R} .is-one .cwho{margin:0}
${R} .is-one .posts{grid-column:1/span 3;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
${R} .is-one .post{grid-template-columns:minmax(0,1fr);align-content:start;padding:12px 12px 20px}
${R} .is-one .thumb{width:100%;height:auto;aspect-ratio:16/10}
${R} .is-one .pbody{padding:4px 8px 0}
${R} .is-one .pexc{display:block}
${R} .is-one .offer{grid-column:4;margin-top:0}
}
@media (max-width:1023px){
${R} .cols{grid-template-columns:minmax(0,1fr)}
${R} .band-head{align-items:stretch}
${R} .seg{display:flex;width:100%}
${R} .tab{flex:1 1 0;min-width:0;min-height:52px;padding:6px 8px;font-size:.875rem;white-space:normal;text-align:center}
${R} .tab-all,${R} .tab .n{display:none}
${R} .pexc{display:block}
}
@media (max-width:860px){
${R} .spot{grid-template-columns:minmax(0,1fr);padding:clamp(12px,3vw,20px) clamp(12px,3vw,20px) clamp(20px,5vw,28px)}
${R} .spot-body{padding:0 clamp(4px,1.5vw,8px)}
${R} .btn2{width:100%}
}
@media (prefers-reduced-motion:reduce){
${R} .spot,${R} .post,${R} .spot-media img,${R} .thumb img,${R} .btn,${R} .btn2,${R} .tab,${R} .ptitle{transition:none}
${R} .spot:hover,${R} .post:hover,${R} .post[data-force="hover"],${R} .spot:hover .spot-media img,${R} .post:hover .thumb img,${R} .post[data-force="hover"] .thumb img,${R} .tab:active,${R} .btn:active,${R} .btn2:active{transform:none}
}
`
pieces/content/blog-grid-2/specimen.tsx 97 lines
import __studioImage9a4b8da9 from "../assets/6370c5024d5fd3b8.webp";
import * as React from "react"
import { BlogGrid2, type BlogPath } from "../blog-grid-2"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import savings from "../../fx/spots/savings"
import checklist from "../../fx/spots/checklist"
import calendar from "../../fx/spots/calendar"
import chart from "../../fx/spots/chart"
import clock from "../../fx/spots/clock"
import shield from "../../fx/spots/shield"
import rocket from "../../fx/spots/rocket"
import community from "../../fx/spots/community"
import lock from "../../fx/spots/lock"
export const states = ["default", "hover", "active"]
type SpecimenState = "default" | "hover" | "active"
const PATHS: BlogPath[] = [
{
id: "starting",
name: "Just starting",
who: "Under 10 clients, books in a spreadsheet",
posts: [
{ title: "Separate your agency's money in one afternoon", excerpt: "One business account, one card, one rule. Your future tax bill will thank you.", readTime: "5 min", spot: savings },
{ title: "The only 12 categories your chart of accounts needs", excerpt: "Stop sorting into 60 buckets. These twelve tell you everything that matters.", readTime: "6 min", spot: checklist },
{ title: "Invoice retainers so clients pay on day one", excerpt: "The send date, the wording and the payment terms that cut late payments.", readTime: "4 min", spot: calendar },
],
offer: {
title: "Get the Agency Books Starter Sheet",
detail: "The spreadsheet we set up for every new agency, ready to copy.",
label: "Send Me the Sheet",
secondaryLabel: "or start with the first read above",
},
},
{
id: "growing",
name: "Growing",
who: "10 to 30 clients and a part-time bookkeeper",
posts: [
{ title: "Read your P&L by client, not by month", excerpt: "See which retainers carry the agency and which quietly cost you money.", readTime: "7 min", spot: chart },
{ title: "Pay contractors without wrecking cash flow", excerpt: "A simple pay calendar that lines up with when your clients actually pay.", readTime: "6 min", spot: clock },
{ title: "Set prices that survive scope creep", excerpt: "Build the extra hours into the number before the client asks for them.", readTime: "8 min", spot: shield },
],
offer: {
title: "Get the Agency Cash Flow Kit",
detail: "Forecast template, contractor pay calendar and pricing worksheet.",
price: defaults.sample.price,
priceNote: "one-time payment",
label: "Get the Cash Flow Kit",
secondaryLabel: "or keep reading the Growing path",
},
},
{
id: "scaling",
name: "Scaling",
who: "30+ clients, ready to hand off the books",
posts: [
{ title: "When to bring in a fractional CFO", excerpt: "Three signs your agency has outgrown a bookkeeper alone.", readTime: "9 min", spot: rocket },
{ title: "Run payroll for a team of 40 without surprises", excerpt: "The monthly checklist that keeps payroll, benefits and taxes in step.", readTime: "7 min", spot: community },
{ title: "Get audit-ready before you sell or raise", excerpt: "The documents buyers ask for first, and how to have them waiting.", readTime: "8 min", spot: lock },
],
offer: {
title: "Book a Ledger Lane Books Review",
detail: "A 30-minute call to see if done-for-you bookkeeping fits your agency.",
label: "Book My Books Review",
secondaryLabel: "or read the Scaling path first",
},
},
]
export default function BlogGrid2Specimen({ state = "default" }: { state?: SpecimenState }) {
return (
<BlogGrid2
state={state}
headline="New to Ledger Lane? Start with the path that fits your agency"
highlight="fits your agency"
lead="Pick your stage, read three posts in order, and finish with the one next step that makes sense for an agency your size."
spotlight={{
flag: "Most read this month",
title: "Close your agency's books in one afternoon a month",
excerpt: "The exact order we reconcile client retainers, contractor bills and software spend, so your P&L is ready before the 5th.",
image: slot(
"scene",
__studioImage9a4b8da9
),
imageAlt: "Agency owner reviewing a month-end report on a laptop at a bright desk",
author: "Priya Nair",
readTime: "11 min read",
}}
pathsHeading="Read three posts. Then take your next step."
pathsLead="Every path starts simple and ends with the offer built for that stage of your agency."
paths={PATHS}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalBlogGrid2 |
React.ReactNode |
|
highlight OptionalBlogGrid2 |
string |
|
lead OptionalBlogGrid2 |
React.ReactNode |
|
spotlight OptionalBlogGrid2 |
BlogSpotlight | null |
|
pathsHeading OptionalBlogGrid2 |
React.ReactNode |
|
pathsLead OptionalBlogGrid2 |
React.ReactNode |
|
paths OptionalBlogGrid2 |
BlogPath[] |
|
defaultPath OptionalBlogGrid2 |
string |
|
copy OptionalBlogGrid2 |
Partial<BlogGrid2Copy> |
|
onAction OptionalBlogGrid2 |
(target: BlogGrid2Action) => void |
|
state OptionalBlogGrid2 |
"default" | "hover" | "active" |
|
className OptionalBlogGrid2 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
369bb6f216bb84ab.webp
image/webp · 22.6 KB
-
4788bc008c79471c.webp
image/webp · 13.9 KB
-
5602e47ebdb81810.webp
image/webp · 35.6 KB
-
6370c5024d5fd3b8.webp
image/webp · 93.7 KB
-
7c36d7f4dd4ae594.webp
image/webp · 26.5 KB
-
7d6f1c81c93d8f71.webp
image/webp · 18.2 KB
-
87170e25e6a4d825.webp
image/webp · 18.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d0943b629c0b1324.webp
image/webp · 8.87 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d7814fce240ddf0e.webp
image/webp · 17.6 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB