Formula Fill In 1
Formula fill-in: the product's core formula shown blank on a dark field (before), then filled in on the light side
Use it in a prompt
Use content/formula-fill-in 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/formula-fill-in.tsx. - Import it and pass your copy and images (Props tab):
import { FormulaFillIn } from "@/components/funneldna/content/formula-fill-in"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/formula-fill-in/component.tsx 374 lines
// layout: diagonal-split
// Formula fill-in: the product's core formula shown blank on a dark field (before), then filled in on the light side
// with worked examples and the reader's own words (after), so they use one piece of the product before they buy it.
import React, { useId, useMemo, useRef, useState } from 'react';
import { AlertCircle, PenLine, ShieldCheck } from 'lucide-react';
export type FormulaBlank = {
key: string; // matches {key} in the formula
label: string; // the blank's name: shown in the blueprint, in the empty line and as the field label
placeholder?: string; // a realistic example answer for the field
maxLength?: number; // soft limit; past it the field shows an inline error (default 48)
};
export type FormulaExample = {
label: string; // tab name: the channel, niche or use
values: Record<string, string>; // words for each blank, by key
};
export type FormulaFillInCopy = {
tabsLabel: string; // accessible name of the tab row
yoursTab: string;
wellTitle: string;
emptyHint: string;
fieldPlaceholder: string; // fallback placeholder for a blank without one
tooLong: string; // {max} is replaced with the blank's limit
};
export type FormulaFillInProps = {
headline?: React.ReactNode;
lead?: React.ReactNode;
aside?: React.ReactNode; // italic aside in the author's voice
formula?: string; // the template, blanks written as {key}
blanks?: FormulaBlank[];
examples?: FormulaExample[]; // worked examples, one tab each
moreLine?: React.ReactNode; // what else is inside (a count only if supplied)
productImage?: string; // slot: product
productImageAlt?: string;
price?: string;
priceNote?: string; // sits beside the price, e.g. once
priceBreakdown?: string; // supplied per-day or per-use breakdown under the price
actionLabel?: string;
reassurance?: string; // one short line under the button
href?: string;
onAction?: () => void;
disabled?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled';
copy?: Partial<FormulaFillInCopy>;
className?: string;
};
const DEFAULT_FORMULA = 'How to {result} in {timeframe} without {pain}';
const DEFAULT_BLANKS: FormulaBlank[] = [
{ key: 'result', label: 'Result', placeholder: 'land your first five clients' },
{ key: 'timeframe', label: 'Timeframe', placeholder: 'thirty days' },
{ key: 'pain', label: 'Pain', placeholder: 'cold calling' },
];
const DEFAULT_EXAMPLES: FormulaExample[] = [
{ label: 'Coaching', values: { result: 'fill your first group program', timeframe: 'six weeks', pain: 'posting every day' } },
{ label: 'Online course', values: { result: 'sell your first course', timeframe: 'one weekend', pain: 'a big audience' } },
{ label: 'Local shop', values: { result: 'fill your quiet weekdays', timeframe: 'two weeks', pain: 'discount coupons' } },
];
const DEFAULT_COPY: FormulaFillInCopy = {
tabsLabel: 'Worked examples',
yoursTab: 'Write yours',
wellTitle: 'Try it with your own words',
emptyHint: 'Type into the blanks below and watch your line come together.',
fieldPlaceholder: 'Type your words',
tooLong: 'Keep it under {max} characters so the line reads cleanly.',
};
export function FormulaFillIn(props: FormulaFillInProps) {
const {
headline = 'Fill in the blanks. Watch your headline write itself.',
lead = 'This is one of the formulas inside. Tap an example, or type your own words and see the line come together.',
aside,
formula = DEFAULT_FORMULA,
blanks = DEFAULT_BLANKS,
examples = DEFAULT_EXAMPLES,
moreLine = 'Every formula inside works just like this one.',
productImage,
productImageAlt = '',
price,
priceNote = 'once',
priceBreakdown,
actionLabel = 'Start writing my headlines',
reassurance,
href,
onAction,
disabled = false,
state = 'default',
copy,
className,
} = props;
const t: FormulaFillInCopy = { ...DEFAULT_COPY, ...copy };
const uid = useId();
const parts = useMemo(() => parseFormula(formula), [formula]);
const yoursIndex = examples.length;
const [active, setActive] = useState(examples.length > 0 ? 0 : yoursIndex);
const [values, setValues] = useState<Record<string, string>>({});
const [focusKey, setFocusKey] = useState<string | null>(null);
const tabRefs = useRef<Array<HTMLButtonElement | null>>([]);
const safeActive = Math.min(active, yoursIndex);
const isYours = safeActive === yoursIndex;
const current = isYours ? values : examples[safeActive]?.values ?? {};
const allEmpty = blanks.every((b) => !(values[b.key] ?? '').trim());
const tabLabels = [...examples.map((e) => e.label), t.yoursTab];
const labelOf = (key: string) => blanks.find((b) => b.key === key)?.label ?? key;
const onTabKey = (e: React.KeyboardEvent<HTMLButtonElement>, i: number) => {
const count = tabLabels.length;
let next = -1;
if (e.key === 'ArrowRight') next = (i + 1) % count;
else if (e.key === 'ArrowLeft') next = (i - 1 + count) % count;
else if (e.key === 'Home') next = 0;
else if (e.key === 'End') next = count - 1;
if (next < 0) return;
e.preventDefault();
setActive(next);
tabRefs.current[next]?.focus();
};
const isDisabled = disabled || state === 'disabled';
const btnClass = 'cf-ffi-btn' + (state === 'hover' ? ' is-hover' : '') + (state === 'active' ? ' is-active' : '');
const action =
href && !isDisabled ? (
<a className={btnClass} href={href} onClick={() => onAction?.()}>
{actionLabel}
</a>
) : (
<button type='button' className={btnClass} disabled={isDisabled} onClick={() => onAction?.()}>
{actionLabel}
</button>
);
return (
<section className={['cf-ffi', className].filter(Boolean).join(' ')} aria-labelledby={`${uid}-h`}>
<style>{CSS}</style>
<div className='cf-ffi-field' aria-hidden='true' />
<div className='cf-ffi-wrap'>
<div className='cf-ffi-head'>
<h2 id={`${uid}-h`} className='cf-ffi-h2'>
{headline}
</h2>
{lead ? <p className='cf-ffi-lead'>{lead}</p> : null}
{aside ? <p className='cf-ffi-aside'>{aside}</p> : null}
<p className='cf-ffi-blueprint'>
{parts.map((p, i) =>
p.kind === 'text' ? (
<React.Fragment key={i}>{p.text}</React.Fragment>
) : (
<span key={i} className={'cf-ffi-slot' + (focusKey === p.key ? ' is-on' : '')}>
{labelOf(p.key)}
</span>
),
)}
</p>
</div>
<div className='cf-ffi-card'>
<div className='cf-ffi-tabs' role='tablist' aria-label={t.tabsLabel}>
{tabLabels.map((label, i) => (
<button
key={i}
ref={(el) => {
tabRefs.current[i] = el;
}}
type='button'
role='tab'
id={`${uid}-t${i}`}
aria-selected={i === safeActive}
aria-controls={`${uid}-p`}
tabIndex={i === safeActive ? 0 : -1}
className='cf-ffi-tab'
onClick={() => setActive(i)}
onKeyDown={(e) => onTabKey(e, i)}
>
{i === yoursIndex ? <PenLine className='cf-ffi-tab-icon' size={16} strokeWidth={2.5} aria-hidden='true' /> : null}
{label}
</button>
))}
</div>
<div className='cf-ffi-panel' role='tabpanel' id={`${uid}-p`} aria-labelledby={`${uid}-t${safeActive}`}>
<p key={isYours ? 'yours' : `ex-${safeActive}`} className='cf-ffi-line'>
{parts.map((p, i) => {
if (p.kind === 'text') return <React.Fragment key={i}>{p.text}</React.Fragment>;
const word = (current[p.key] ?? '').trim();
return word ? (
<span key={i} className='cf-ffi-fill'>
{word}
</span>
) : (
<span key={i} className='cf-ffi-gap'>
{labelOf(p.key)}
</span>
);
})}
</p>
{isYours && allEmpty ? <p className='cf-ffi-hint'>{t.emptyHint}</p> : null}
</div>
<fieldset className='cf-ffi-well'>
<legend className='cf-ffi-legend'>{t.wellTitle}</legend>
<div className='cf-ffi-fields'>
{blanks.map((b) => {
const id = `${uid}-f-${b.key}`;
const v = values[b.key] ?? '';
const max = b.maxLength ?? 48;
const err = v.length > max;
return (
<div key={b.key} className='cf-ffi-row'>
<label htmlFor={id} className='cf-ffi-label'>
{b.label}
</label>
<input
id={id}
className='cf-ffi-input'
type='text'
value={v}
placeholder={b.placeholder ?? t.fieldPlaceholder}
autoComplete='off'
aria-invalid={err || undefined}
aria-describedby={err ? `${id}-e` : undefined}
onChange={(e) => {
const next = e.target.value;
setValues((prev) => ({ ...prev, [b.key]: next }));
setActive(yoursIndex);
}}
onFocus={() => setFocusKey(b.key)}
onBlur={() => setFocusKey((k) => (k === b.key ? null : k))}
/>
{err ? (
<p id={`${id}-e`} className='cf-ffi-error' role='alert'>
<AlertCircle className='cf-ffi-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{t.tooLong.replace('{max}', String(max))}
</p>
) : null}
</div>
);
})}
</div>
</fieldset>
</div>
<div className='cf-ffi-offer'>
<div className={'cf-ffi-offer-top' + (productImage ? ' has-img' : '')}>
{productImage ? (
<img className='cf-ffi-product' src={productImage} alt={productImageAlt} width={136} height={136} loading='lazy' />
) : null}
<div className='cf-ffi-offer-copy'>
{moreLine ? <p className='cf-ffi-more'>{moreLine}</p> : null}
{price ? (
<p className='cf-ffi-price'>
<span className='cf-ffi-num'>{price}</span>
{priceNote ? <span className='cf-ffi-note'>{priceNote}</span> : null}
</p>
) : null}
{priceBreakdown ? <p className='cf-ffi-perday'>{priceBreakdown}</p> : null}
</div>
</div>
<div className='cf-ffi-action'>
{action}
{reassurance ? (
<p className='cf-ffi-reassure'>
<ShieldCheck className='cf-ffi-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</div>
</div>
</section>
);
}
export default FormulaFillIn;
type Part = { kind: 'text'; text: string } | { kind: 'blank'; key: string };
function parseFormula(f: string): Part[] {
const out: Part[] = [];
let i = 0;
while (i < f.length) {
const open = f.indexOf('{', i);
const close = open < 0 ? -1 : f.indexOf('}', open);
if (open < 0 || close < 0) {
out.push({ kind: 'text', text: f.slice(i) });
break;
}
if (open > i) out.push({ kind: 'text', text: f.slice(i, open) });
out.push({ kind: 'blank', key: f.slice(open + 1, close).trim() });
i = close + 1;
}
return out;
}
const CSS = `
.cf-ffi{--ffi-pt:clamp(56px,8vw,112px);--ffi-pb:clamp(64px,8.5vw,120px);--ffi-g:clamp(16px,5vw,48px);--o-ink:var(--ink);position:relative;isolation:isolate;overflow-x:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:var(--ffi-pt) 0 var(--ffi-pb)}
.cf-ffi,.cf-ffi *,.cf-ffi *::before,.cf-ffi *::after{box-sizing:border-box}
.cf-ffi-field{display:none;position:absolute;inset:0;z-index:-1;background:var(--surface);clip-path:polygon(calc(50% + 160px) 0,100% 0,100% 100%,calc(50% - 8px) 100%)}
.cf-ffi-wrap{width:min(1120px,calc(100% - 2 * var(--ffi-g)));margin-inline:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'head' 'card' 'offer';row-gap:32px}
.cf-ffi-head{grid-area:head;position:relative;min-width:0;margin:calc(-1 * var(--ffi-pt)) calc(-1 * var(--ffi-g)) 0;padding:var(--ffi-pt) var(--ffi-g) 80px;background:var(--band);color:var(--band-ink);clip-path:polygon(0 0,100% 0,100% calc(100% - 48px),0 100%)}
.cf-ffi-h2{margin:0 0 16px;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(--band-ink)}
.cf-ffi-lead{margin:0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:var(--band-ink)}
.cf-ffi-aside{margin:12px 0 0;max-width:60ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-style:italic;text-wrap:pretty;color:var(--band-ink)}
.cf-ffi-blueprint{margin:32px 0 0;padding:clamp(20px,3vw,28px);border-radius:var(--radius,12px);background:color-mix(in oklch,var(--band-ink) 8%,var(--band));font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.7;font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-wrap:balance;color:var(--band-ink)}
.cf-ffi-slot{display:inline-block;padding:0 .3em;border-bottom:3px solid oklch(from var(--band-ink) l c h / .5);border-radius:6px 6px 0 0;font-weight:500;line-height:1.25;transition:background-color .16s ease,border-color .16s ease}
.cf-ffi-slot.is-on{background:oklch(from var(--band-ink) l c h / .16);border-bottom-color:var(--band-ink)}
.cf-ffi-card{grid-area:card;align-self:start;position:relative;z-index:1;margin-top:-72px;min-width:0;display:grid;gap:24px;padding:clamp(20px,3vw,32px);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,var(--shadow-lg))}
.cf-ffi-tabs{display:flex;flex-wrap:wrap;gap:8px}
.cf-ffi-tab{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--ink);font-family:var(--font-body);font-size:.9375rem;font-weight:700;line-height:1.2;cursor:pointer;transition:background-color .16s ease,color .16s ease,transform .16s ease}
.cf-ffi-tab:hover{background:color-mix(in oklch,var(--ink) 11%,var(--card))}
.cf-ffi-tab:active{transform:translateY(1px)}
.cf-ffi-tab[aria-selected='true'],.cf-ffi-tab[aria-selected='true']:hover{background:var(--ink);color:var(--card);box-shadow:var(--shadow-sm)}
.cf-ffi-tab:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .5);outline-offset:2px}
.cf-ffi-tab-icon{flex:none}
.cf-ffi-panel{min-width:0}
.cf-ffi-line{margin:0;min-height:2.6em;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.3;font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-wrap:balance;overflow-wrap:anywhere;color:var(--ink);animation:cf-ffi-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-ffi-fill{color:var(--accent)}
.cf-ffi-gap{display:inline-block;padding:0 .25em;border-bottom:2px solid oklch(from var(--ink) l c h / .3);font-weight:500;line-height:1.2;color:var(--muted)}
.cf-ffi-hint{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-ffi-well{margin:0;padding:20px;min-width:0;border:0;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-ffi-legend{float:left;width:100%;margin:0 0 16px;padding:0;font-size:1.0625rem;line-height:1.3;font-weight:700;color:var(--ink)}
.cf-ffi-fields{clear:both;display:grid;gap:16px}
.cf-ffi-row{min-width:0}
.cf-ffi-label{display:block;margin:0 0 8px;font-size:1rem;line-height:1.3;font-weight:700;color:var(--label-ink,var(--ink))}
.cf-ffi-input{display:block;width:100%;height:56px;padding:0 16px;font-family:var(--font-body);font-size:1.0625rem;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));box-shadow:inset 0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .08);appearance:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-ffi-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-ffi-input:hover{border-color:color-mix(in oklch,var(--ink) 38%,transparent)}
.cf-ffi-input:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-ffi-input[aria-invalid='true']{border-color:var(--danger)}
.cf-ffi-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-ffi-error{margin:8px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
.cf-ffi-inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-ffi-offer{grid-area:offer;min-width:0;margin-top:8px;color:var(--o-ink)}
.cf-ffi-offer-top{display:grid;grid-template-columns:minmax(0,1fr);gap:16px 20px;align-items:start}
.cf-ffi-offer-top.has-img{grid-template-columns:104px minmax(0,1fr)}
.cf-ffi-product{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;object-position:center;border-radius:12px}
.cf-ffi-more{margin:0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:700;text-wrap:pretty}
.cf-ffi-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:16px 0 0}
.cf-ffi-num{font-family:var(--font-display);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;font-weight:var(--display-weight,800);letter-spacing:-0.03em;font-variant-numeric:tabular-nums}
.cf-ffi-note{font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.2;font-weight:600}
.cf-ffi-perday{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-ffi-action{margin-top:24px;display:grid;justify-items:stretch;gap:12px}
.cf-ffi-btn{--b:var(--button-bg,var(--cta));display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:72px;padding:12px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--b) calc(l + .04) c h),var(--button-bg-2,var(--cta-2)));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-size:clamp(1.125rem,1.55vw,1.375rem);font-weight:var(--button-weight,800);line-height:1.15;text-transform:var(--button-case,none);text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:inset 0 1px 0 oklch(from var(--b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .16) c h),var(--button-shadow,0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .3),0 8px 16px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-ffi-btn:hover:not(:disabled),.cf-ffi-btn.is-hover{background:linear-gradient(oklch(from var(--b) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .05) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--b) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .2) c h),0 2px 3px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .32),0 12px 20px -8px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .55)}
.cf-ffi-btn:active:not(:disabled),.cf-ffi-btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--b) calc(l - .06) c h),oklch(from var(--b) calc(l - .1) c h));box-shadow:inset 0 2px 4px oklch(from var(--b) calc(l - .24) c h / .55),inset 0 -2px 0 oklch(from var(--b) calc(l - .18) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .3)}
.cf-ffi-btn:focus-visible{outline:3px solid var(--o-ink);outline-offset:3px}
.cf-ffi-btn:disabled{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;transform:none;box-shadow:var(--shadow-sm)}
.cf-ffi-reassure{margin:0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--o-ink);text-align:center;text-wrap:balance}
@keyframes cf-ffi-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:519px){
.cf-ffi-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:960px){
.cf-ffi{--o-ink:var(--band-ink);background:var(--band)}
.cf-ffi-field{display:block}
.cf-ffi-head{margin:0;padding:0;background:none;clip-path:none}
.cf-ffi-card{margin-top:0}
.cf-ffi-wrap{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'head card' 'offer card';grid-template-rows:auto 1fr;column-gap:clamp(32px,5vw,72px);row-gap:40px;align-items:start}
.cf-ffi-offer{margin-top:0}
.cf-ffi-offer-top.has-img{grid-template-columns:136px minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
.cf-ffi-line{animation:none}
.cf-ffi-tab,.cf-ffi-btn,.cf-ffi-input,.cf-ffi-slot{transition:none}
.cf-ffi-btn:hover:not(:disabled),.cf-ffi-btn.is-hover,.cf-ffi-btn:active:not(:disabled),.cf-ffi-btn.is-active,.cf-ffi-tab:active{transform:none}
}
`;
pieces/content/formula-fill-in/specimen.tsx 40 lines
import React from 'react';
import { FormulaFillIn } from '../formula-fill-in';
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 FormulaFillInSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample;
const workbook = sample.items[1];
return (
<FormulaFillIn
state={state}
headline='Fill in three blanks. Get a headline that sells.'
lead={`This is one of the headline formulas inside ${sample.name}. Tap an example, or type your own words and watch your line come together.`}
aside='(I know. I didn’t believe three blanks could do it either.)'
formula='How to {result} in {timeframe} without {pain}'
blanks={[
{ key: 'result', label: 'Result', placeholder: 'launch your first offer', maxLength: 40 },
{ key: 'timeframe', label: 'Timeframe', placeholder: 'two weeks', maxLength: 24 },
{ key: 'pain', label: 'Pain', placeholder: 'a big ad budget', maxLength: 32 },
]}
examples={[
{ label: 'Sales page', values: { result: 'plan your first funnel', timeframe: 'one weekend', pain: 'hiring a designer' } },
{ label: 'Email', values: { result: 'fill your workshop seats', timeframe: 'seven days', pain: 'a big email list' } },
{ label: 'Ad', values: { result: 'write an ad people click', timeframe: 'one afternoon', pain: 'guessing at the copy' } },
]}
moreLine={`There are 24 more formulas like this inside the ${workbook.name}.`}
productImage={slot('product', workbook.image)}
productImageAlt={workbook.imageAlt}
price={sample.price}
priceNote='once'
priceBreakdown='about $1.57 a day for a month'
actionLabel='Start writing my headlines'
reassurance={sample.reassurance.join(' · ')}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFormulaFillIn |
React.ReactNode |
|
lead OptionalFormulaFillIn |
React.ReactNode |
|
aside OptionalFormulaFillIn |
React.ReactNode |
|
formula OptionalFormulaFillIn |
string |
|
blanks OptionalFormulaFillIn |
FormulaBlank[] |
|
examples OptionalFormulaFillIn |
FormulaExample[] |
|
moreLine OptionalFormulaFillIn |
React.ReactNode |
|
productImage OptionalFormulaFillIn |
string |
|
productImageAlt OptionalFormulaFillIn |
string |
|
price OptionalFormulaFillIn |
string |
|
priceNote OptionalFormulaFillIn |
string |
|
priceBreakdown OptionalFormulaFillIn |
string |
|
actionLabel OptionalFormulaFillIn |
string |
|
reassurance OptionalFormulaFillIn |
string |
|
href OptionalFormulaFillIn |
string |
|
onAction OptionalFormulaFillIn |
() => void |
|
disabled OptionalFormulaFillIn |
boolean |
|
state OptionalFormulaFillIn |
'default' | 'hover' | 'active' | 'disabled' |
|
copy OptionalFormulaFillIn |
Partial<FormulaFillInCopy> |
|
className OptionalFormulaFillIn |
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.
--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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB