FAQ Chat 1
FAQ as a chat thread: your questions on the right, the founder's straight answers on the left (one answer adds up what the kit is worth), closed by a scoreboard of facts whose last tile is the risk-first action.
Use it in a prompt
Use content/faq-chat 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-chat.tsx. - Import it and pass your copy and images (Props tab):
import { FaqChat } from "@/components/funneldna/content/faq-chat"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/faq-chat/component.tsx 536 lines
// layout: fact-scoreboard
// FAQ as a chat thread: your questions on the right, the founder's straight answers on the left (one answer adds up what the kit is worth), closed by a scoreboard of facts whose last tile is the risk-first action.
import * as React from "react";
import { ShieldCheck, UserRound } from "lucide-react";
export type FaqChatMessage = {
/** Anchor id for this question/answer pair. */
id?: string;
question: React.ReactNode;
/** A string renders as a paragraph; any other node renders as given. */
answer: React.ReactNode;
/** Italic aside in the founder's voice, shown under the answer. */
aside?: React.ReactNode;
/** Shows the value ledger (items, total value, today's price) inside this answer. */
showLedger?: boolean;
};
export type FaqChatLedgerItem = {
name: string;
value: string;
/** Slot item-1 … item-n. */
image?: string;
imageAlt?: string;
};
export type FaqChatFact = { value: string; label: string };
export type FaqChatProps = {
headline?: React.ReactNode;
lead?: React.ReactNode;
founderName?: string;
founderRole?: string;
/** Slot presenter: the founder's portrait, used as the chat avatar. */
presenterImage?: string;
presenterAlt?: string;
/** Text inside the visitor's avatar disc. */
youLabel?: string;
messages?: FaqChatMessage[];
items?: FaqChatLedgerItem[];
totalLabel?: string;
regularPrice?: string;
todayLabel?: string;
price?: string;
priceNote?: string;
/** Scoreboard tiles before the action tile. */
facts?: FaqChatFact[];
closeHeadline?: React.ReactNode;
/** Button label; "{price}" is replaced with the price. */
label?: string;
note?: React.ReactNode;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
disabled?: boolean;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
/** Accessible labels. "{name}" in founderAnswers is replaced with the founder's name. */
copy?: {
threadLabel?: string;
youAsked?: string;
founderAnswers?: string;
founderFallback?: string;
factsLabel?: string;
ledgerLabel?: string;
};
};
const DEFAULT_MESSAGES: FaqChatMessage[] = [
{
id: "faq-chat-start",
question: "I’ve never built a funnel. Is this too advanced for me?",
answer: "No. You start with your offer, then map the pages, then write the copy. Every step tells you exactly what to do next.",
aside: "(If you can fill in a form, you can do this.)",
},
{
id: "faq-chat-kit",
question: "What do I actually get?",
answer: "Three tools that work together, in one download:",
showLedger: true,
},
{
id: "faq-chat-speed",
question: "How soon can I start?",
answer: "Right away. It’s an instant digital download, so you can open the guide and start mapping tonight.",
},
{
id: "faq-chat-risk",
question: "What if it isn’t right for me?",
answer: "Then you get your money back. You have 30 days to work through the kit, and if it doesn’t help, just ask for a refund.",
aside: "(I’d rather you keep your money than keep a kit you don’t use.)",
},
];
const DEFAULT_ITEMS: FaqChatLedgerItem[] = [
{ name: "Funnel Planning Guide", value: "$49" },
{ name: "Page Copy Workbook", value: "$29" },
{ name: "Launch Checklist", value: "$19" },
];
const DEFAULT_FACTS: FaqChatFact[] = [
{ value: "3", label: "tools in one download" },
{ value: "1", label: "payment, yours to keep" },
{ value: "30", label: "days to try it, money back" },
];
export function FaqChat(props: FaqChatProps) {
const {
headline = (
<>
Still on the fence? Here are my <span className="cf-faq-chat__em">straight answers.</span>
</>
),
lead = "The questions worth asking before you buy, answered the way I’d answer you in a message.",
founderName = "",
founderRole = "",
presenterImage,
presenterAlt = "",
youLabel = "You",
messages = DEFAULT_MESSAGES,
items = DEFAULT_ITEMS,
totalLabel = "Total value",
regularPrice = "$97",
todayLabel = "Yours today",
price = "$47",
priceNote = "One payment · Lifetime access",
facts = DEFAULT_FACTS,
closeHeadline = "Get the whole kit. Decide with it in your hands.",
label = "Try It 30 Days for {price}",
note = "30-day money-back guarantee · Instant download",
href,
onAction,
disabled = false,
state = "default",
className,
copy = {},
} = props;
const uid = React.useId().replace(/:/g, "");
const titleId = "cf-faq-chat-title-" + uid;
const isDisabled = disabled || state === "disabled";
const buttonText = label.replace("{price}", price);
const forced = state === "hover" || state === "active" ? state : undefined;
const speaker = founderName || copy.founderFallback || "The creator";
const answersLabel = (copy.founderAnswers ?? "{name} answers:").replace("{name}", speaker);
return (
<section className={["cf-faq-chat", className].filter(Boolean).join(" ")} aria-labelledby={titleId}>
<style>{CSS}</style>
<div className="cf-faq-chat__wrap">
<header className="cf-faq-chat__head">
<h2 id={titleId} className="cf-faq-chat__title">{headline}</h2>
{lead ? <p className="cf-faq-chat__lead">{lead}</p> : null}
{founderName ? (
<div className="cf-faq-chat__contact">
<Avatar image={presenterImage} alt={presenterAlt || founderName} name={founderName} large />
<span>
<span className="cf-faq-chat__contact-name">{founderName}</span>
{founderRole ? <span className="cf-faq-chat__contact-role">{founderRole}</span> : null}
</span>
</div>
) : null}
</header>
<ol className="cf-faq-chat__thread" aria-label={copy.threadLabel ?? "Questions and answers"}>
{messages.map((message, index) => {
const delay = { "--d": `${Math.min(index * 0.07, 0.28)}s` } as React.CSSProperties;
return (
<li key={message.id ?? index} id={message.id} className="cf-faq-chat__pair">
<div className="cf-faq-chat__row cf-faq-chat__row--you">
<h3 className="cf-faq-chat__bubble cf-faq-chat__bubble--q" style={delay}>
<span className="cf-faq-chat__sr">{copy.youAsked ?? "You asked:"} </span>
{message.question}
</h3>
<span className="cf-faq-chat__you" aria-hidden="true">{youLabel}</span>
</div>
<div className="cf-faq-chat__row cf-faq-chat__row--founder">
<Avatar image={presenterImage} alt="" name={founderName} />
<div className="cf-faq-chat__bubble cf-faq-chat__bubble--a" style={delay}>
<span className="cf-faq-chat__sr">{answersLabel} </span>
<div className="cf-faq-chat__answer">
{typeof message.answer === "string" ? <p>{message.answer}</p> : message.answer}
</div>
{message.aside ? <p className="cf-faq-chat__aside">{message.aside}</p> : null}
{message.showLedger && items.length ? (
<div className="cf-faq-chat__ledger" role="group" aria-label={copy.ledgerLabel ?? "What the kit is worth"}>
<ul className="cf-faq-chat__lines">
{items.map((item, i) => (
<li key={item.name + i} className="cf-faq-chat__line">
{item.image ? (
<img className="cf-faq-chat__thumb" src={item.image} alt={item.imageAlt ?? item.name} width={44} height={44} loading="lazy" />
) : null}
<span className="cf-faq-chat__item">{item.name}</span>
<span className="cf-faq-chat__leader" aria-hidden="true" />
<span className="cf-faq-chat__value">{item.value}</span>
</li>
))}
</ul>
{regularPrice ? (
<p className="cf-faq-chat__total">
<span>{totalLabel}</span>
<span className="cf-faq-chat__leader" aria-hidden="true" />
<span className="cf-faq-chat__value">{regularPrice}</span>
</p>
) : null}
<div className="cf-faq-chat__today">
<span className="cf-faq-chat__today-label">
{todayLabel}
{priceNote ? <small>{priceNote}</small> : null}
</span>
<strong className="cf-faq-chat__price">{price}</strong>
</div>
</div>
) : null}
</div>
</div>
</li>
);
})}
</ol>
<div className="cf-faq-chat__board">
{facts.length ? (
<ul className="cf-faq-chat__facts" aria-label={copy.factsLabel ?? "The kit at a glance"}>
{facts.map((fact, i) => (
<li key={fact.label + i} className="cf-faq-chat__tile">
<span className="cf-faq-chat__num">{fact.value}</span>
<span className="cf-faq-chat__fact-label">{fact.label}</span>
</li>
))}
</ul>
) : null}
<div className="cf-faq-chat__close">
<h3 className="cf-faq-chat__close-title">{closeHeadline}</h3>
{href && !isDisabled ? (
<a className="cf-faq-chat__btn" data-state={forced} href={href} onClick={onAction}>
{buttonText}
</a>
) : (
<button type="button" className="cf-faq-chat__btn" data-state={forced} disabled={isDisabled} onClick={onAction}>
{buttonText}
</button>
)}
{note ? (
<p className="cf-faq-chat__note">
<ShieldCheck size={16} strokeWidth={2.5} aria-hidden="true" />
{note}
</p>
) : null}
</div>
</div>
</div>
</section>
);
}
export default FaqChat;
function Avatar({ image, alt, name, large }: { image?: string; alt: string; name: string; large?: boolean }) {
const cls = large ? "cf-faq-chat__avatar cf-faq-chat__avatar--lg" : "cf-faq-chat__avatar";
if (image) {
return (
<span className={cls}>
<img src={image} alt={alt} width={large ? 56 : 40} height={large ? 56 : 40} loading="lazy" />
</span>
);
}
const initial = name.trim().charAt(0).toUpperCase();
return (
<span className={cls} aria-hidden="true">
{initial || <UserRound size={20} strokeWidth={2.5} />}
</span>
);
}
const CSS = `
.cf-faq-chat{
--fc-r: calc(var(--radius, 12px) + 8px);
--fc-sh: var(--shadow, oklch(0.22 0.03 260));
--fc-shadow-sm: var(--shadow-sm, 0 1px 1px oklch(from var(--fc-sh) l c h / 0.18), 0 1px 3px oklch(from var(--fc-sh) l c h / 0.14));
--fc-shadow-md: var(--shadow-md, 0 1px 2px oklch(from var(--fc-sh) l c h / 0.22), 0 4px 10px -2px oklch(from var(--fc-sh) l c h / 0.2));
--fc-shadow-lg: var(--shadow-lg, 0 2px 4px oklch(from var(--fc-sh) l c h / 0.22), 0 12px 24px -8px oklch(from var(--fc-sh) l c h / 0.32));
--fc-bg: var(--button-bg, var(--cta));
--fc-bg-2: var(--button-bg-2, var(--cta-2));
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;
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
overflow-x: clip;
}
.cf-faq-chat, .cf-faq-chat *, .cf-faq-chat *::before, .cf-faq-chat *::after { box-sizing: border-box; }
.cf-faq-chat :where(h2, h3, p, ol, ul, li) { margin: 0; padding: 0; }
.cf-faq-chat :where(ol, ul) { list-style: none; }
.cf-faq-chat__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.cf-faq-chat__wrap { max-width: 1120px; margin-inline: auto; }
.cf-faq-chat__head { max-width: 46rem; margin-inline: auto; text-align: center; }
.cf-faq-chat__title {
font-family: var(--font-display);
font-size: clamp(2rem, 3.6vw, 3.25rem);
line-height: 1.06;
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
text-wrap: balance;
color: var(--ink);
}
.cf-faq-chat__em { color: var(--accent); }
.cf-faq-chat__lead {
max-width: 40rem;
margin: 16px auto 0;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--muted);
text-wrap: pretty;
}
.cf-faq-chat__contact { display: inline-flex; align-items: center; gap: 12px; margin-top: 32px; text-align: left; }
.cf-faq-chat__contact-name { display: block; font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--ink); }
.cf-faq-chat__contact-role { display: block; margin-top: 4px; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--muted); }
.cf-faq-chat__avatar {
flex: none;
display: grid;
place-items: center;
width: 40px;
height: 40px;
border-radius: 50%;
overflow: hidden;
background: var(--band);
color: var(--band-ink);
font-family: var(--font-display);
font-weight: 800;
font-size: 16px;
line-height: 1;
}
.cf-faq-chat__avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.cf-faq-chat__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.cf-faq-chat__you {
display: grid;
place-items: center;
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--secondary);
color: var(--secondary-ink);
font-size: 14px;
font-weight: 800;
line-height: 1;
}
.cf-faq-chat__thread { max-width: 48rem; margin: 48px auto 0; display: grid; gap: 32px; }
.cf-faq-chat__pair { display: grid; gap: 12px; scroll-margin-top: 24px; }
.cf-faq-chat__row { display: grid; gap: 12px; align-items: start; }
.cf-faq-chat__row--you { grid-template-columns: minmax(0, 1fr) 40px; }
.cf-faq-chat__row--founder { grid-template-columns: 40px minmax(0, 1fr); }
.cf-faq-chat__bubble { min-width: 0; }
.cf-faq-chat__bubble--q {
justify-self: end;
max-width: 34rem;
padding: 14px 20px;
border-radius: var(--fc-r) 6px var(--fc-r) var(--fc-r);
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
font-family: var(--font-body);
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
font-weight: 700;
line-height: 1.4;
text-wrap: pretty;
box-shadow: var(--fc-shadow-sm);
}
.cf-faq-chat__bubble--a {
justify-self: start;
max-width: 40rem;
padding: clamp(16px, 2.4vw, 24px);
border-radius: 6px var(--fc-r) var(--fc-r) var(--fc-r);
background: var(--card);
color: var(--ink);
border: 1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));
box-shadow: var(--card-shadow, var(--fc-shadow-md));
}
.cf-faq-chat__answer p { text-wrap: pretty; }
.cf-faq-chat__aside { margin-top: 8px; font-style: italic; color: var(--muted); text-wrap: pretty; }
.cf-faq-chat__ledger { margin-top: 16px; padding: 16px; border-radius: 10px; background: color-mix(in oklch, var(--ink) 4%, var(--card)); }
.cf-faq-chat__lines { display: grid; gap: 12px; }
.cf-faq-chat__line, .cf-faq-chat__total { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 1.3; color: var(--ink); }
.cf-faq-chat__thumb { flex: none; display: block; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.cf-faq-chat__item { flex: 0 1 auto; min-width: 0; font-weight: 600; text-wrap: pretty; }
.cf-faq-chat__leader { flex: 1 1 16px; min-width: 16px; height: 1px; background: oklch(from var(--ink) l c h / 0.22); }
.cf-faq-chat__value { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.cf-faq-chat__total { margin-top: 16px; font-weight: 800; }
.cf-faq-chat__today { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 16px; }
.cf-faq-chat__today-label { font-size: 15px; font-weight: 800; line-height: 1.4; color: var(--ink); }
.cf-faq-chat__today-label small { display: block; font-size: 15px; font-weight: 500; color: var(--muted); }
.cf-faq-chat__price {
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(--ink);
}
.cf-faq-chat__board { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin-top: clamp(48px, 6vw, 64px); }
.cf-faq-chat__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cf-faq-chat__tile, .cf-faq-chat__close {
background: var(--card);
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(--fc-shadow-md));
padding: clamp(20px, 3vw, 32px);
}
.cf-faq-chat__tile { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.cf-faq-chat__num {
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(--ink);
}
.cf-faq-chat__fact-label { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.cf-faq-chat__close {
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
border-color: color-mix(in oklch, var(--accent-fill, var(--accent)) 40%, var(--card));
box-shadow: var(--fc-shadow-lg);
}
.cf-faq-chat__close-title {
margin-bottom: 24px;
font-family: var(--font-display);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
text-wrap: balance;
color: var(--ink);
}
.cf-faq-chat__btn {
display: flex;
width: 100%;
min-height: 64px;
align-items: center;
justify-content: center;
padding: 12px 24px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(oklch(from var(--fc-bg) calc(l + 0.04) c h), oklch(from var(--fc-bg-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);
cursor: pointer;
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--fc-bg) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--fc-bg) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--fc-sh) l c h / 0.3),
0 8px 16px -6px oklch(from var(--fc-sh) l c h / 0.4));
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-faq-chat__btn:not(:disabled):hover, .cf-faq-chat__btn[data-state="hover"]:not(:disabled) {
background: linear-gradient(oklch(from var(--fc-bg) calc(l - 0.01) c h), oklch(from var(--fc-bg-2) calc(l - 0.07) c h));
box-shadow:
inset 0 1px 0 oklch(from var(--fc-bg) calc(l + 0.12) c h / 0.7),
inset 0 -3px 0 oklch(from var(--fc-bg) calc(l - 0.2) c h),
0 1px 2px oklch(from var(--fc-sh) l c h / 0.34),
0 10px 18px -6px oklch(from var(--fc-sh) l c h / 0.48);
}
.cf-faq-chat__btn:not(:disabled):active, .cf-faq-chat__btn[data-state="active"]:not(:disabled) {
transform: translateY(1px);
background: linear-gradient(oklch(from var(--fc-bg) calc(l - 0.06) c h), oklch(from var(--fc-bg-2) calc(l - 0.08) c h));
box-shadow:
inset 0 2px 4px oklch(from var(--fc-bg) calc(l - 0.22) c h / 0.6),
inset 0 -2px 0 oklch(from var(--fc-bg) calc(l - 0.18) c h),
0 1px 2px oklch(from var(--fc-sh) l c h / 0.3);
}
.cf-faq-chat__btn:focus-visible { outline: 3px solid var(--button-focus, var(--accent)); outline-offset: 3px; }
.cf-faq-chat__btn:disabled {
background: var(--secondary);
color: var(--secondary-ink);
text-shadow: none;
cursor: not-allowed;
transform: none;
box-shadow: var(--button-2-shadow, var(--shadow-sm));
}
.cf-faq-chat__note { margin-top: 12px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.cf-faq-chat__note svg { display: inline-block; vertical-align: -0.15em; margin-inline-end: .4em; color: var(--success); }
@keyframes cf-faq-chat-rise { from { opacity: .82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
.cf-faq-chat__bubble { animation: cf-faq-chat-rise .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }
@supports (animation-timeline: view()) {
.cf-faq-chat__bubble { animation-timeline: view(); animation-range: entry 0% entry 70%; animation-delay: 0s; }
}
}
@media (prefers-reduced-motion: reduce) {
.cf-faq-chat *, .cf-faq-chat *::before, .cf-faq-chat *::after { animation: none !important; transition: none !important; }
.cf-faq-chat__btn:not(:disabled):active, .cf-faq-chat__btn[data-state="active"]:not(:disabled) { transform: none; }
}
@media (max-width: 960px) {
.cf-faq-chat__board { grid-template-columns: minmax(0, 1fr); max-width: 48rem; margin-inline: auto; }
}
@media (max-width: 560px) {
.cf-faq-chat__contact { margin-top: 24px; }
.cf-faq-chat__thread { margin-top: 32px; gap: 24px; }
.cf-faq-chat__pair { gap: 8px; }
.cf-faq-chat__row { gap: 8px; }
.cf-faq-chat__row--you { grid-template-columns: minmax(0, 1fr) 32px; }
.cf-faq-chat__row--founder { grid-template-columns: 32px minmax(0, 1fr); }
.cf-faq-chat__avatar:not(.cf-faq-chat__avatar--lg), .cf-faq-chat__you { width: 32px; height: 32px; font-size: 14px; }
.cf-faq-chat__bubble--q { padding: 12px 16px; }
.cf-faq-chat__bubble--a { padding: 16px; }
.cf-faq-chat__ledger { padding: 12px; }
.cf-faq-chat__lines { gap: 8px; }
.cf-faq-chat__line, .cf-faq-chat__total { gap: 8px; }
.cf-faq-chat__thumb { width: 40px; height: 40px; }
.cf-faq-chat__board { gap: 12px; }
.cf-faq-chat__facts { gap: 8px; }
.cf-faq-chat__tile { padding: 16px 12px; text-align: center; justify-content: flex-start; }
.cf-faq-chat__close { padding: 24px 20px; }
}
`;
pieces/content/faq-chat/specimen.tsx 31 lines
import __studioImage50e78155 from "../assets/439c986818a54a57.webp";
import * as React from "react";
import { FaqChat } from "../faq-chat";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
const sample = defaults.sample;
export const states = ["default", "hover", "active", "disabled"];
export default function FaqChatSpecimen({ state = "default" }: { state?: "default" | "hover" | "active" | "disabled" }) {
const items = sample.items.map((item, index) => ({
name: item.name,
value: item.value,
image: slot(`item-${index + 1}`, item.image),
imageAlt: item.imageAlt,
}));
return (
<FaqChat
founderName="Jordan Hale"
founderRole={`Creator of ${sample.name}`}
presenterImage={slot("presenter", __studioImage50e78155)}
presenterAlt={`Jordan Hale, creator of ${sample.name}`}
items={items}
regularPrice={sample.regularPrice}
price={sample.price}
priceNote={sample.note}
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFaqChat |
React.ReactNode |
|
lead OptionalFaqChat |
React.ReactNode |
|
founderName OptionalFaqChat |
string |
|
founderRole OptionalFaqChat |
string |
|
presenterImage OptionalFaqChat |
string |
|
presenterAlt OptionalFaqChat |
string |
|
youLabel OptionalFaqChat |
string |
|
messages OptionalFaqChat |
FaqChatMessage[] |
|
items OptionalFaqChat |
FaqChatLedgerItem[] |
|
totalLabel OptionalFaqChat |
string |
|
regularPrice OptionalFaqChat |
string |
|
todayLabel OptionalFaqChat |
string |
|
price OptionalFaqChat |
string |
|
priceNote OptionalFaqChat |
string |
|
facts OptionalFaqChat |
FaqChatFact[] |
|
closeHeadline OptionalFaqChat |
React.ReactNode |
|
label OptionalFaqChat |
string |
|
note OptionalFaqChat |
React.ReactNode |
|
href OptionalFaqChat |
string |
|
onAction OptionalFaqChat |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalFaqChat |
boolean |
|
state OptionalFaqChat |
"default" | "hover" | "active" | "disabled" |
|
className OptionalFaqChat |
string |
|
copy OptionalFaqChat |
{
threadLabel?: string;
youAsked?: string;
founderAnswers?: string;
founderFallback?: string;
factsLabel?: string;
ledgerLabel?: 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-focus--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-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.
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.
presenter- A photo of the host, coach or founder.
-
439c986818a54a57.webp
image/webp · 83.3 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB