FAQ Block 1
FAQ block: answers the last objections in a calm accordion on an angled colour split. The order summary and button sit beside the answers, so the buyer is one tap from the order button.
Use it in a prompt
Use content/faq-block 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/faq-block.tsx. - Import it and pass your copy and images (Props tab):
import { FaqBlock } from "@/components/funneldna/content/faq-block"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/faq-block/component.tsx 414 lines
// layout: diagonal-split
// FAQ block: answers the last objections in a calm accordion on an angled colour split. The order summary and button sit beside the answers, so the buyer is one tap from the order button.
import * as React from "react";
import { ChevronDown, Mail, ShieldCheck } from "lucide-react";
export type FaqBlockQuestion = {
question: string;
/** Plain text becomes one paragraph; rich nodes are spaced automatically. */
answer: React.ReactNode;
};
export type FaqBlockReceiptItem = {
name: string;
value: string;
/** Thumbnail src (slots item-1 … item-n). */
image?: string;
imageAlt?: string;
};
export type FaqBlockReceipt = {
items: FaqBlockReceiptItem[];
subtotalLabel: string;
subtotal: string;
/** Optional discount line, e.g. "Starter Kit discount" / "−$50". */
discountLabel?: string;
discount?: string;
totalLabel: string;
total: string;
};
export type FaqBlockContact = {
/** Bold lead-in, e.g. "Still have a question?" */
prompt: string;
/** Text before the link. */
before: string;
linkLabel: string;
href: string;
/** Text after the link (include its leading space). */
after?: string;
};
export type FaqBlockProps = {
/** Section headline on the band. */
headline?: React.ReactNode;
/** Supporting line under the headline. */
lead?: React.ReactNode;
faqs?: FaqBlockQuestion[];
/** Only one answer open at a time. */
single?: boolean;
/** Indexes open on first render (only the first is used when single). */
defaultOpen?: number[];
/** Heading of the order card beside the answers. */
closeHeading?: React.ReactNode;
/** Short reasons, numbered inline in order. */
reasons?: React.ReactNode[];
/** Order summary lines, sums and total. */
receipt?: FaqBlockReceipt;
actionLabel?: string;
/** Line under the button; parts split on " · ", the first gets the shield icon. */
reassurance?: string;
/** Navigation destination; omit it to render a button that calls onAction. */
href?: string;
/** Handles the action click (also called when href is set). */
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
/** Pass null to hide the contact line. */
contact?: FaqBlockContact | null;
/** Accessible labels for the question list and the order summary. */
copy?: { listLabel?: string; receiptLabel?: string };
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function FaqBlock(props: FaqBlockProps) {
const {
headline = DEFAULT_HEADLINE,
lead = DEFAULT_LEAD,
faqs = DEFAULT_FAQS,
single = true,
defaultOpen = [0],
closeHeading = DEFAULT_CLOSE_HEADING,
reasons = DEFAULT_REASONS,
receipt = DEFAULT_RECEIPT,
actionLabel = "Yes! I want the Funnel Starter Kit",
reassurance = "Instant download · 30-day money-back guarantee",
href,
onAction,
contact = DEFAULT_CONTACT,
copy,
state = "default",
className,
} = props;
const listLabel = copy?.listLabel ?? "Frequently asked questions";
const receiptLabel = copy?.receiptLabel ?? "Your order";
const uid = React.useId();
const [open, setOpen] = React.useState<number[]>(() => (single ? defaultOpen.slice(0, 1) : defaultOpen));
const buttons = React.useRef<Array<HTMLButtonElement | null>>([]);
const disabled = state === "disabled";
const headId = `${uid}-h`;
const toggle = (index: number) =>
setOpen((prev) => (prev.includes(index) ? prev.filter((i) => i !== index) : single ? [index] : [...prev, index]));
const onKey = (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {
const last = faqs.length - 1;
let target = -1;
if (event.key === "ArrowDown") target = index === last ? 0 : index + 1;
else if (event.key === "ArrowUp") target = index === 0 ? last : index - 1;
else if (event.key === "Home") target = 0;
else if (event.key === "End") target = last;
else return;
event.preventDefault();
buttons.current[target]?.focus();
};
const action =
href && !disabled ? (
<a className="cf-faq-block-cta" href={href} onClick={onAction}>
{actionLabel}
</a>
) : (
<button type="button" className="cf-faq-block-cta" disabled={disabled} onClick={onAction}>
{actionLabel}
</button>
);
return (
<section className={["cf-faq-block", className].filter(Boolean).join(" ")} data-state={state} aria-labelledby={headId}>
<style>{CSS}</style>
<div className="cf-faq-block-wrap">
<div className="cf-faq-block-grid">
<header className="cf-faq-block-intro">
<h2 id={headId} className="cf-faq-block-h">
{headline}
</h2>
{lead ? <p className="cf-faq-block-lead">{lead}</p> : null}
</header>
<ul className="cf-faq-block-list" aria-label={listLabel}>
{faqs.map((item, index) => {
const isOpen = open.includes(index);
const btnId = `${uid}-q${index}`;
const panelId = `${uid}-a${index}`;
return (
<li
key={index}
className={`cf-faq-block-item${isOpen ? " is-open" : ""}`}
style={{ "--i": index } as React.CSSProperties}
>
<h3 className="cf-faq-block-q">
<button
ref={(el) => {
buttons.current[index] = el;
}}
id={btnId}
type="button"
className="cf-faq-block-btn"
aria-expanded={isOpen}
aria-controls={panelId}
onClick={() => toggle(index)}
onKeyDown={(event) => onKey(event, index)}
>
<span className="cf-faq-block-q-text">{item.question}</span>
<span className="cf-faq-block-disc" aria-hidden="true">
<ChevronDown size={20} strokeWidth={2.5} />
</span>
</button>
</h3>
<div id={panelId} role="region" aria-labelledby={btnId} className="cf-faq-block-a">
<div className="cf-faq-block-a-in">
<div className="cf-faq-block-a-body">
{typeof item.answer === "string" ? <p>{item.answer}</p> : item.answer}
</div>
</div>
</div>
</li>
);
})}
</ul>
<div className="cf-faq-block-close">
<h3 className="cf-faq-block-close-h">{closeHeading}</h3>
{reasons.length ? (
<ol className="cf-faq-block-reasons">
{reasons.map((reason, index) => (
<li key={index} className="cf-faq-block-reason">
<span className="cf-faq-block-n" aria-hidden="true">
{index + 1}
</span>
<span>{reason}</span>
</li>
))}
</ol>
) : null}
<div className="cf-faq-block-receipt" role="group" aria-label={receiptLabel}>
<ul className="cf-faq-block-rows">
{receipt.items.map((item, index) => (
<li key={index} className={`cf-faq-block-row${item.image ? " has-img" : ""}`}>
{item.image ? (
<img src={item.image} alt={item.imageAlt ?? ""} width={40} height={40} loading="lazy" decoding="async" />
) : null}
<span className="cf-faq-block-row-name">{item.name}</span>
<span className="cf-faq-block-row-val">{item.value}</span>
</li>
))}
</ul>
<div className="cf-faq-block-sums">
<div className="cf-faq-block-sum">
<span>{receipt.subtotalLabel}</span>
<span className="cf-faq-block-num">{receipt.subtotal}</span>
</div>
{receipt.discount ? (
<div className="cf-faq-block-sum is-discount">
<span>{receipt.discountLabel}</span>
<span className="cf-faq-block-num">{receipt.discount}</span>
</div>
) : null}
</div>
<div className="cf-faq-block-total">
<span className="cf-faq-block-total-label">{receipt.totalLabel}</span>
<span className="cf-faq-block-total-val">{receipt.total}</span>
</div>
</div>
<div className="cf-faq-block-action">{action}</div>
{reassurance ? (
<p className="cf-faq-block-reassure">
{reassurance.split(" · ").map((part, index) => (
<React.Fragment key={index}>
{index > 0 ? " · " : null}
<span className="cf-faq-block-keep">
{index === 0 ? (
<ShieldCheck className="cf-faq-block-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
) : null}
{part}
</span>
</React.Fragment>
))}
</p>
) : null}
</div>
{contact ? (
<p className="cf-faq-block-contact">
<Mail className="cf-faq-block-inline-icon" size={18} strokeWidth={2.5} aria-hidden="true" />
<strong>{contact.prompt}</strong> {contact.before} <a href={contact.href}>{contact.linkLabel}</a>
{contact.after}
</p>
) : null}
</div>
</div>
</section>
);
}
export default FaqBlock;
const DEFAULT_HEADLINE = "Get your answers, then build your first funnel";
const DEFAULT_LEAD =
"Straight answers on what's inside the Funnel Starter Kit, what it costs and how the 30-day guarantee works.";
const DEFAULT_FAQS: FaqBlockQuestion[] = [
{
question: "What exactly is inside the Funnel Starter Kit?",
answer:
"Three tools in one download. The Funnel Planning Guide maps your offer and the pages your funnel needs. The Page Copy Workbook helps you draft your headline, offer and call to action. The Launch Checklist walks you through your links, forms and next steps before launch.",
},
{ question: "Is this a subscription?", answer: "No. You pay $47 once and keep lifetime access. Nothing renews." },
{
question: "How soon can I start?",
answer: "Right away. It's an instant digital download, so you can open the guide as soon as checkout is done.",
},
{
question: "I've never built a funnel. Is this for me?",
answer: "Yes. The kit is made for your first funnel: plan it, write the page copy, then check every step before you launch.",
},
{
question: "Do I need my offer figured out first?",
answer: "No. The Funnel Planning Guide starts with your offer and helps you map it before you plan a single page.",
},
{
question: "Can I use it for more than one funnel?",
answer: "Yes. The kit is yours to keep, so you can run every new funnel through the same workbook and checklist.",
},
{
question: "What if it isn't right for me?",
answer:
"You're covered by a 30-day money-back guarantee. If the kit isn't for you, ask for a refund within 30 days and you get your $47 back.",
},
];
const DEFAULT_CLOSE_HEADING = "Three reasons the kit is $47 today";
const DEFAULT_REASONS: React.ReactNode[] = [
"One payment, then it's yours for life.",
"The guide, workbook and checklist download instantly.",
"You get 30 days to ask for your money back.",
];
const DEFAULT_RECEIPT: FaqBlockReceipt = {
items: [
{ name: "Funnel Planning Guide", value: "$49" },
{ name: "Page Copy Workbook", value: "$29" },
{ name: "Launch Checklist", value: "$19" },
],
subtotalLabel: "Subtotal",
subtotal: "$97",
discountLabel: "Starter Kit discount",
discount: "−$50",
totalLabel: "Total today",
total: "$47",
};
const DEFAULT_CONTACT: FaqBlockContact = {
prompt: "Still have a question?",
before: "Email",
linkLabel: "support@example.com",
href: "mailto:support@example.com",
after: " and we'll help you decide.",
};
const CSS = `
.cf-faq-block{--faq-pt:clamp(56px,8vw,112px);--faq-pb:clamp(64px,8.5vw,120px);--faq-gutter:clamp(16px,5vw,48px);--faq-gap:clamp(32px,5vw,72px);--faq-pad:clamp(20px,3vw,32px);--faq-w:min(1120px,100vw - 2 * var(--faq-gutter));--faq-shade:var(--shadow,oklch(0.22 0.03 260));position:relative;overflow:hidden;overflow:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:var(--faq-pt) 0 var(--faq-pb)}
.cf-faq-block *,.cf-faq-block *::before,.cf-faq-block *::after{box-sizing:border-box}
.cf-faq-block-wrap{max-width:calc(1120px + 2 * var(--faq-gutter));margin:0 auto;padding:0 var(--faq-gutter)}
.cf-faq-block-grid{position:relative;display:grid;grid-template-columns:minmax(0,1fr);row-gap:32px;max-width:46rem;margin:0 auto}
.cf-faq-block-intro,.cf-faq-block-list,.cf-faq-block-close,.cf-faq-block-contact{position:relative;z-index:1;grid-column:1}
.cf-faq-block-intro{grid-row:1;margin:calc(var(--faq-pt) * -1) calc(50% - 50vw) 0;padding:var(--faq-pt) calc(50vw - 50%) 64px;background:var(--band);color:var(--band-ink);clip-path:polygon(0 0,100% 0,100% calc(100% - 48px),0 100%)}
.cf-faq-block-list{grid-row:2}
.cf-faq-block-close{grid-row:3}
.cf-faq-block-contact{grid-row:4}
.cf-faq-block-h{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--band-ink)}
.cf-faq-block-lead{margin:16px 0 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:color-mix(in oklab,var(--band-ink) 86%,var(--band))}
.cf-faq-block-list{margin:0;padding:0;list-style:none;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--faq-shade) l c h / 0.22),0 4px 10px -2px oklch(from var(--faq-shade) l c h / 0.2)));overflow:hidden}
.cf-faq-block-item{transition:background .16s ease;animation:cf-faq-block-in .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
.cf-faq-block-item + .cf-faq-block-item{border-top:1px solid oklch(from var(--ink) l c h / 0.12)}
.cf-faq-block-item.is-open{background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-faq-block-q{margin:0;font:inherit}
.cf-faq-block-btn{--faq-disc-bg:var(--button-2-bg,color-mix(in oklch,var(--ink) 7%,var(--card)));--faq-disc-ink:var(--button-2-ink,var(--ink));display:flex;align-items:flex-start;gap:16px;width:100%;min-height:72px;margin:0;padding:16px var(--faq-pad);border:0;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:background .16s ease}
.cf-faq-block-btn:hover{background:color-mix(in oklch,var(--ink) 5%,var(--card))}
.cf-faq-block-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:-3px}
.cf-faq-block-q-text{flex:1 1 auto;min-width:0;padding-top:calc((40px - 1.3em) / 2);font-family:var(--font-display);font-weight:700;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.3;letter-spacing:-0.01em;text-wrap:pretty}
.cf-faq-block-disc{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--faq-disc-bg);color:var(--faq-disc-ink);transition:background .16s ease,color .16s ease}
.cf-faq-block-disc svg{display:block;transition:transform .25s cubic-bezier(.2,.7,.2,1)}
.cf-faq-block-btn:hover .cf-faq-block-disc{background:color-mix(in oklch,var(--ink) 5%,var(--faq-disc-bg))}
.cf-faq-block-item.is-open .cf-faq-block-disc{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-faq-block-item.is-open .cf-faq-block-disc svg{transform:rotate(180deg)}
.cf-faq-block-a{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows .3s cubic-bezier(.2,.7,.2,1),visibility 0s linear .3s}
.cf-faq-block-item.is-open .cf-faq-block-a{grid-template-rows:1fr;visibility:visible;transition:grid-template-rows .3s cubic-bezier(.2,.7,.2,1),visibility 0s linear 0s}
.cf-faq-block-a-in{min-height:0;overflow:hidden}
.cf-faq-block-a-body{padding:0 var(--faq-pad) 24px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:color-mix(in oklch,var(--ink) 86%,var(--card));text-wrap:pretty}
.cf-faq-block-a-body > *{margin:0;max-width:64ch}
.cf-faq-block-a-body > * + *{margin-top:12px}
.cf-faq-block-close{background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--faq-shade) l c h / 0.22),0 12px 24px -8px oklch(from var(--faq-shade) l c h / 0.32)));padding:clamp(20px,3vw,32px)}
.cf-faq-block-close-h{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance}
.cf-faq-block-reasons{display:grid;gap:8px;margin:16px 0 0;padding:0;list-style:none;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;color:color-mix(in oklch,var(--ink) 86%,var(--card))}
.cf-faq-block-reason{display:grid;grid-template-columns:1.25em minmax(0,1fr);column-gap:8px;align-items:baseline;text-wrap:pretty}
.cf-faq-block-n{font-family:var(--font-display);font-weight:800;font-size:1.125em;line-height:1;color:var(--accent);font-variant-numeric:tabular-nums}
.cf-faq-block-receipt{margin-top:24px;padding:16px;border-radius:max(0px,calc(var(--card-radius,var(--radius,14px)) - 4px));background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-faq-block-rows{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.cf-faq-block-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:start;font-size:.9375rem;line-height:1.4}
.cf-faq-block-row.has-img{grid-template-columns:40px minmax(0,1fr) auto}
.cf-faq-block-row img{display:block;width:40px;height:40px;border-radius:8px;object-fit:cover;object-position:center}
.cf-faq-block-row.has-img .cf-faq-block-row-name,.cf-faq-block-row.has-img .cf-faq-block-row-val{padding-top:9px}
.cf-faq-block-row-name{font-weight:600;color:var(--ink);text-wrap:pretty}
.cf-faq-block-row-val,.cf-faq-block-num{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-faq-block-sums{display:grid;gap:8px;margin-top:16px}
.cf-faq-block-sum{display:flex;justify-content:space-between;gap:12px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
.cf-faq-block-sum.is-discount{color:var(--success)}
.cf-faq-block-total{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;margin-top:16px}
.cf-faq-block-total-label{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;color:var(--ink)}
.cf-faq-block-total-val{font-family:var(--font-display);font-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(--ink)}
.cf-faq-block-action{margin-top:24px}
.cf-faq-block-cta{--faq-cta:var(--button-bg,var(--cta));--faq-cta-2:var(--button-bg-2,var(--cta-2));display:flex;align-items:center;justify-content:center;width:100%;min-height:72px;margin:0;padding:14px 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));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;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--faq-cta) calc(l + 0.04) c h),oklch(from var(--faq-cta-2) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--faq-cta) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--faq-cta) calc(l - 0.16) c h),0 1px 2px oklch(from var(--faq-shade) l c h / 0.3),0 8px 16px -6px oklch(from var(--faq-shade) l c h / 0.45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-faq-block-cta:hover:not(:disabled),.cf-faq-block[data-state=hover] .cf-faq-block-cta:not(:disabled){background:linear-gradient(oklch(from var(--faq-cta) calc(l - 0.01) c h),oklch(from var(--faq-cta-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--faq-cta) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--faq-cta) calc(l - 0.2) c h),0 1px 2px oklch(from var(--faq-shade) l c h / 0.34),0 10px 18px -6px oklch(from var(--faq-shade) l c h / 0.55)}
.cf-faq-block-cta:active:not(:disabled),.cf-faq-block[data-state=active] .cf-faq-block-cta:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--faq-cta) calc(l - 0.05) c h),oklch(from var(--faq-cta-2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--faq-cta) calc(l - 0.24) c h / 0.5),inset 0 -2px 0 oklch(from var(--faq-cta) calc(l - 0.18) c h),0 1px 2px oklch(from var(--faq-shade) l c h / 0.3)}
.cf-faq-block-cta:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.6);outline-offset:3px}
.cf-faq-block-cta:disabled{cursor:not-allowed;background:var(--secondary,color-mix(in oklch,var(--ink) 10%,var(--card)));color:var(--secondary-ink,var(--ink));text-shadow:none;box-shadow:none;transform:none}
.cf-faq-block-reassure{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;text-align:center;color:var(--muted);text-wrap:pretty}
.cf-faq-block-reassure .cf-faq-block-inline-icon{color:var(--success)}
.cf-faq-block-keep{white-space:nowrap}
.cf-faq-block-inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-faq-block-contact{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-align:center;color:var(--ink);text-wrap:pretty;overflow-wrap:anywhere}
.cf-faq-block-contact strong{font-weight:800}
.cf-faq-block-contact .cf-faq-block-inline-icon{color:var(--accent)}
.cf-faq-block-contact a{font-weight:700;color:var(--link,var(--accent));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / 0.45);text-underline-offset:.18em;transition:color .16s ease}
.cf-faq-block-contact a:hover{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-faq-block-contact a:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px;border-radius:4px}
@media (min-width:640px){
.cf-faq-block-a-body{padding-right:calc(var(--faq-pad) + 56px)}
}
@media (min-width:960px){
.cf-faq-block-grid{max-width:none;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);grid-template-rows:auto auto 1fr;column-gap:var(--faq-gap);row-gap:40px;margin:calc(var(--faq-pt) * -1) calc(50% - 50vw) calc(var(--faq-pb) * -1);padding:var(--faq-pt) calc(50vw - 50%) var(--faq-pb);background:var(--band);color:var(--band-ink)}
.cf-faq-block-grid::before{content:"";position:absolute;z-index:0;top:0;bottom:0;right:0;left:calc(50% - var(--faq-w) / 2 + (var(--faq-w) - var(--faq-gap)) * .46 + 8px);background:var(--surface);clip-path:polygon(calc(var(--faq-gap) + var(--faq-w) * .18 - 8px) 0,100% 0,100% 100%,0 100%);pointer-events:none}
.cf-faq-block-intro{margin:0;padding:0;background:none;clip-path:none}
.cf-faq-block-list{grid-column:2;grid-row:1 / 4;align-self:start;position:sticky;top:24px}
.cf-faq-block-close{grid-row:2;align-self:start}
.cf-faq-block-contact{grid-row:3;align-self:start;text-align:left;color:var(--band-ink)}
.cf-faq-block-contact .cf-faq-block-inline-icon{color:var(--band-ink)}
.cf-faq-block-contact a{color:var(--band-ink);text-decoration-color:oklch(from var(--band-ink) l c h / 0.5)}
.cf-faq-block-contact a:hover{color:var(--band-ink);text-decoration-color:var(--band-ink)}
.cf-faq-block-contact a:focus-visible{outline-color:var(--band-ink)}
}
@keyframes cf-faq-block-in{from{opacity:.82;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){
.cf-faq-block .cf-faq-block-item{animation:none}
.cf-faq-block .cf-faq-block-item,.cf-faq-block .cf-faq-block-a,.cf-faq-block .cf-faq-block-item.is-open .cf-faq-block-a,.cf-faq-block .cf-faq-block-btn,.cf-faq-block .cf-faq-block-disc,.cf-faq-block .cf-faq-block-disc svg,.cf-faq-block .cf-faq-block-cta,.cf-faq-block .cf-faq-block-contact a{transition:none}
.cf-faq-block .cf-faq-block-cta:active:not(:disabled),.cf-faq-block[data-state=active] .cf-faq-block-cta:not(:disabled){transform:none}
}
`;
pieces/content/faq-block/specimen.tsx 83 lines
import * as React from "react";
import FaqBlock from "../faq-block";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = "default" | "hover" | "active" | "disabled";
export default function FaqBlockSpecimen({ state = "default" }: { state?: SpecimenState }) {
const s = defaults.sample;
const [guide, workbook, checklist] = s.items;
const kit = s.name.replace(/^The /, "the ");
const toNumber = (value: string) => Number(value.replace(/[^0-9.]/g, ""));
const saving = toNumber(s.regularPrice) - toNumber(s.price);
return (
<FaqBlock
state={state}
headline="Get your answers, then build your first funnel"
lead={`Straight answers on what's inside ${kit}, what it costs and how the 30-day guarantee works.`}
faqs={[
{
question: `What exactly is inside ${kit}?`,
answer: `Three tools in one download. The ${guide.name} maps your offer and the pages your funnel needs. The ${workbook.name} helps you draft your headline, offer and call to action. The ${checklist.name} walks you through your links, forms and next steps before launch.`,
},
{
question: "Is this a subscription?",
answer: `No. You pay ${s.price} once and keep lifetime access. Nothing renews.`,
},
{
question: "How soon can I start?",
answer: "Right away. It's an instant digital download, so you can open the guide as soon as checkout is done.",
},
{
question: "I've never built a funnel. Is this for me?",
answer: "Yes. The kit is made for your first funnel: plan it, write the page copy, then check every step before you launch.",
},
{
question: "Do I need my offer figured out first?",
answer: `No. The ${guide.name} starts with your offer and helps you map it before you plan a single page.`,
},
{
question: "Can I use it for more than one funnel?",
answer: "Yes. The kit is yours to keep, so you can run every new funnel through the same workbook and checklist.",
},
{
question: "What if it isn't right for me?",
answer: `You're covered by a ${s.guarantee}. If the kit isn't for you, ask for a refund within 30 days and you get your ${s.price} back.`,
},
]}
closeHeading={`Three reasons the kit is ${s.price} today`}
reasons={[
"One payment, then it's yours for life.",
"The guide, workbook and checklist download instantly.",
"You get 30 days to ask for your money back.",
]}
receipt={{
items: s.items.map((item, index) => ({
name: item.name,
value: item.value,
image: slot(`item-${index + 1}`, item.image),
imageAlt: item.imageAlt,
})),
subtotalLabel: "Subtotal",
subtotal: s.regularPrice,
discountLabel: "Starter Kit discount",
discount: `−$${saving}`,
totalLabel: "Total today",
total: s.price,
}}
actionLabel={`Yes! I want ${kit}`}
reassurance={`Instant download · ${s.guarantee}`}
contact={{
prompt: "Still have a question?",
before: "Email",
linkLabel: "support@example.com",
href: "mailto:support@example.com",
after: " and we'll help you decide.",
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFaqBlock |
React.ReactNode |
|
lead OptionalFaqBlock |
React.ReactNode |
|
faqs OptionalFaqBlock |
FaqBlockQuestion[] |
|
single OptionalFaqBlock |
boolean |
|
defaultOpen OptionalFaqBlock |
number[] |
|
closeHeading OptionalFaqBlock |
React.ReactNode |
|
reasons OptionalFaqBlock |
React.ReactNode[] |
|
receipt OptionalFaqBlock |
FaqBlockReceipt |
|
actionLabel OptionalFaqBlock |
string |
|
reassurance OptionalFaqBlock |
string |
|
href OptionalFaqBlock |
string |
|
onAction OptionalFaqBlock |
(event: React.MouseEvent<HTMLElement>) => void |
|
contact OptionalFaqBlock |
FaqBlockContact | null |
|
copy OptionalFaqBlock |
{ listLabel?: string; receiptLabel?: string } |
|
state OptionalFaqBlock |
"default" | "hover" | "active" | "disabled" |
|
className OptionalFaqBlock |
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-ink- 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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB