FAQ Block 2
Objection index FAQ: a dark rail where the buyer searches their doubt or taps a topic, beside a live accordion of straight answers, closed by a 30-day guarantee card and the order button, so the last objection ends one tap from checkout.
Use it in a prompt
Use content/faq-block-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/faq-block-2.tsx. - Import it and pass your copy and images (Props tab):
import { FaqBlock2 } from "@/components/funneldna/content/faq-block-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/faq-block-2/component.tsx 731 lines
// layout: split-contrast
// Objection index FAQ: a dark rail where the buyer searches their doubt or taps a topic, beside a live accordion of straight answers, closed by a 30-day guarantee card and the order button, so the last objection ends one tap from checkout.
import * as React from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
import { Lock, Search, SearchX, X } from "lucide-react";
export type FaqBlock2Category = {
/** Id used by each question's `category`. */
id: string;
label: string;
};
export type FaqBlock2Question = {
/** Anchor id: a link to #id opens this answer. */
id: string;
question: string;
/** Plain text, searchable; a blank line starts a new paragraph. */
answer: string;
/** Category id from `categories`. */
category: string;
};
export type FaqBlock2Guarantee = {
heading: string;
text: string;
/** Slot seal-guarantee: a transparent cut-out seal. */
sealImage?: string;
sealAlt?: string;
};
export type FaqBlock2Price = {
/** Regular price, shown with a red slash. */
regular?: string;
today: string;
/** Short line under the price, e.g. "One payment · Lifetime access". */
note?: string;
};
export type FaqBlock2Copy = {
searchLabel: string;
searchPlaceholder: string;
clearSearchLabel: string;
topicsLabel: string;
allLabel: string;
listLabel: string;
/** "{total}" is replaced with the number of questions. */
countAll: string;
/** "{count}" and "{total}" are replaced. */
countSome: string;
resetLabel: string;
/** "{query}" is replaced with the search text. */
emptyTitle: string;
emptyTopicTitle: string;
emptyBody: string;
emptyAction: string;
regularLabel: string;
todayLabel: string;
};
export type FaqBlock2Props = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
headlineMark?: string;
lead?: string;
categories?: FaqBlock2Category[];
faqs?: FaqBlock2Question[];
/** Question open on first render; null starts closed. Defaults to the first question. */
defaultOpenId?: string | null;
initialQuery?: string;
/** Category id selected on first render ("all" for every topic). */
initialCategory?: string;
/** The "still unsure" card; pass null to hide it (the price and button remain). */
guarantee?: FaqBlock2Guarantee | null;
/** Pass null to hide the price line. */
price?: FaqBlock2Price | null;
actionLabel?: string;
/** Reassurance line under the button. */
actionNote?: string;
/** Navigation destination; omit it for a button that calls onAction. */
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
copy?: Partial<FaqBlock2Copy>;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function FaqBlock2(props: FaqBlock2Props) {
const {
headline = "Still on the fence? Read this first.",
headlineMark = "Read this first.",
lead = "Every question buyers ask before they join, answered straight. Search a word or tap a topic.",
categories = DEFAULT_CATEGORIES,
faqs = DEFAULT_FAQS,
defaultOpenId,
initialQuery = "",
initialCategory = "all",
guarantee = DEFAULT_GUARANTEE,
price = DEFAULT_PRICE,
actionLabel = "Try it for 30 days · $47",
actionNote = "Secure checkout · Instant download",
href,
onAction,
copy,
state = "default",
className,
} = props;
const c: FaqBlock2Copy = { ...DEFAULT_COPY, ...copy };
const uid = React.useId();
const reduce = useReducedMotion() ?? false;
const [query, setQuery] = React.useState(initialQuery);
const [category, setCategory] = React.useState(initialCategory);
const [openId, setOpenId] = React.useState<string | null>(() =>
defaultOpenId === undefined ? (faqs[0]?.id ?? null) : defaultOpenId,
);
const searchRef = React.useRef<HTMLInputElement>(null);
const qRefs = React.useRef<Record<string, HTMLButtonElement | null>>({});
const faqsRef = React.useRef(faqs);
faqsRef.current = faqs;
const reduceRef = React.useRef(reduce);
reduceRef.current = reduce;
const disabled = state === "disabled";
const headId = `${uid}-h`;
const searchId = `${uid}-s`;
const listId = `${uid}-l`;
const terms = React.useMemo(
() => query.trim().toLowerCase().split(/\s+/).filter((t) => t.length > 1),
[query],
);
const searched = React.useMemo(
() =>
faqs.filter((f) => {
const hay = `${f.question} ${f.answer}`.toLowerCase();
return terms.every((t) => hay.includes(t));
}),
[faqs, terms],
);
const visible = category === "all" ? searched : searched.filter((f) => f.category === category);
const filtered = query.trim() !== "" || category !== "all";
const chips = [
{ id: "all", label: c.allLabel, count: searched.length },
...categories.map((cat) => ({ ...cat, count: searched.filter((f) => f.category === cat.id).length })),
];
// Deep links: #question-id opens that answer and brings it into view.
React.useEffect(() => {
let frame = 0;
const openFromHash = () => {
let id = "";
try {
id = decodeURIComponent(window.location.hash.slice(1));
} catch {
return;
}
if (!id || !faqsRef.current.some((f) => f.id === id)) return;
setQuery("");
setCategory("all");
setOpenId(id);
cancelAnimationFrame(frame);
frame = requestAnimationFrame(() => {
document.getElementById(id)?.scrollIntoView({ block: "start", behavior: reduceRef.current ? "auto" : "smooth" });
qRefs.current[id]?.focus({ preventScroll: true });
});
};
openFromHash();
window.addEventListener("hashchange", openFromHash);
return () => {
cancelAnimationFrame(frame);
window.removeEventListener("hashchange", openFromHash);
};
}, []);
const reset = () => {
setQuery("");
setCategory("all");
searchRef.current?.focus();
};
const onQuestionKey = (event: React.KeyboardEvent<HTMLButtonElement>, id: string) => {
const ids = visible.map((f) => f.id);
const index = ids.indexOf(id);
const last = ids.length - 1;
let next = -1;
if (event.key === "ArrowDown") next = index === last ? 0 : index + 1;
else if (event.key === "ArrowUp") next = index === 0 ? last : index - 1;
else if (event.key === "Home") next = 0;
else if (event.key === "End") next = last;
else return;
event.preventDefault();
qRefs.current[ids[next]]?.focus();
};
const ease: [number, number, number, number] = [0.2, 0.7, 0.2, 1];
const itemTransition = reduce ? { duration: 0 } : { duration: 0.32, ease, layout: { duration: 0.38, ease } };
const panelTransition = reduce ? { duration: 0 } : { duration: 0.32, ease };
const markAt = headlineMark ? headline.indexOf(headlineMark) : -1;
const headlineNode =
markAt < 0 ? (
headline
) : (
<>
{headline.slice(0, markAt)}
<span className="fq-mark">{headlineMark}</span>
{headline.slice(markAt + headlineMark.length)}
</>
);
const countText = filtered
? fill(c.countSome, { count: String(visible.length), total: String(faqs.length) })
: fill(c.countAll, { total: String(faqs.length) });
const emptyTitle = query.trim() ? fill(c.emptyTitle, { query: query.trim() }) : c.emptyTopicTitle;
const action =
href && !disabled ? (
<a className="fq-cta" href={href} onClick={onAction}>
{actionLabel}
</a>
) : (
<button type="button" className="fq-cta" disabled={disabled} onClick={onAction}>
{actionLabel}
</button>
);
const close = (
<div className={`fq-close${guarantee ? " is-card" : ""}`}>
{guarantee ? (
<div className="fq-close-head">
{guarantee.sealImage ? (
<img
className="fq-seal"
src={guarantee.sealImage}
alt={guarantee.sealAlt ?? ""}
width={96}
height={96}
loading="lazy"
decoding="async"
/>
) : null}
<h3 className="fq-close-h">{guarantee.heading}</h3>
</div>
) : null}
{guarantee?.text ? <p className="fq-close-text">{guarantee.text}</p> : null}
{price ? (
<p className="fq-price">
{price.regular ? (
<s className="fq-was">
<span className="fq-vh">{c.regularLabel} </span>
{price.regular}
</s>
) : null}
<span className="fq-now">
<span className="fq-vh">{c.todayLabel} </span>
{price.today}
</span>
{price.note ? <span className="fq-price-note">{price.note}</span> : null}
</p>
) : null}
{action}
{actionNote ? (
<p className="fq-note">
<Lock className="fq-note-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{actionNote}
</p>
) : null}
</div>
);
return (
<section
className={["cf-faq-block-2", className].filter(Boolean).join(" ")}
data-state={state}
aria-labelledby={headId}
>
<style>{CSS}</style>
<div className="fq-wrap">
<div className="fq-grid">
<div className="fq-rail">
<div className="fq-intro">
<h2 id={headId} className="fq-h">
{headlineNode}
</h2>
{lead ? <p className="fq-lead">{lead}</p> : null}
<div className="fq-search">
<label htmlFor={searchId} className="fq-label">
{c.searchLabel}
</label>
<div className="fq-field">
<Search className="fq-field-icon" size={20} strokeWidth={2.5} aria-hidden="true" />
<input
ref={searchRef}
id={searchId}
className="fq-input"
type="search"
value={query}
placeholder={c.searchPlaceholder}
autoComplete="off"
spellCheck={false}
aria-controls={listId}
onChange={(event) => setQuery(event.target.value)}
onKeyDown={(event) => {
if (event.key === "Escape" && query) {
event.preventDefault();
setQuery("");
}
}}
/>
{query ? (
<button
type="button"
className="fq-clear"
aria-label={c.clearSearchLabel}
onClick={() => {
setQuery("");
searchRef.current?.focus();
}}
>
<X size={18} strokeWidth={2.5} aria-hidden="true" />
</button>
) : null}
</div>
</div>
<div className="fq-chips" role="group" aria-label={c.topicsLabel}>
{chips.map((chip) => {
const active = category === chip.id;
return (
<button
key={chip.id}
type="button"
className="fq-chip"
aria-pressed={active}
disabled={chip.count === 0 && !active}
onClick={() => setCategory(chip.id)}
>
<span>{chip.label}</span>
<span className="fq-chip-count">{chip.count}</span>
</button>
);
})}
</div>
</div>
{close}
</div>
<div className="fq-main">
<div className="fq-meta">
<p className="fq-count" aria-live="polite">
{countText}
</p>
{filtered ? (
<button type="button" className="fq-reset" onClick={reset}>
{c.resetLabel}
</button>
) : null}
</div>
<ul className="fq-list" id={listId} aria-label={c.listLabel}>
<AnimatePresence mode="popLayout" initial={false}>
{visible.map((f) => {
const isOpen = openId === f.id;
const btnId = `${uid}-q-${f.id}`;
const panelId = `${uid}-a-${f.id}`;
return (
<motion.li
key={f.id}
id={f.id}
className={`fq-item${isOpen ? " is-open" : ""}`}
layout={reduce ? false : "position"}
initial={reduce ? false : { opacity: 0.82, y: 8 }}
animate={{ opacity: 1, y: 0 }}
exit={
reduce
? { opacity: 0, transition: { duration: 0 } }
: { opacity: 0, scale: 0.98, transition: { duration: 0.18 } }
}
transition={itemTransition}
>
<h3 className="fq-q">
<button
ref={(el) => {
qRefs.current[f.id] = el;
}}
id={btnId}
type="button"
className="fq-btn"
aria-expanded={isOpen}
aria-controls={panelId}
onClick={() => setOpenId((prev) => (prev === f.id ? null : f.id))}
onKeyDown={(event) => onQuestionKey(event, f.id)}
>
<span className="fq-q-text">{markTerms(f.question, terms)}</span>
<span className="fq-disc" aria-hidden="true" />
</button>
</h3>
<AnimatePresence initial={false}>
{isOpen ? (
<motion.div
key="panel"
id={panelId}
role="region"
aria-labelledby={btnId}
className="fq-panel"
initial={{ height: 0, opacity: 0 }}
animate={{ height: "auto", opacity: 1 }}
exit={{ height: 0, opacity: 0 }}
transition={panelTransition}
>
<div className="fq-a">
{f.answer.split("\n\n").map((para, i) => (
<p key={i}>{markTerms(para, terms)}</p>
))}
</div>
</motion.div>
) : null}
</AnimatePresence>
</motion.li>
);
})}
</AnimatePresence>
</ul>
{visible.length === 0 ? (
<motion.div
className="fq-empty"
initial={reduce ? false : { opacity: 0.82, y: 8 }}
animate={{ opacity: 1, y: 0 }}
transition={panelTransition}
>
<span className="fq-empty-icon" aria-hidden="true">
<SearchX size={20} strokeWidth={2.5} />
</span>
<p className="fq-empty-h">{emptyTitle}</p>
<p className="fq-empty-body">{c.emptyBody}</p>
<button type="button" className="fq-btn2" onClick={reset}>
{c.emptyAction}
</button>
</motion.div>
) : null}
</div>
</div>
</div>
</section>
);
}
export default FaqBlock2;
/** Replaces {name} placeholders in a copy template. */
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((out, key) => out.split(`{${key}}`).join(values[key]), template);
}
/** Wraps every search term found in the text in the house marker. */
function markTerms(text: string, terms: string[]): React.ReactNode {
if (!terms.length) return text;
const lower = text.toLowerCase();
const out: React.ReactNode[] = [];
let i = 0;
let key = 0;
while (i < text.length) {
let best = -1;
let len = 0;
for (const term of terms) {
const at = lower.indexOf(term, i);
if (at !== -1 && (best === -1 || at < best || (at === best && term.length > len))) {
best = at;
len = term.length;
}
}
if (best === -1) {
out.push(text.slice(i));
break;
}
if (best > i) out.push(text.slice(i, best));
out.push(
<mark key={key++} className="fq-hit">
{text.slice(best, best + len)}
</mark>,
);
i = best + len;
}
return out;
}
const DEFAULT_COPY: FaqBlock2Copy = {
searchLabel: "Search every question",
searchPlaceholder: "Try “refund” or “busy”",
clearSearchLabel: "Clear search",
topicsLabel: "Filter questions by topic",
allLabel: "All",
listLabel: "Questions and answers",
countAll: "All {total} answers",
countSome: "Showing {count} of {total} answers",
resetLabel: "Show all",
emptyTitle: "Nothing mentions “{query}” yet.",
emptyTopicTitle: "No answers in this topic yet.",
emptyBody: "Try one word, like “refund” or “time”, or browse every answer.",
emptyAction: "Show every answer",
regularLabel: "Regular price",
todayLabel: "Today",
};
const DEFAULT_CATEGORIES: FaqBlock2Category[] = [
{ id: "price", label: "Price" },
{ id: "time", label: "Time" },
{ id: "fit", label: "Will it work for me" },
{ id: "access", label: "Access & refunds" },
];
const DEFAULT_FAQS: FaqBlock2Question[] = [
{
id: "whole-price",
category: "price",
question: "Is $47 really the whole price?",
answer:
"Yes. It’s one payment of $47 for the Funnel Starter Kit: the guide, the workbook and the checklist.\n\nThere’s no subscription and nothing billed later.",
},
{
id: "why-47",
category: "price",
question: "Why $47 when the parts add up to $97?",
answer:
"Bought one by one, the Funnel Planning Guide ($49), the Page Copy Workbook ($29) and the Launch Checklist ($19) come to $97. In the kit, you get all three for $47, once.",
},
{
id: "busy",
category: "time",
question: "I’m busy. How much time does this take?",
answer:
"As much as you give it. The kit is a download, not a course with a schedule.\n\nPlan your funnel in the guide, write your page copy in the workbook, then run the checklist before you launch.",
},
{
id: "start-later",
category: "time",
question: "Do I have to start right away?",
answer: "No. You get lifetime access, so the kit is there whenever you’re ready to plan your funnel.",
},
{
id: "first-funnel",
category: "fit",
question: "I’ve never built a funnel. Will this work for me?",
answer:
"It’s made for your first funnel. The guide starts by mapping your offer and the pages your funnel needs, so you’re never guessing at step one.",
},
{
id: "have-a-funnel",
category: "fit",
question: "What if I already have a funnel?",
answer:
"Use the workbook to sharpen your headline, offer and call to action, then run the Launch Checklist over every link, form and next step before you send traffic.",
},
{
id: "not-a-writer",
category: "fit",
question: "Do I need to be a good writer?",
answer:
"No. The Page Copy Workbook takes you through your headline, your offer and your call to action, one page at a time.",
},
{
id: "after-i-pay",
category: "access",
question: "How do I get the kit after I pay?",
answer:
"It’s an instant download from a secure checkout. The guide, workbook and checklist are yours to keep.",
},
{
id: "not-for-me",
category: "access",
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 money back.",
},
];
const DEFAULT_GUARANTEE: FaqBlock2Guarantee = {
heading: "Still unsure? Take 30 days to decide.",
text: "Your kit is covered by our 30-day money-back guarantee. Use it, and if it isn’t right for you, ask for a refund.",
sealAlt: "30-day money-back guarantee seal",
};
const DEFAULT_PRICE: FaqBlock2Price = { regular: "$97", today: "$47", note: "One payment · Lifetime access" };
const CSS = `
.cf-faq-block-2{
--fq-g:clamp(16px,5vw,48px);
--fq-lw:clamp(340px,36vw,460px);
--fq-gap:clamp(32px,5vw,72px);
--fq-ease:cubic-bezier(.2,.7,.2,1);
--fq-shadow:var(--shadow,oklch(0.22 0.03 260));
--fq-marker:oklch(from var(--marker,#fae37c) l c h / 1);
/* Text on the marker follows the marker itself: dark on a light marker, light on a dark one (never the field or band ink). */
--fq-marker-ink:oklch(from var(--fq-marker) clamp(0.18,(0.62 - l) * 1000,0.97) 0.02 h);
position:relative;isolation:isolate;overflow-x:clip;box-sizing:border-box;
padding-block:clamp(56px,8vw,112px) clamp(64px,8.5vw,120px);
background:var(--surface,#ffffff);color:var(--ink,#101828);
font-family:var(--font-body,system-ui,sans-serif);
}
.cf-faq-block-2 *,.cf-faq-block-2 *::before,.cf-faq-block-2 *::after{box-sizing:border-box}
.cf-faq-block-2 .fq-wrap{max-width:calc(1120px + 2 * var(--fq-g));margin-inline:auto;padding-inline:var(--fq-g)}
.cf-faq-block-2 .fq-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "main" "close";row-gap:32px}
.cf-faq-block-2 .fq-rail{display:contents}
.cf-faq-block-2 .fq-intro{grid-area:intro;min-width:0;background:var(--band,#1b2a4a);color:var(--band-ink,#ffffff)}
.cf-faq-block-2 .fq-main{grid-area:main;min-width:0}
.cf-faq-block-2 .fq-close{grid-area:close;min-width:0}
.cf-faq-block-2 .fq-h{margin:0;font-family:var(--font-display,inherit);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,#ffffff)}
.cf-faq-block-2 .fq-mark{color:var(--fq-marker-ink);background:linear-gradient(transparent 6%,var(--fq-marker) 6%,var(--fq-marker) 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-inline:.12em;margin-inline:-.04em;border-radius:.14em .28em .2em .32em}
.cf-faq-block-2 .fq-lead{margin:16px 0 0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:var(--band-ink,#ffffff)}
.cf-faq-block-2 .fq-search{margin-top:28px}
.cf-faq-block-2 .fq-label{display:block;margin-bottom:8px;font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--band-ink,#ffffff)}
.cf-faq-block-2 .fq-field{position:relative}
.cf-faq-block-2 .fq-field-icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:color-mix(in oklch,var(--field-ink,#101828) 62%,var(--field,#ffffff));pointer-events:none}
.cf-faq-block-2 .fq-input{display:block;width:100%;min-height:56px;margin:0;padding:0 56px 0 48px;font:inherit;font-size:1.0625rem;line-height:1.3;color:var(--field-ink,#101828);background:var(--field,#ffffff);border:1px solid var(--field-border,color-mix(in oklch,var(--ink,#101828) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--fq-shadow) l c h / .22));-webkit-appearance:none;appearance:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-faq-block-2 .fq-input::placeholder{color:color-mix(in oklch,var(--field-ink,#101828) 65%,var(--field,#ffffff));opacity:1}
.cf-faq-block-2 .fq-input::-webkit-search-cancel-button,.cf-faq-block-2 .fq-input::-webkit-search-decoration{-webkit-appearance:none;appearance:none}
.cf-faq-block-2 .fq-input:hover{border-color:color-mix(in oklch,var(--field-ink,#101828) 40%,var(--field,#ffffff))}
.cf-faq-block-2 .fq-input:focus{outline:2px solid var(--band-ink,#ffffff);outline-offset:2px;border-color:var(--field-focus,var(--accent,#2563eb));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / .35)}
.cf-faq-block-2 .fq-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:max(0px,var(--field-radius,var(--button-radius,var(--radius,12px))) - 4px);background:transparent;color:var(--field-ink,#101828);cursor:pointer;transition:background .16s ease}
.cf-faq-block-2 .fq-clear:hover{background:color-mix(in oklch,var(--field-ink,#101828) 8%,var(--field,#ffffff))}
.cf-faq-block-2 .fq-clear:active{background:color-mix(in oklch,var(--field-ink,#101828) 14%,var(--field,#ffffff))}
.cf-faq-block-2 .fq-clear:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:-3px}
.cf-faq-block-2 .fq-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.cf-faq-block-2 .fq-chip{display:inline-flex;align-items:center;gap:10px;min-height:44px;margin:0;padding:6px 8px 6px 16px;border-radius:999px;border:1px solid oklch(from var(--band-ink,#ffffff) l c h / .22);background:oklch(from var(--band-ink,#ffffff) l c h / .1);color:var(--band-ink,#ffffff);font-family:var(--font-body,inherit);font-size:.9375rem;line-height:1.2;font-weight:var(--button-weight,800);white-space:nowrap;cursor:pointer;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
.cf-faq-block-2 .fq-chip:hover:not(:disabled){background:oklch(from var(--band-ink,#ffffff) l c h / .18);border-color:oklch(from var(--band-ink,#ffffff) l c h / .36)}
.cf-faq-block-2 .fq-chip:active:not(:disabled){transform:scale(.97)}
.cf-faq-block-2 .fq-chip:focus-visible{outline:2px solid var(--band-ink,#ffffff);outline-offset:2px}
.cf-faq-block-2 .fq-chip[aria-pressed="true"]{background:var(--band-ink,#ffffff);border-color:var(--band-ink,#ffffff);color:var(--band,#1b2a4a)}
.cf-faq-block-2 .fq-chip:disabled{cursor:not-allowed}
.cf-faq-block-2 .fq-chip-count{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 8px;border-radius:999px;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#ffffff));font-size:.875rem;line-height:1;font-weight:800;font-variant-numeric:tabular-nums}
.cf-faq-block-2 .fq-chip:disabled .fq-chip-count{background:oklch(from var(--band-ink,#ffffff) l c h / .14);color:var(--band-ink,#ffffff)}
.cf-faq-block-2 .fq-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin-bottom:12px}
.cf-faq-block-2 .fq-count{margin:0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#475467)}
.cf-faq-block-2 .fq-reset{min-height:44px;padding:0 4px;border:0;background:none;font:inherit;font-size:.9375rem;font-weight:var(--button-weight,700);color:var(--link,var(--accent,#2563eb));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent,#2563eb)) l c h / .45);text-underline-offset:.18em;cursor:pointer}
.cf-faq-block-2 .fq-reset:hover{color:oklch(from var(--link,var(--accent,#2563eb)) calc(l - .08) c h);text-decoration-color:currentColor}
.cf-faq-block-2 .fq-reset:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:2px;border-radius:4px}
.cf-faq-block-2 .fq-list{position:relative;list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.cf-faq-block-2 .fq-item{background:var(--card,#ffffff);border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--fq-shadow) l c h / .2));scroll-margin-top:24px;transition:box-shadow .2s ease,border-color .2s ease}
.cf-faq-block-2 .fq-item:hover{border-color:oklch(from var(--ink,#101828) l c h / .24)}
.cf-faq-block-2 .fq-item.is-open{box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--fq-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--fq-shadow) l c h / .2)));border-color:oklch(from var(--accent,#2563eb) l c h / .45)}
.cf-faq-block-2 .fq-q{margin:0;font:inherit}
.cf-faq-block-2 .fq-btn{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:start;gap:16px;width:100%;margin:0;padding:clamp(18px,2.2vw,22px) clamp(18px,2.6vw,24px);border:0;border-radius:var(--card-radius,var(--button-radius,var(--radius,14px)));background:transparent;color:var(--ink,#101828);text-align:left;cursor:pointer;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;letter-spacing:-0.01em}
.cf-faq-block-2 .fq-q-text{padding-top:6px;text-wrap:pretty}
.cf-faq-block-2 .fq-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:2px}
.cf-faq-block-2 .fq-disc{position:relative;display:block;width:40px;height:40px;border-radius:999px;background:color-mix(in oklch,var(--ink,#101828) 6%,var(--card,#ffffff));color:var(--ink,#101828);transition:background .2s ease,color .2s ease,transform .32s var(--fq-ease)}
.cf-faq-block-2 .fq-disc::before,.cf-faq-block-2 .fq-disc::after{content:"";position:absolute;left:50%;top:50%;width:16px;height:2.5px;margin:-1.25px 0 0 -8px;border-radius:2px;background:currentColor;transition:transform .32s var(--fq-ease)}
.cf-faq-block-2 .fq-disc::after{transform:rotate(90deg)}
.cf-faq-block-2 .fq-btn:hover .fq-disc{background:color-mix(in oklch,var(--ink,#101828) 12%,var(--card,#ffffff))}
.cf-faq-block-2 .fq-btn:active .fq-disc{transform:scale(.92)}
.cf-faq-block-2 .is-open .fq-disc,.cf-faq-block-2 .is-open .fq-btn:hover .fq-disc{background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#ffffff));transform:rotate(180deg)}
.cf-faq-block-2 .is-open .fq-disc::after{transform:rotate(180deg)}
.cf-faq-block-2 .fq-panel{overflow:hidden}
.cf-faq-block-2 .fq-a{padding:0 clamp(18px,2.6vw,24px) clamp(20px,2.6vw,26px)}
.cf-faq-block-2 .fq-a p{margin:0;max-width:64ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.55;color:var(--ink,#101828);text-wrap:pretty}
.cf-faq-block-2 .fq-a p + p{margin-top:12px}
.cf-faq-block-2 .fq-hit{background:var(--fq-marker);color:var(--fq-marker-ink);padding:0 .08em;border-radius:.2em .32em .24em .36em;-webkit-box-decoration-break:clone;box-decoration-break:clone;font:inherit}
.cf-faq-block-2 .fq-empty{display:grid;justify-items:center;gap:12px;padding:clamp(24px,3vw,32px);border-radius:var(--card-radius,var(--radius,14px));background:color-mix(in oklch,var(--ink,#101828) 4%,var(--surface,#ffffff));text-align:center}
.cf-faq-block-2 .fq-empty-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#ffffff))}
.cf-faq-block-2 .fq-empty-h{margin:4px 0 0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;overflow-wrap:anywhere;color:var(--ink,#101828)}
.cf-faq-block-2 .fq-empty-body{margin:0;max-width:46ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted,#475467);text-wrap:pretty}
.cf-faq-block-2 .fq-btn2{display:inline-flex;align-items:center;justify-content:center;min-height:56px;margin-top:4px;padding:0 24px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263)));color:var(--button-2-ink,var(--secondary-ink,#101828));font-family:var(--button-font,var(--font-display,inherit));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;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--fq-shadow) l c h / .2)));cursor:pointer;transition:background .16s ease,transform .16s ease,box-shadow .16s ease}
.cf-faq-block-2 .fq-btn2:hover{background:oklch(from var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263))) calc(l - .04) c h)}
.cf-faq-block-2 .fq-btn2:active{transform:translateY(1px);box-shadow:none}
.cf-faq-block-2 .fq-btn2:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:3px}
.cf-faq-block-2 .fq-close{display:flex;flex-direction:column;gap:16px}
.cf-faq-block-2 .fq-close.is-card{padding:clamp(20px,3vw,28px);background:var(--card,#ffffff);color:var(--ink,#101828);border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--fq-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--fq-shadow) l c h / .2)))}
.cf-faq-block-2 .fq-close-head{display:flex;align-items:center;gap:16px}
.cf-faq-block-2 .fq-seal{flex:none;display:block;width:clamp(80px,7vw,96px);height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--fq-shadow) l c h / .3)) drop-shadow(0 10px 12px oklch(from var(--fq-shadow) l c h / .22))}
.cf-faq-block-2 .fq-close-h{margin:0;font-family:var(--font-display,inherit);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-2 .fq-close-text{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted,#475467);text-wrap:pretty}
.cf-faq-block-2 .fq-price{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:16px;row-gap:12px;margin:4px 0 0}
.cf-faq-block-2 .fq-was{position:relative;text-decoration:none;font-family:var(--font-display,inherit);font-weight:700;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1;color:var(--muted,#475467);font-variant-numeric:tabular-nums}
.cf-faq-block-2 .fq-was::after{content:"";position:absolute;left:-8%;right:-8%;top:50%;height:3px;margin-top:-1.5px;border-radius:3px;background:var(--danger,oklch(0.5 0.17 27));transform:rotate(-12deg)}
.cf-faq-block-2 .fq-now{font-family:var(--font-display,inherit);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(--ink,#101828)}
.cf-faq-block-2 .fq-price-note{flex-basis:100%;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#475467)}
.cf-faq-block-2 .fq-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.cf-faq-block-2 .fq-cta{
--fq-b:var(--button-bg,var(--cta,oklch(0.58 0.21 29)));
--fq-b2:var(--button-bg-2,var(--cta-2,oklch(0.51 0.21 29)));
position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin:0;padding:10px 28px;
border:0;border-radius:var(--button-radius,var(--radius,12px));
background:linear-gradient(oklch(from var(--fq-b) calc(l + .04) c h),oklch(from var(--fq-b2) calc(l - .02) c h));
color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display,inherit));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(--fq-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--fq-b) calc(l - .16) c h),0 1px 2px oklch(from var(--fq-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--fq-shadow) l c h / .45));
cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-faq-block-2 .fq-cta:hover:not(:disabled),.cf-faq-block-2[data-state="hover"] .fq-cta{background:linear-gradient(oklch(from var(--fq-b) calc(l - .01) c h),oklch(from var(--fq-b2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--fq-b) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--fq-b) calc(l - .2) c h),0 1px 2px oklch(from var(--fq-shadow) l c h / .32),0 12px 20px -8px oklch(from var(--fq-shadow) l c h / .5))}
.cf-faq-block-2 .fq-cta:active:not(:disabled),.cf-faq-block-2[data-state="active"] .fq-cta{transform:translateY(1px);background:linear-gradient(oklch(from var(--fq-b) calc(l - .05) c h),oklch(from var(--fq-b2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--fq-b) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--fq-b) calc(l - .16) c h),0 1px 1px oklch(from var(--fq-shadow) l c h / .3)}
.cf-faq-block-2 .fq-cta:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:3px}
.cf-faq-block-2 .fq-cta:disabled{cursor:not-allowed;background:var(--secondary,oklch(0.93 0.015 263));color:var(--secondary-ink,#101828);text-shadow:none;box-shadow:none}
.cf-faq-block-2 .fq-note{margin:0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#475467);text-wrap:pretty}
.cf-faq-block-2 .fq-note-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
@media (min-width:900px){
.cf-faq-block-2::before{content:"";position:absolute;z-index:-1;inset-block:0;left:0;width:calc(max(var(--fq-g),(100% - 1120px) / 2) + var(--fq-lw) + var(--fq-gap) / 2);background:var(--band,#1b2a4a)}
.cf-faq-block-2 .fq-grid{grid-template-columns:var(--fq-lw) minmax(0,1fr);grid-template-areas:none;column-gap:var(--fq-gap);align-items:start}
.cf-faq-block-2 .fq-rail{display:flex;flex-direction:column;gap:32px;grid-area:1 / 1;min-width:0;background:var(--band,#1b2a4a);color:var(--band-ink,#ffffff)}
.cf-faq-block-2 .fq-intro,.cf-faq-block-2 .fq-close{grid-area:auto}
.cf-faq-block-2 .fq-main{grid-area:1 / 2}
.cf-faq-block-2 .fq-close:not(.is-card),.cf-faq-block-2 .fq-close:not(.is-card) .fq-was,.cf-faq-block-2 .fq-close:not(.is-card) .fq-now,.cf-faq-block-2 .fq-close:not(.is-card) .fq-price-note,.cf-faq-block-2 .fq-close:not(.is-card) .fq-note{color:var(--band-ink,#ffffff)}
.cf-faq-block-2 .fq-close:not(.is-card) .fq-cta:focus-visible{outline-color:var(--band-ink,#ffffff)}
}
@media (min-width:900px) and (min-height:860px){
.cf-faq-block-2 .fq-rail{position:sticky;top:32px}
}
@media (max-width:899.98px){
.cf-faq-block-2{padding-top:0}
.cf-faq-block-2 .fq-intro{margin-inline:calc(-1 * var(--fq-g));padding:clamp(56px,8vw,112px) var(--fq-g) 32px;background:var(--band,#1b2a4a)}
.cf-faq-block-2 .fq-chips{flex-wrap:nowrap;overflow-x:auto;margin-inline:calc(-1 * var(--fq-g));padding:6px var(--fq-g);scroll-padding-inline:var(--fq-g);scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cf-faq-block-2 .fq-chips::-webkit-scrollbar{display:none}
.cf-faq-block-2 .fq-chip{flex:none;scroll-snap-align:start}
}
@media (max-width:479.98px){
.cf-faq-block-2 .fq-close.is-card{padding:20px}
.cf-faq-block-2 .fq-cta{padding-inline:16px;font-size:1.0625rem}
}
@media (prefers-reduced-motion:reduce){
.cf-faq-block-2 *,.cf-faq-block-2 *::before,.cf-faq-block-2 *::after{transition:none !important;animation:none !important}
.cf-faq-block-2 .fq-chips{scroll-behavior:auto}
}
`;
pieces/content/faq-block-2/specimen.tsx 29 lines
import __studioImage7f4f9dc1 from "../assets/b7d6526dd29b687a.webp";
import * as React from "react";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import { FaqBlock2, type FaqBlock2Props } from "../faq-block-2";
export const states = ["default", "hover", "active", "disabled"];
export default function FaqBlock2Specimen({ state = "default" }: { state?: FaqBlock2Props["state"] }) {
const sample = defaults.sample;
return (
<FaqBlock2
state={state}
defaultOpenId="whole-price"
price={{ regular: sample.regularPrice, today: sample.price, note: sample.note }}
actionLabel={`Try it for 30 days · ${sample.price}`}
actionNote={sample.sublabel}
guarantee={{
heading: "Still unsure? Take 30 days to decide.",
text: `Your kit is covered by our ${sample.guarantee}. Use it, and if it isn’t right for you, ask for a refund.`,
sealImage: slot(
"seal-guarantee",
__studioImage7f4f9dc1,
),
sealAlt: `${sample.guarantee} seal`,
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFaqBlock2 |
string |
|
headlineMark OptionalFaqBlock2 |
string |
|
lead OptionalFaqBlock2 |
string |
|
categories OptionalFaqBlock2 |
FaqBlock2Category[] |
|
faqs OptionalFaqBlock2 |
FaqBlock2Question[] |
|
defaultOpenId OptionalFaqBlock2 |
string | null |
|
initialQuery OptionalFaqBlock2 |
string |
|
initialCategory OptionalFaqBlock2 |
string |
|
guarantee OptionalFaqBlock2 |
FaqBlock2Guarantee | null |
|
price OptionalFaqBlock2 |
FaqBlock2Price | null |
|
actionLabel OptionalFaqBlock2 |
string |
|
actionNote OptionalFaqBlock2 |
string |
|
href OptionalFaqBlock2 |
string |
|
onAction OptionalFaqBlock2 |
(event: React.MouseEvent<HTMLElement>) => void |
|
copy OptionalFaqBlock2 |
Partial<FaqBlock2Copy> |
|
state OptionalFaqBlock2 |
"default" | "hover" | "active" | "disabled" |
|
className OptionalFaqBlock2 |
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--field-border--field-focus--field-ink--field-radius- 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.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
b7d6526dd29b687a.webp
image/webp · 229 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB