Challenge Day 1
Challenge day: today’s lesson, homework checklist, community thread and tomorrow’s teaser scroll beside a sticky offer letter, so every day of the challenge carries the one action forward.
Use it in a prompt
Use content/challenge-day 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/challenge-day.tsx. - Import it and pass your copy and images (Props tab):
import { ChallengeDay } from "@/components/funneldna/content/challenge-day"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/challenge-day/component.tsx 668 lines
// layout: sticky-offer-side
// Challenge day: today’s lesson, homework checklist, community thread and tomorrow’s teaser scroll beside a sticky offer letter, so every day of the challenge carries the one action forward.
import * as React from 'react';
import { useEffect, useId, useRef, useState } from 'react';
import { AlertCircle, Check, Clock, Lock, MessagesSquare, Sparkles } from 'lucide-react';
export type ChallengeDayState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export type ChallengeTask = {
title: string;
// one short line under the task
detail?: string;
// effort chip, e.g. '15 min'
time?: string;
};
export type ChallengeDayCopy = {
// before the headline; {n} = today’s day number
dayPrefix: string;
// accessible name of the progress rail
railLabel: string;
// under each progress marker; {n} = day number
railDay: string;
// under today’s marker
railToday: string;
statusDone: string;
statusToday: string;
statusUpcoming: string;
// homework counter; {done} and {total}
doneCount: string;
tomorrowLabel: string;
// small word above tomorrow’s numeral
tomorrowDayWord: string;
// shown when the guarantee box is unticked on click
agreeError: string;
};
export type ChallengeDayProps = {
// today’s day number, 1-based
day?: number;
// every day of the challenge, in order
days?: { title: string }[];
// today’s goal, shown after the day prefix
headline?: React.ReactNode;
lead?: React.ReactNode;
// the page’s real lesson embed; replaces the lesson still
video?: React.ReactNode;
// slot: scene
lessonImage?: string;
lessonImageAlt?: string;
videoNote?: React.ReactNode;
homeworkTitle?: React.ReactNode;
tasks?: ChallengeTask[];
// task indexes already ticked
initialDone?: number[];
onTaskToggle?: (index: number, done: boolean) => void;
communityTitle?: React.ReactNode;
communityBody?: React.ReactNode;
communityLabel?: string;
communityHref?: string;
onCommunity?: () => void;
// defaults to the next day’s title
tomorrowTitle?: React.ReactNode;
// fascination bullets for tomorrow
tomorrowBullets?: React.ReactNode[];
offerTitle?: React.ReactNode;
// slot: product (transparent cut-out)
productImage?: string;
productImageAlt?: string;
salutation?: string;
// letter paragraphs before the investment line
letter?: React.ReactNode[];
investmentLabel?: string;
price?: string;
priceNote?: string;
closing?: string;
signer?: string;
agreeLabel?: React.ReactNode;
label?: string;
sublabel?: string;
href?: string;
onAction?: () => void;
disabled?: boolean;
state?: ChallengeDayState;
copy?: Partial<ChallengeDayCopy>;
className?: string;
};
const DEFAULT_COPY: ChallengeDayCopy = {
dayPrefix: 'Day {n}:',
railLabel: 'Your challenge progress',
railDay: 'Day {n}',
railToday: 'Today',
statusDone: 'complete',
statusToday: 'today',
statusUpcoming: 'coming up',
doneCount: '{done} of {total} done',
tomorrowLabel: 'Opens tomorrow',
tomorrowDayWord: 'Day',
agreeError: 'Tick the box to confirm you’ve read the guarantee.',
};
const DEFAULT_DAYS = [
{ title: 'Pick the one person you’ll sell to' },
{ title: 'Write your one-sentence offer' },
{ title: 'Map every page your funnel needs' },
{ title: 'Draft your page copy' },
{ title: 'Check it and launch' },
];
const DEFAULT_TASKS: ChallengeTask[] = [
{ title: 'Watch today’s lesson', detail: 'Note the three parts of a clear offer.', time: '20 min' },
{ title: 'Write three versions of your offer sentence', detail: 'Who it’s for, what they get, and how fast.', time: '15 min' },
{ title: 'Pick one and read it out loud', detail: 'If it sounds like you, it’s the one.', time: '5 min' },
];
const DEFAULT_TEASERS = [
'Why your first funnel needs fewer pages than you think',
'The one page most first funnels forget, and how to write it fast',
];
const DEFAULT_LETTER = [
'Want every worksheet for the rest of the challenge tonight? The Funnel Starter Kit puts the guide, workbook and checklist in one download.',
];
export function ChallengeDay(props: ChallengeDayProps) {
const {
day = 2,
days = DEFAULT_DAYS,
headline = 'Write the one-sentence offer your funnel sells',
lead = 'Your offer is the big domino. Get it into one clear sentence today and every page you build this week gets easier to write.',
video,
lessonImage,
lessonImageAlt = '',
videoNote = 'Watch today’s lesson first, then tick off your homework below.',
homeworkTitle = 'Do these three things before Day 3',
tasks = DEFAULT_TASKS,
initialDone = [0],
onTaskToggle,
communityTitle = 'Post your offer sentence in the group',
communityBody = 'Drop it in today’s thread and get honest feedback before Day 3.',
communityLabel = 'Open the Challenge Group',
communityHref,
onCommunity,
tomorrowTitle,
tomorrowBullets = DEFAULT_TEASERS,
offerTitle = 'Get every worksheet before Day 3',
productImage,
productImageAlt = '',
salutation = 'Dear friend,',
letter = DEFAULT_LETTER,
investmentLabel = 'Your investment:',
price = '$47',
priceNote = 'One payment · Lifetime access',
closing = 'Talk soon,',
signer = '',
agreeLabel = 'I understand I’m covered by the 30-day money-back guarantee.',
label = 'Send Me The Starter Kit',
sublabel = 'Secure checkout · Instant download',
href,
onAction,
disabled = false,
state = 'default',
copy,
className,
} = props;
const c: ChallengeDayCopy = { ...DEFAULT_COPY, ...copy };
const total = Math.max(days.length, 1);
const today = Math.min(Math.max(Math.round(day), 1), total);
const progress = total > 1 ? (today - 1) / (total - 1) : 0;
const next = today < days.length ? days[today] : undefined;
const teaserTitle = tomorrowTitle ?? next?.title;
const showTeaser = today < days.length && Boolean(teaserTitle);
const uid = useId();
const errId = `${uid}-agree-error`;
const agreeRef = useRef<HTMLInputElement>(null);
const [done, setDone] = useState<number[]>(() => initialDone.filter((i) => i >= 0 && i < tasks.length));
const [agreed, setAgreed] = useState(state !== 'error');
const [showError, setShowError] = useState(state === 'error');
useEffect(() => {
setAgreed(state !== 'error');
setShowError(state === 'error');
}, [state]);
const isDisabled = disabled || state === 'disabled';
const forced = state === 'hover' || state === 'active' ? state : undefined;
const doneCount = done.length;
const allDone = tasks.length > 0 && doneCount >= tasks.length;
const pct = tasks.length ? Math.round((doneCount / tasks.length) * 100) : 0;
const toggleTask = (i: number, checked: boolean) => {
setDone((prev) => (checked ? (prev.includes(i) ? prev : [...prev, i]) : prev.filter((x) => x !== i)));
onTaskToggle?.(i, checked);
};
const handleAction = (e: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
e.preventDefault();
return;
}
if (!agreed) {
e.preventDefault();
setShowError(true);
agreeRef.current?.focus();
return;
}
onAction?.();
};
return (
<div className={['cf-challenge-day', className].filter(Boolean).join(' ')}>
<style>{CSS}</style>
<div className='cf-cd__main'>
<header className='cf-cd__head cf-cd__in' style={rise(0)}>
<div className='cf-cd__railwrap' style={{ '--cd-n': total, '--cd-p': progress } as React.CSSProperties}>
<span className='cf-cd__track' aria-hidden='true' />
<span className='cf-cd__fill' aria-hidden='true' />
<ol className='cf-cd__rail' aria-label={c.railLabel}>
{days.map((d, i) => {
const n = i + 1;
const status = n < today ? 'done' : n === today ? 'today' : 'upcoming';
const statusText = status === 'done' ? c.statusDone : status === 'today' ? c.statusToday : c.statusUpcoming;
return (
<li key={i} className='cf-cd__step' data-status={status} aria-current={status === 'today' ? 'step' : undefined}>
<span className='cf-cd__marker' aria-hidden='true'>
{status === 'done' ? <Check size={16} strokeWidth={3} /> : n}
</span>
<span className='cf-cd__stepday' aria-hidden='true'>
{status === 'today' ? c.railToday : fill(c.railDay, { n })}
</span>
<span className='cf-cd__steptitle'>{d.title}</span>
<span className='cf-cd__sr'>
{fill(c.railDay, { n })}, {statusText}
</span>
</li>
);
})}
</ol>
</div>
<h2 className='cf-cd__h2'>
<span className='cf-cd__dayno'>{fill(c.dayPrefix, { n: today })}</span> {headline}
</h2>
{lead ? <p className='cf-cd__lead'>{lead}</p> : null}
</header>
{video || lessonImage ? (
<figure className='cf-cd__lesson cf-cd__in' style={rise(1)}>
<div className='cf-cd__media'>
{video ?? <img src={lessonImage} alt={lessonImageAlt} width={1280} height={720} loading='lazy' decoding='async' />}
</div>
{videoNote ? (
<figcaption className='cf-cd__caption'>
<Clock size={16} strokeWidth={2.5} className='cf-cd__inl' aria-hidden='true' />
{videoNote}
</figcaption>
) : null}
</figure>
) : null}
{tasks.length ? (
<section className='cf-cd__card cf-cd__in' style={rise(2)} aria-labelledby={`${uid}-hw`}>
<div className='cf-cd__hwhead'>
<h3 id={`${uid}-hw`} className='cf-cd__h3'>
{homeworkTitle}
</h3>
<span className='cf-cd__chip' data-done={allDone ? 'true' : undefined} aria-live='polite'>
{fill(c.doneCount, { done: doneCount, total: tasks.length })}
</span>
</div>
<div className='cf-cd__bar' aria-hidden='true'>
<span style={{ width: `${pct}%` }} data-done={allDone ? 'true' : undefined} />
</div>
<ul className='cf-cd__tasks'>
{tasks.map((t, i) => {
const on = done.includes(i);
const id = `${uid}-task-${i}`;
return (
<li key={i}>
<label className='cf-cd__task' htmlFor={id} data-on={on ? 'true' : undefined}>
<span className='cf-cd__boxwrap'>
<input id={id} type='checkbox' className='cf-cd__native' checked={on} onChange={(e) => toggleTask(i, e.target.checked)} />
<span className='cf-cd__box' aria-hidden='true'>
<Check size={16} strokeWidth={3} />
</span>
</span>
<span className='cf-cd__tasktext'>
<span className='cf-cd__tasktitle'>{t.title}</span>
{t.detail ? <span className='cf-cd__taskdetail'>{t.detail}</span> : null}
</span>
{t.time ? <span className='cf-cd__chip cf-cd__time'>{t.time}</span> : null}
</label>
</li>
);
})}
</ul>
</section>
) : null}
{communityTitle ? (
<section className='cf-cd__community cf-cd__in' style={rise(3)}>
<span className='cf-cd__disc' aria-hidden='true'>
<MessagesSquare size={20} strokeWidth={2.5} />
</span>
<div className='cf-cd__commtext'>
<h3 className='cf-cd__h3'>{communityTitle}</h3>
{communityBody ? <p className='cf-cd__commbody'>{communityBody}</p> : null}
</div>
{communityLabel ? (
communityHref ? (
<a className='cf-cd__btn2' href={communityHref} onClick={() => onCommunity?.()}>
{communityLabel}
</a>
) : (
<button type='button' className='cf-cd__btn2' onClick={() => onCommunity?.()}>
{communityLabel}
</button>
)
) : null}
</section>
) : null}
{showTeaser ? (
<section className='cf-cd__tomorrow cf-cd__in' style={rise(4)}>
<div className='cf-cd__tnum' aria-hidden='true'>
<span className='cf-cd__tword'>{c.tomorrowDayWord}</span>
<span className='cf-cd__tdigit'>{today + 1}</span>
</div>
<div className='cf-cd__tbody'>
<p className='cf-cd__tlabel'>
<Lock size={16} strokeWidth={2.5} className='cf-cd__inl' aria-hidden='true' />
{c.tomorrowLabel}
</p>
<h3 className='cf-cd__h3'>
<span className='cf-cd__sr'>{fill(c.railDay, { n: today + 1 })}: </span>
{teaserTitle}
</h3>
{tomorrowBullets.length ? (
<ul className='cf-cd__fasc'>
{tomorrowBullets.map((b, i) => (
<li key={i}>
<Sparkles size={18} strokeWidth={2.5} aria-hidden='true' />
<span>{b}</span>
</li>
))}
</ul>
) : null}
</div>
</section>
) : null}
</div>
<aside className='cf-cd__aside'>
<div className='cf-cd__offer cf-cd__in' style={rise(1)}>
{productImage ? <img className='cf-cd__product' src={productImage} alt={productImageAlt} width={480} height={300} decoding='async' /> : null}
<h3 className='cf-cd__h3 cf-cd__offertitle'>{offerTitle}</h3>
<div className='cf-cd__letter'>
{salutation ? <p className='cf-cd__salute'>{salutation}</p> : null}
{letter.map((p, i) => (
<p key={i}>{p}</p>
))}
{price ? (
<p className='cf-cd__invest'>
<span className='cf-cd__sc'>{investmentLabel}</span> <strong className='cf-cd__price'>{price}</strong>
{priceNote ? <span className='cf-cd__pnote'>{priceNote}</span> : null}
</p>
) : null}
{closing ? <p className='cf-cd__closing'>{closing}</p> : null}
{signer ? <p className='cf-cd__sig'>{signer}</p> : null}
</div>
<div className='cf-cd__commit' data-error={showError ? 'true' : undefined}>
<label className='cf-cd__agree' htmlFor={`${uid}-agree`}>
<span className='cf-cd__boxwrap'>
<input
ref={agreeRef}
id={`${uid}-agree`}
type='checkbox'
className='cf-cd__native'
checked={agreed}
aria-invalid={showError || undefined}
aria-describedby={showError ? errId : undefined}
onChange={(e) => {
const v = e.target.checked;
setAgreed(v);
if (v) setShowError(false);
}}
/>
<span className='cf-cd__box' aria-hidden='true'>
<Check size={16} strokeWidth={3} />
</span>
</span>
<span>{agreeLabel}</span>
</label>
{showError ? (
<p id={errId} className='cf-cd__error' role='alert'>
<AlertCircle size={16} strokeWidth={2.5} className='cf-cd__inl' aria-hidden='true' />
{c.agreeError}
</p>
) : null}
</div>
{href && !isDisabled ? (
<a className='cf-cd__cta' href={href} data-force={forced} onClick={handleAction}>
{label}
</a>
) : (
<button type='button' className='cf-cd__cta' data-force={forced} disabled={isDisabled} onClick={handleAction}>
{label}
</button>
)}
{sublabel ? (
<p className='cf-cd__sub'>
<Lock size={16} strokeWidth={2.5} className='cf-cd__inl' aria-hidden='true' />
{sublabel}
</p>
) : null}
</div>
</aside>
</div>
);
}
export default ChallengeDay;
function fill(template: string, vars: Record<string, string | number>): string {
return Object.keys(vars).reduce((s, k) => s.split('{' + k + '}').join(String(vars[k])), template);
}
function rise(i: number): React.CSSProperties {
return { '--i': Math.min(i, 4) } as React.CSSProperties;
}
const CSS = `
.cf-challenge-day {
--cd-line: oklch(from var(--ink) l c h / 0.14);
--cd-quiet: color-mix(in oklch, var(--ink) 4%, var(--card));
--cd-chip: color-mix(in oklch, var(--ink) 6%, var(--card));
--cd-well: color-mix(in oklch, var(--ink) 4%, var(--surface));
--cd-sh: var(--shadow, oklch(0.22 0.03 260));
--cd-glyph: var(--status-glyph, #fff);
--cd-bg: var(--button-bg, var(--cta));
--cd-bg-2: var(--button-bg-2, var(--cta-2));
--cd-pad: clamp(20px, 3vw, 32px);
--cd-radius: var(--card-radius, var(--radius, 14px));
box-sizing: border-box;
width: 100%;
max-width: 1120px;
margin-inline: auto;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
gap: clamp(32px, 5vw, 72px);
align-items: start;
font-family: var(--font-body);
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--ink);
}
.cf-challenge-day *, .cf-challenge-day *::before, .cf-challenge-day *::after { box-sizing: border-box; }
.cf-cd__main { display: flex; flex-direction: column; gap: 32px; min-width: 0; container-type: inline-size; }
.cf-cd__aside { min-width: 0; }
.cf-cd__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cf-cd__inl { display: inline-block; vertical-align: -0.15em; margin-inline-end: 0.4em; }
/* progress rail */
.cf-cd__railwrap { position: relative; margin: 0 0 32px; }
.cf-cd__track, .cf-cd__fill { position: absolute; top: 15px; height: 3px; border-radius: 999px; left: calc(50% / var(--cd-n)); }
.cf-cd__track { right: calc(50% / var(--cd-n)); background: var(--cd-line); }
.cf-cd__fill {
width: calc((100% - 100% / var(--cd-n)) * var(--cd-p));
background: var(--accent-fill, var(--accent));
transform-origin: left center;
animation: cf-cd-fill 0.7s cubic-bezier(.2,.7,.2,1) 0.15s both;
}
.cf-cd__rail { position: relative; display: grid; grid-template-columns: repeat(var(--cd-n), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.cf-cd__step { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding-inline: 4px; text-align: center; }
.cf-cd__marker {
display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
background: var(--secondary); color: var(--secondary-ink);
font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: 0.875rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.cf-cd__step[data-status='done'] .cf-cd__marker { background: var(--success); color: var(--cd-glyph); }
.cf-cd__step[data-status='today'] .cf-cd__marker {
background: var(--accent-fill, var(--accent)); color: var(--accent-fill-ink, var(--card));
outline: 4px solid oklch(from var(--accent-fill, var(--accent)) l c h / 0.22);
}
.cf-cd__stepday { font-size: 0.875rem; font-weight: 800; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.cf-cd__step[data-status='today'] .cf-cd__stepday { color: var(--accent); }
.cf-cd__steptitle { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.cf-cd__step[data-status='upcoming'] .cf-cd__steptitle { color: var(--muted); }
/* headline */
.cf-cd__h2 {
margin: 0 0 16px;
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(--ink);
}
.cf-cd__dayno { color: var(--accent); }
.cf-cd__lead { margin: 0; max-width: 62ch; font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.4; font-weight: 500; color: var(--muted); text-wrap: pretty; }
.cf-cd__h3 {
margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none); letter-spacing: -0.01em;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; text-wrap: balance;
}
/* lesson */
.cf-cd__lesson { margin: 0; }
.cf-cd__media { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--band); }
.cf-cd__media > * { display: block; width: 100%; height: 100%; border: 0; }
.cf-cd__media > img { object-fit: cover; object-position: center; }
.cf-cd__caption { margin: 12px 0 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
/* homework */
.cf-cd__card {
background: var(--card); color: var(--ink);
border: 1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));
border-radius: var(--cd-radius); box-shadow: var(--card-shadow, var(--shadow-md)); padding: var(--cd-pad);
}
.cf-cd__hwhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 16px; }
.cf-cd__chip {
display: inline-flex; align-items: center; min-height: 28px; padding: 4px 12px; border-radius: 999px;
background: var(--cd-chip); color: var(--ink); font-size: 0.875rem; font-weight: 800; line-height: 1.2; white-space: nowrap;
}
.cf-cd__chip[data-done] { background: var(--success-soft); color: var(--success); }
.cf-cd__bar { height: 8px; margin: 16px 0 8px; border-radius: 999px; background: var(--cd-chip); overflow: hidden; }
.cf-cd__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent-fill, var(--accent)); transition: width 0.45s cubic-bezier(.2,.7,.2,1), background 0.16s ease; }
.cf-cd__bar > span[data-done] { background: var(--success); }
.cf-cd__tasks { margin: 0; padding: 0; list-style: none; }
.cf-cd__tasks > li + li { border-top: 1px solid var(--cd-line); }
.cf-cd__task {
display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 16px; align-items: start;
margin-inline: -12px; padding: 16px 12px; border-radius: 10px; cursor: pointer; transition: background 0.16s ease;
}
.cf-cd__task:hover { background: var(--cd-quiet); }
.cf-cd__tasktext { display: block; min-width: 0; }
.cf-cd__tasktitle { display: block; font-weight: 700; line-height: 1.35; text-wrap: pretty; transition: color 0.16s ease; }
.cf-cd__task[data-on] .cf-cd__tasktitle { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: oklch(from var(--muted) l c h / 0.6); }
.cf-cd__taskdetail { display: block; margin-top: 4px; font-size: 0.9375rem; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
/* checkboxes */
.cf-cd__boxwrap { position: relative; display: block; width: 24px; height: 24px; margin-top: 1px; }
.cf-cd__native { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cf-cd__box {
display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
border: 2px solid var(--field-border, color-mix(in oklch, var(--ink) 30%, transparent));
background: var(--field); color: var(--cd-glyph); pointer-events: none;
transition: background 0.16s ease, border-color 0.16s ease;
}
.cf-cd__box svg { opacity: 0; transform: scale(0.6); transition: opacity 0.16s ease, transform 0.16s ease; }
.cf-cd__native:checked + .cf-cd__box { background: var(--success); border-color: var(--success); }
.cf-cd__native:checked + .cf-cd__box svg { opacity: 1; transform: none; }
.cf-cd__native:focus-visible + .cf-cd__box { outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / 0.45); outline-offset: 2px; }
.cf-cd__commit[data-error] .cf-cd__box { border-color: var(--danger); }
/* community */
.cf-cd__community {
display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 20px; align-items: start;
padding: var(--cd-pad); border-radius: var(--cd-radius); background: var(--band); color: var(--band-ink);
}
.cf-cd__community .cf-cd__h3 { color: var(--band-ink); }
.cf-cd__disc { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: oklch(from var(--band-ink) l c h / 0.12); color: var(--band-ink); }
.cf-cd__commtext { min-width: 0; }
.cf-cd__commbody { margin: 8px 0 0; color: var(--band-ink); text-wrap: pretty; }
.cf-cd__btn2 {
/* sits on the band: fill and text follow the band pair so an outline or grey secondary theme can't vanish into it */
--cd-btn2-bg: var(--band-ink);
--cd-btn2-ink: var(--band);
grid-column: 2; justify-self: start; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 24px; margin: 20px 0 0;
border-radius: var(--button-radius, var(--radius, 12px)); border: 1px solid transparent;
background: var(--cd-btn2-bg); color: var(--cd-btn2-ink);
box-shadow: var(--button-2-shadow, var(--shadow-sm));
font-family: var(--button-font, var(--font-display)); font-weight: var(--button-weight, 800); text-transform: var(--button-case, none);
font-size: 1.125rem; line-height: 1.15; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
transition: transform 0.16s ease, background 0.16s ease;
}
.cf-cd__btn2:hover { background: oklch(from var(--cd-btn2-bg) calc(l - 0.04) c h); }
.cf-cd__btn2:active { transform: translateY(1px); background: oklch(from var(--cd-btn2-bg) calc(l - 0.07) c h); }
.cf-cd__btn2:focus-visible { outline: 3px solid oklch(from var(--band-ink) l c h / 0.6); outline-offset: 3px; }
/* tomorrow */
.cf-cd__tomorrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; padding: var(--cd-pad); border-radius: var(--cd-radius); background: var(--cd-well); }
.cf-cd__tnum { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.cf-cd__tword { font-size: 0.875rem; font-weight: 800; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cf-cd__tdigit { margin-top: 4px; 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(--accent); }
.cf-cd__tbody { min-width: 0; }
.cf-cd__tlabel { margin: 0 0 12px; font-size: 0.875rem; font-weight: 800; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cf-cd__fasc { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.cf-cd__fasc li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; text-wrap: pretty; }
.cf-cd__fasc svg { margin-top: 0.2em; color: var(--accent); }
/* offer letter */
.cf-cd__offer {
background: var(--card); color: var(--ink);
border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--card));
border-radius: var(--cd-radius); box-shadow: var(--card-shadow, var(--shadow-lg)); padding: var(--cd-pad);
}
.cf-cd__product {
display: block; width: 100%; height: 150px; margin: 0 0 16px; object-fit: contain; object-position: center;
filter: drop-shadow(0 2px 3px oklch(from var(--cd-sh) l c h / 0.28)) drop-shadow(0 12px 14px oklch(from var(--cd-sh) l c h / 0.18));
}
.cf-cd__offertitle { margin-bottom: 16px; }
.cf-cd__letter p { margin: 0 0 12px; text-wrap: pretty; }
.cf-cd__salute { font-weight: 700; }
.cf-cd__sc { font-variant-caps: all-small-caps; letter-spacing: 0.06em; font-weight: 800; color: var(--muted); }
.cf-cd__price { font-family: var(--font-display); font-weight: var(--display-weight, 800); font-variant-numeric: tabular-nums; color: var(--ink); }
.cf-cd__letter .cf-cd__invest {
display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
margin: 20px 0 0; padding: 12px 16px; border-radius: 10px; background: var(--cd-quiet);
}
.cf-cd__invest .cf-cd__sc { flex-basis: 100%; font-size: 0.9375rem; font-weight: 700; line-height: 1.4; color: var(--muted); }
.cf-cd__invest .cf-cd__price { font-size: 2.5rem; line-height: 1; letter-spacing: -0.03em; }
.cf-cd__pnote { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.cf-cd__letter .cf-cd__closing { margin: 20px 0 0; }
.cf-cd__letter .cf-cd__sig {
margin: 12px 0 0; font-family: var(--font-display); font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none); letter-spacing: -0.01em;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; color: var(--ink);
}
.cf-cd__commit { margin: 20px 0 16px; }
.cf-cd__agree { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; cursor: pointer; text-wrap: pretty; }
.cf-cd__error { margin: 8px 0 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--danger); text-wrap: pretty; }
/* primary action */
.cf-cd__cta {
display: flex; align-items: center; justify-content: center; width: 100%; min-height: 64px; padding: 12px 20px; margin: 0;
border: 0; border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(oklch(from var(--cd-bg) calc(l + 0.04) c h), oklch(from var(--cd-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.25vw, 1.25rem); 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(--cd-bg) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--cd-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--cd-sh) l c h / 0.3), 0 8px 16px -6px oklch(from var(--cd-sh) l c h / 0.42));
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-cd__cta:hover:not(:disabled), .cf-cd__cta[data-force='hover'] {
background: linear-gradient(oklch(from var(--cd-bg) calc(l - 0.01) c h), oklch(from var(--cd-bg-2) calc(l - 0.07) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--cd-bg) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--cd-bg) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--cd-sh) l c h / 0.34), 0 10px 18px -6px oklch(from var(--cd-sh) l c h / 0.5));
}
.cf-cd__cta:active:not(:disabled), .cf-cd__cta[data-force='active'] {
transform: translateY(1px);
background: linear-gradient(oklch(from var(--cd-bg) calc(l - 0.05) c h), oklch(from var(--cd-bg-2) calc(l - 0.1) c h));
box-shadow: inset 0 2px 4px oklch(from var(--cd-bg) calc(l - 0.22) c h / 0.45), inset 0 -2px 0 oklch(from var(--cd-bg) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--cd-sh) l c h / 0.3);
}
.cf-cd__cta:focus-visible { outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / 0.55); outline-offset: 3px; }
.cf-cd__cta:disabled { background: var(--secondary); color: color-mix(in oklch, var(--secondary-ink) 72%, var(--secondary)); box-shadow: none; text-shadow: none; cursor: not-allowed; }
.cf-cd__sub { margin: 12px 0 0; text-align: center; font-size: 0.9375rem; font-weight: 500; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
/* motion */
.cf-cd__in { animation: cf-cd-rise 0.45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 0.07s); }
@keyframes cf-cd-rise { from { opacity: 0.82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cf-cd-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* responsive */
@container (max-width: 520px) { .cf-cd__steptitle { display: none; } }
@container (max-width: 620px) {
.cf-cd__btn2 { grid-column: 1 / -1; justify-self: stretch; width: 100%; white-space: normal; }
.cf-cd__tomorrow { gap: 16px; }
}
@media (max-width: 959px) { .cf-challenge-day { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 960px) and (min-height: 820px) { .cf-cd__aside { position: sticky; top: 24px; } }
@media (prefers-reduced-motion: reduce) {
.cf-challenge-day, .cf-challenge-day * { animation: none !important; transition: none !important; }
}
`;
pieces/content/challenge-day/specimen.tsx 63 lines
import __studioImage04943e8e from "../assets/52e95d7e7165ebe7.webp";
import __studioImage95cfa9f1 from "../assets/0dfcd981a725f17f.webp";
import { ChallengeDay } from '../challenge-day';
import { slot } from '../../slots';
import defaults from '../../studio-defaults.json';
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
const sample = defaults.sample;
export default function ChallengeDaySpecimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<ChallengeDay
state={state}
day={2}
days={[
{ title: 'Pick the one person you’ll sell to' },
{ title: 'Write your one-sentence offer' },
{ title: 'Map every page your funnel needs' },
{ title: 'Draft your page copy' },
{ title: 'Check it and launch' },
]}
headline='Write the one-sentence offer your funnel sells'
lead='Your offer is the big domino. Get it into one clear sentence today and every page you build this week gets easier to write.'
lessonImage={slot('scene', __studioImage04943e8e)}
lessonImageAlt='A desk set up for today’s lesson with a laptop and an open notebook'
videoNote='Watch today’s lesson first, then tick off your homework below.'
homeworkTitle='Do these three things before Day 3'
tasks={[
{ title: 'Watch today’s lesson', detail: 'Note the three parts of a clear offer.', time: '20 min' },
{ title: 'Write three versions of your offer sentence', detail: 'Who it’s for, what they get, and how fast.', time: '15 min' },
{ title: 'Pick one and read it out loud', detail: 'If it sounds like you, it’s the one.', time: '5 min' },
]}
initialDone={[0]}
communityTitle='Post your offer sentence in the group'
communityBody='Drop it in today’s thread and get honest feedback before Day 3.'
communityLabel='Open the Challenge Group'
tomorrowBullets={[
'Why your first funnel needs fewer pages than you think',
'The one page most first funnels forget, and how to write it fast',
]}
offerTitle='Get every worksheet before Day 3'
productImage={slot('product', __studioImage95cfa9f1)}
productImageAlt={`${sample.name}: the guide, workbook and checklist`}
salutation='Dear friend,'
letter={[
<>
Want every worksheet for the rest of the challenge tonight? <strong>{sample.name}</strong> puts the guide, workbook and checklist in one download, ready before Day 3.
</>,
]}
investmentLabel='Your investment:'
price={sample.price}
priceNote={sample.note}
closing='Talk soon,'
signer='Jordan'
agreeLabel={`I understand I’m covered by the ${sample.guarantee}.`}
label='Send Me The Starter Kit'
sublabel={sample.sublabel}
/>
);
}
| Name | Type | Details |
|---|---|---|
day OptionalChallengeDay |
number |
|
days OptionalChallengeDay |
{ title: string }[] |
|
headline OptionalChallengeDay |
React.ReactNode |
|
lead OptionalChallengeDay |
React.ReactNode |
|
video OptionalChallengeDay |
React.ReactNode |
|
lessonImage OptionalChallengeDay |
string |
|
lessonImageAlt OptionalChallengeDay |
string |
|
videoNote OptionalChallengeDay |
React.ReactNode |
|
homeworkTitle OptionalChallengeDay |
React.ReactNode |
|
tasks OptionalChallengeDay |
ChallengeTask[] |
|
initialDone OptionalChallengeDay |
number[] |
|
onTaskToggle OptionalChallengeDay |
(index: number, done: boolean) => void |
|
communityTitle OptionalChallengeDay |
React.ReactNode |
|
communityBody OptionalChallengeDay |
React.ReactNode |
|
communityLabel OptionalChallengeDay |
string |
|
communityHref OptionalChallengeDay |
string |
|
onCommunity OptionalChallengeDay |
() => void |
|
tomorrowTitle OptionalChallengeDay |
React.ReactNode |
|
tomorrowBullets OptionalChallengeDay |
React.ReactNode[] |
|
offerTitle OptionalChallengeDay |
React.ReactNode |
|
productImage OptionalChallengeDay |
string |
|
productImageAlt OptionalChallengeDay |
string |
|
salutation OptionalChallengeDay |
string |
|
letter OptionalChallengeDay |
React.ReactNode[] |
|
investmentLabel OptionalChallengeDay |
string |
|
price OptionalChallengeDay |
string |
|
priceNote OptionalChallengeDay |
string |
|
closing OptionalChallengeDay |
string |
|
signer OptionalChallengeDay |
string |
|
agreeLabel OptionalChallengeDay |
React.ReactNode |
|
label OptionalChallengeDay |
string |
|
sublabel OptionalChallengeDay |
string |
|
href OptionalChallengeDay |
string |
|
onAction OptionalChallengeDay |
() => void |
|
disabled OptionalChallengeDay |
boolean |
|
state OptionalChallengeDay |
ChallengeDayState |
|
copy OptionalChallengeDay |
Partial<ChallengeDayCopy> |
|
className OptionalChallengeDay |
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-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- 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).
scene- A wide atmosphere photo behind or beside the copy.
-
0dfcd981a725f17f.webp
image/webp · 155 KB
-
52e95d7e7165ebe7.webp
image/webp · 60.2 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB