Curriculum 1
Curriculum roadmap: draws the member's road from Week 1 to the programme's result, so they see how close the finish is (the goal gradient) and press Continue on their next lesson.
Use it in a prompt
Use content/curriculum 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/curriculum.tsx. - Import it and pass your copy and images (Props tab):
import { Curriculum } from "@/components/funneldna/content/curriculum"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/curriculum/component.tsx 678 lines
// layout: route-map
// Curriculum roadmap: draws the member's road from Week 1 to the programme's result, so they see how close the finish is (the goal gradient) and press Continue on their next lesson.
import * as React from "react";
import { Check, CirclePlay, Flag, Lock } from "lucide-react";
import { FX_HOST, Texture } from "../fx/fx";
import topo from "../fx/textures/topo";
export type CurriculumLesson = {
title: string;
/** Running time, e.g. "12 min". */
length?: string;
/** Watched. Only read on the current module; complete modules count every lesson as done. */
done?: boolean;
};
export type CurriculumModule = {
title: string;
/** When it runs, e.g. "Weeks 1–2". */
week: string;
status: "complete" | "current" | "locked";
/** Drip date for a locked module, e.g. "Mon, Apr 6". */
opens?: string;
lessons: CurriculumLesson[];
};
export type CurriculumResult = {
/** Finish-line label, e.g. "Press the 24 kg bell". */
title: string;
/** The result as it reads inside a sentence; defaults to title. */
phrase?: string;
/** When they get there, e.g. "End of Week 12". */
week?: string;
detail?: string;
};
export type CurriculumNote = {
salutation?: string;
body: string[];
signoff?: string;
name?: string;
role?: string;
};
/** Templates: {n} module or lesson number, {week}, {date}, {done}, {total}, {result}, {left}, {pct}. */
export type CurriculumCopy = {
mapLabel: string;
moduleMeta: string;
statusComplete: string;
statusCurrent: string;
opens: string;
locked: string;
lessonsProgress: string;
lockedNote: string;
lockedSoon: string;
progressLine: string;
remainingMany: string;
remainingOne: string;
remainingNone: string;
finishLabel: string;
finishMeta: string;
finishProgress: string;
upNext: string;
lessonDone: string;
lessonTodo: string;
lessonLocked: string;
instruction: string;
continueLabel: string;
continueModuleLabel: string;
backLabel: string;
};
export type CurriculumProps = {
/** Section headline; wrap one phrase in <mark> for the marker stroke. */
headline?: React.ReactNode;
/** Shown when no coach note is given. */
lead?: string;
/** Dear-friend note from the coach, signed before the action. */
note?: CurriculumNote;
/** presenter slot: the coach's portrait beside the sign-off. */
coachImage?: string;
coachImageAlt?: string;
/** scene slot: the after-state, shown above the progress figure. */
resultImage?: string;
resultImageAlt?: string;
modules?: CurriculumModule[];
result?: CurriculumResult;
copy?: Partial<CurriculumCopy>;
/** Where Continue goes. */
href?: string;
/** Called with the module and lesson index Continue resumes. */
onAction?: (detail: { module: number; lesson: number }) => void;
disabled?: boolean;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function Curriculum(props: CurriculumProps) {
const {
headline = "You're closer to the finish than you think",
lead = "Every module you finish moves you further down the road. Pick up your next lesson and keep the streak going.",
note,
coachImage,
coachImageAlt = "",
resultImage,
resultImageAlt = "",
modules = DEFAULT_MODULES,
result = DEFAULT_RESULT,
href,
onAction,
disabled = false,
state = "default",
className,
} = props;
const copy: CurriculumCopy = { ...DEFAULT_COPY, ...props.copy };
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "");
const n = modules.length;
const currentIdx = modules.findIndex((m) => m.status === "current");
const completeN = modules.filter((m) => m.status === "complete").length;
const cur = currentIdx >= 0 ? modules[currentIdx] : undefined;
const curDone = cur ? cur.lessons.filter((l) => l.done).length : 0;
const frac = cur && cur.lessons.length ? curDone / cur.lessons.length : 0;
const pct = n ? Math.round(((completeN + frac) / n) * 100) : 0;
const left = n - completeN;
const nextLesson = cur ? cur.lessons.findIndex((l) => !l.done) : -1;
const fullUntil = currentIdx >= 0 ? currentIdx : completeN;
const defaultIdx = currentIdx >= 0 ? currentIdx : Math.min(completeN, n);
const stopCount = n + 1;
const [selected, setSelected] = React.useState<number | null>(defaultIdx);
const wideSel = selected ?? defaultIdx;
const wideRefs = React.useRef<(HTMLButtonElement | null)[]>([]);
const narrowRefs = React.useRef<(HTMLButtonElement | null)[]>([]);
const mapRef = React.useRef<HTMLDivElement | null>(null);
const [w, setW] = React.useState(680);
React.useEffect(() => {
const el = mapRef.current;
if (!el || typeof ResizeObserver === "undefined") return;
const ro = new ResizeObserver((entries) => {
const cw = Math.round(entries[0].contentRect.width);
if (cw > 0) setW(cw);
});
ro.observe(el);
return () => ro.disconnect();
}, []);
const statusOf = (i: number): StopStatus => (i < n ? modules[i].status : "finish");
const segFill = (i: number) => (i < fullUntil ? 1 : i === currentIdx ? frac : 0);
const remaining = left === 0 ? copy.remainingNone : left === 1 ? copy.remainingOne : fill(copy.remainingMany, { left });
const resultPhrase = result.phrase ?? result.title;
const xL = Math.round(w * 0.34);
const xR = w - xL;
const labelW = Math.max(120, Math.min(220, xL - RADIUS.current - GAP - 8));
const H = TOP + (stopCount - 1) * ROW + BOTTOM;
const pts = Array.from({ length: stopCount }, (_, i) => ({ x: i % 2 === 0 ? xL : xR, y: TOP + i * ROW }));
const segs = pts.slice(0, -1).map((a, i) => {
const b = pts[i + 1];
return `M ${a.x} ${a.y} C ${a.x} ${a.y + ROW * 0.55} ${b.x} ${b.y - ROW * 0.55} ${b.x} ${b.y}`;
});
const isDisabled = disabled || state === "disabled";
const contLabel = nextLesson >= 0 ? fill(copy.continueLabel, { n: nextLesson + 1 }) : fill(copy.continueModuleLabel, { n: currentIdx + 1 });
const contClass = `cfcur-continue${state === "hover" ? " is-hover" : ""}${state === "active" ? " is-active" : ""}`;
const act = (e: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
e.preventDefault();
return;
}
onAction?.({ module: currentIdx, lesson: nextLesson });
};
const continueEl =
href && !isDisabled ? (
<a className={contClass} href={href} onClick={act}>
{contLabel}
</a>
) : (
<button type="button" className={contClass} onClick={act} disabled={isDisabled}>
{contLabel}
</button>
);
const goBack = (mode: Mode) => {
setSelected(defaultIdx);
(mode === "wide" ? wideRefs : narrowRefs).current[defaultIdx]?.focus();
};
const renderLabel = (i: number, width?: number) => {
const st = statusOf(i);
const m = i < n ? modules[i] : undefined;
return (
<span className="cfcur-lab" style={width ? { width } : undefined}>
<span className="cfcur-week">{m ? m.week : result.week ?? copy.finishLabel}</span>
<span className="cfcur-title">{m ? m.title : result.title}</span>
{st === "current" ? (
<>
<span className="cfcur-here">{copy.statusCurrent}</span>
<span className="cfcur-meta">{fill(copy.lessonsProgress, { done: curDone, total: m ? m.lessons.length : 0 })}</span>
</>
) : (
<span className="cfcur-meta">
{st === "complete"
? copy.statusComplete
: st === "locked"
? m && m.opens
? fill(copy.opens, { date: m.opens })
: copy.locked
: fill(copy.finishMeta, { pct })}
</span>
)}
</span>
);
};
const renderPanel = (i: number, mode: Mode) => {
const titleId = `${uid}-${mode}-t${i}`;
const back =
i !== defaultIdx && defaultIdx < n ? (
<button type="button" className="cfcur-back" onClick={() => goBack(mode)}>
{fill(copy.backLabel, { n: defaultIdx + 1 })}
</button>
) : null;
if (i >= n) {
return (
<div className="cfcur-pbody" key={`${mode}-${i}`}>
<div className="cfcur-pmeta">
<span className="cfcur-chip is-finish">
<Flag size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.finishLabel}
</span>
{result.week ? <span className="cfcur-pweek">{result.week}</span> : null}
</div>
<h3 id={titleId} className="cfcur-h3">{result.title}</h3>
{result.detail ? <p className="cfcur-ptext">{result.detail}</p> : null}
<p className="cfcur-pnote">{fill(copy.finishProgress, { pct })}</p>
{back}
</div>
);
}
const m = modules[i];
const st = m.status;
const doneCount = st === "complete" ? m.lessons.length : st === "current" ? curDone : 0;
return (
<div className="cfcur-pbody" key={`${mode}-${i}`}>
<div className="cfcur-pmeta">
<span className={`cfcur-chip is-${st}`}>
{st === "complete" ? copy.statusComplete : st === "current" ? copy.statusCurrent : m.opens ? fill(copy.opens, { date: m.opens }) : copy.locked}
</span>
<span className="cfcur-pweek">{fill(copy.moduleMeta, { n: i + 1, week: m.week })}</span>
</div>
<h3 id={titleId} className="cfcur-h3">{m.title}</h3>
<p className="cfcur-pnote">
{st === "locked"
? m.opens
? fill(copy.lockedNote, { date: m.opens })
: copy.lockedSoon
: fill(copy.lessonsProgress, { done: doneCount, total: m.lessons.length })}
</p>
<ol className="cfcur-lessons">
{m.lessons.map((l, j) => {
const done = st === "complete" || (st === "current" && !!l.done);
const isNext = st === "current" && j === nextLesson;
const kind = done ? "done" : isNext ? "next" : st === "locked" ? "locked" : "todo";
const srText = done ? copy.lessonDone : isNext ? copy.upNext : st === "locked" ? copy.lessonLocked : copy.lessonTodo;
return (
<li key={j} className={`cfcur-lesson is-${kind}`}>
<span className={`cfcur-badge is-${kind}`} aria-hidden="true">
{done ? (
<Check size={16} strokeWidth={3} />
) : isNext ? (
<CirclePlay size={24} strokeWidth={2.5} />
) : st === "locked" ? (
<Lock size={16} strokeWidth={2.5} />
) : null}
</span>
<span className="cfcur-ltext">
{isNext ? <span className="cfcur-upnext" aria-hidden="true">{copy.upNext}</span> : null}
<span className="cfcur-ltitle">
<span className="cfcur-sr">{srText}: </span>
{l.title}
</span>
</span>
{l.length ? <span className="cfcur-llen">{l.length}</span> : <span />}
</li>
);
})}
</ol>
{st === "current" ? (
<div className="cfcur-go">
<p className="cfcur-instr">{copy.instruction}</p>
{continueEl}
</div>
) : (
back
)}
</div>
);
};
return (
<section
className={`cf-curriculum${className ? ` ${className}` : ""}`}
style={FX_HOST}
aria-labelledby={`${uid}-h`}
>
<Texture src={topo} tone="ink" />
<style>{CSS}</style>
<div className="cfcur-wrap">
<div className="cfcur-head">
<div className="cfcur-intro cfcur-rise">
<h2 id={`${uid}-h`} className="cfcur-h2">{headline}</h2>
{note ? (
<div className="cfcur-letter">
{note.salutation ? <p className="cfcur-salute">{note.salutation}</p> : null}
{note.body.map((p, k) => (
<p key={k}>{p}</p>
))}
{note.signoff ? <p className="cfcur-signoff">{note.signoff}</p> : null}
{note.name ? (
<div className="cfcur-sign">
{coachImage ? <img src={coachImage} alt={coachImageAlt} width={56} height={56} loading="lazy" /> : null}
<div>
<span className="cfcur-name">{note.name}</span>
{note.role ? <span className="cfcur-role">{note.role}</span> : null}
</div>
</div>
) : null}
</div>
) : lead ? (
<p className="cfcur-lead">{lead}</p>
) : null}
</div>
<div className="cfcur-card cfcur-goal cfcur-rise" style={{ "--rd": ".14s" } as React.CSSProperties}>
{resultImage ? (
<img className="cfcur-photo" src={resultImage} alt={resultImageAlt} width={800} height={500} loading="lazy" />
) : null}
<p className="cfcur-pct">{pct}%</p>
<p className="cfcur-pctline">{fill(copy.progressLine, { result: resultPhrase })}</p>
{n > 0 ? (
<div className="cfcur-bar" style={{ "--n": n } as React.CSSProperties} aria-hidden="true">
{modules.map((_, k) => (
<span key={k} className="cfcur-seg">
<i style={{ "--f": `${Math.round(segFill(k) * 100)}%` } as React.CSSProperties} />
</span>
))}
</div>
) : null}
<p className="cfcur-left">{remaining}</p>
</div>
</div>
<div className="cfcur-stage">
<div className="cfcur-map" ref={mapRef} style={{ height: H }} role="group" aria-label={copy.mapLabel}>
<svg className="cfcur-svg" width={w} height={H} viewBox={`0 0 ${w} ${H}`} aria-hidden="true" focusable="false">
<path className="cfcur-road-edge" d={segs.join(" ")} />
<path className="cfcur-road" d={segs.join(" ")} />
{segs.map((d, i) => {
const f = segFill(i);
return f > 0 ? (
<path
key={i}
className="cfcur-done"
d={d}
pathLength={1}
style={{ "--len": f, "--d": `${Math.min(i * 0.12, 0.72)}s` } as React.CSSProperties}
/>
) : null;
})}
</svg>
{pts.map((p, i) => {
const st = statusOf(i);
const r = RADIUS[st];
const isLeft = i % 2 === 0;
const width = 2 * r + GAP + labelW;
const leftPx = isLeft ? p.x - r - GAP - labelW : p.x - r;
return (
<button
key={i}
ref={(el) => {
wideRefs.current[i] = el;
}}
type="button"
className={`cfcur-stop is-${st}${isLeft ? " is-left" : ""}`}
style={{ left: leftPx, top: p.y, width }}
aria-pressed={wideSel === i}
aria-controls={`${uid}-panel`}
onClick={() => setSelected(i)}
>
<Dot status={st} num={i + 1} />
{renderLabel(i, labelW)}
</button>
);
})}
</div>
<div className="cfcur-side">
<div id={`${uid}-panel`} className="cfcur-card cfcur-panel" role="region" aria-labelledby={`${uid}-wide-t${wideSel}`}>
{renderPanel(wideSel, "wide")}
</div>
</div>
</div>
<ol className="cfcur-list" aria-label={copy.mapLabel}>
{pts.map((_, i) => {
const st = statusOf(i);
const open = selected === i;
const inlineId = `${uid}-in-${i}`;
const f = i < stopCount - 1 ? segFill(i) : 0;
return (
<li key={i} className={`cfcur-vrow is-${st}`}>
{i < stopCount - 1 ? (
<svg className="cfcur-vrail" viewBox="0 0 16 100" preserveAspectRatio="none" aria-hidden="true" focusable="false">
<line className="cfcur-vedge" x1="8" y1="0" x2="8" y2="100" vectorEffect="non-scaling-stroke" />
<line className="cfcur-vroad" x1="8" y1="0" x2="8" y2="100" vectorEffect="non-scaling-stroke" />
{f > 0 ? <line className="cfcur-vdone" x1="8" y1="0" x2="8" y2={f * 100} vectorEffect="non-scaling-stroke" /> : null}
</svg>
) : null}
<button
ref={(el) => {
narrowRefs.current[i] = el;
}}
type="button"
className={`cfcur-vbtn is-${st}`}
aria-expanded={open}
aria-controls={inlineId}
onClick={() => setSelected((s) => (s === i ? null : i))}
>
<span className="cfcur-vdot">
<Dot status={st} num={i + 1} />
</span>
{renderLabel(i)}
</button>
<div
id={inlineId}
className="cfcur-card cfcur-inline"
role="region"
aria-labelledby={`${uid}-narrow-t${i}`}
hidden={!open}
>
{open ? renderPanel(i, "narrow") : null}
</div>
</li>
);
})}
</ol>
</div>
</section>
);
}
export default Curriculum;
type StopStatus = CurriculumModule["status"] | "finish";
type Mode = "wide" | "narrow";
const ROW = 104;
const TOP = 76;
const BOTTOM = 76;
const GAP = 16;
const RADIUS: Record<StopStatus, number> = { complete: 20, current: 30, locked: 20, finish: 26 };
function Dot({ status, num }: { status: StopStatus; num: number }) {
return (
<span className="cfcur-dot" aria-hidden="true">
{status === "complete" ? (
<Check size={20} strokeWidth={3} />
) : status === "current" ? (
num
) : status === "locked" ? (
<Lock size={18} strokeWidth={2.5} />
) : (
<Flag size={24} strokeWidth={2.5} />
)}
</span>
);
}
function fill(t: string, vars: Record<string, string | number>) {
return t.replace(/\{(\w+)\}/g, (all, k: string) => (k in vars ? String(vars[k]) : all));
}
const DEFAULT_COPY: CurriculumCopy = {
mapLabel: "Programme roadmap",
moduleMeta: "Module {n} · {week}",
statusComplete: "Complete",
statusCurrent: "You are here",
opens: "Opens {date}",
locked: "Locked",
lessonsProgress: "{done} of {total} lessons done",
lockedNote: "This module opens {date}. Keep going and it will be waiting for you.",
lockedSoon: "This module opens once you finish the one before it.",
progressLine: "of the way to {result}",
remainingMany: "{left} modules to the finish",
remainingOne: "1 module to the finish",
remainingNone: "Every module done. The finish is yours.",
finishLabel: "Finish line",
finishMeta: "{pct}% there",
finishProgress: "You're {pct}% of the way here. Keep going.",
upNext: "Up next",
lessonDone: "Done",
lessonTodo: "Not started",
lessonLocked: "Locked",
instruction: "Click the button below to pick up where you left off.",
continueLabel: "Continue lesson {n}",
continueModuleLabel: "Continue Module {n}",
backLabel: "Back to Module {n}",
};
const DEFAULT_MODULES: CurriculumModule[] = [
{
title: "Get set up",
week: "Week 1",
status: "complete",
lessons: [
{ title: "Welcome and how this works", length: "6 min" },
{ title: "Set your goal for the programme", length: "10 min" },
],
},
{
title: "Build the foundation",
week: "Week 2",
status: "current",
lessons: [
{ title: "The core idea in one lesson", length: "12 min", done: true },
{ title: "Your first practice session", length: "15 min" },
{ title: "Check your progress", length: "8 min" },
],
},
{
title: "Put it to work",
week: "Week 3",
status: "locked",
opens: "next Monday",
lessons: [
{ title: "A full session, start to finish", length: "18 min" },
{ title: "Fixing the common mistakes", length: "11 min" },
],
},
{
title: "Make it stick",
week: "Week 4",
status: "locked",
opens: "in two weeks",
lessons: [
{ title: "Your plan after the programme", length: "9 min" },
{ title: "Final review", length: "14 min" },
],
},
];
const DEFAULT_RESULT: CurriculumResult = {
title: "Your result, reached",
phrase: "the finish line",
week: "End of Week 4",
detail: "Finish the last module and you're there.",
};
const CSS = `
.cf-curriculum{--cf-marker:var(--marker,#fae37c);position:relative;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) 0 clamp(64px,8.5vw,120px);overflow:clip}
.cf-curriculum *,.cf-curriculum *::before,.cf-curriculum *::after{box-sizing:border-box}
.cf-curriculum .cfcur-wrap{position:relative;z-index:1;max-width:calc(1120px + 2 * clamp(16px,5vw,48px));margin:0 auto;padding:0 clamp(16px,5vw,48px);container:cfcur/inline-size}
.cf-curriculum .cfcur-head{display:grid;gap:32px;margin:0 0 clamp(40px,5vw,64px)}
@container cfcur (min-width:820px){.cf-curriculum .cfcur-head{grid-template-columns:minmax(0,1.3fr) minmax(300px,.9fr);gap:clamp(32px,5vw,72px);align-items:start}}
.cf-curriculum .cfcur-h2{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;margin:0 0 24px;color:var(--ink);text-wrap:balance}
.cf-curriculum .cfcur-h2 mark{color:inherit;background:linear-gradient(to bottom,transparent 52%,color-mix(in oklch,var(--cf-marker) 85%,transparent) 52%,color-mix(in oklch,var(--cf-marker) 85%,transparent) 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .06em;border-radius:3px}
.cf-curriculum .cfcur-lead{font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;margin:0;max-width:62ch;text-wrap:pretty}
.cf-curriculum .cfcur-letter{max-width:62ch}
.cf-curriculum .cfcur-letter p{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.55;margin:0 0 12px;text-wrap:pretty}
.cf-curriculum .cfcur-letter .cfcur-salute{font-weight:700}
.cf-curriculum .cfcur-letter .cfcur-signoff{margin:20px 0 12px}
.cf-curriculum .cfcur-sign{display:flex;align-items:center;gap:12px}
.cf-curriculum .cfcur-sign img{width:56px;height:56px;border-radius:50%;object-fit:cover;object-position:50% 30%;flex:0 0 auto}
.cf-curriculum .cfcur-name{display:block;font-weight:800;font-size:1.0625rem;line-height:1.3}
.cf-curriculum .cfcur-role{display:block;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted)}
.cf-curriculum .cfcur-card{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-md));padding:clamp(20px,3vw,32px)}
.cf-curriculum .cfcur-photo{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:50% 30%;border-radius:12px;margin:0 0 20px}
.cf-curriculum .cfcur-pct{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:-.03em;font-variant-numeric:tabular-nums;color:var(--accent);margin:0 0 20px}
.cf-curriculum .cfcur-pctline{font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:600;line-height:1.35;margin:0 0 16px;text-wrap:pretty}
.cf-curriculum .cfcur-bar{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:6px;margin:0 0 12px}
.cf-curriculum .cfcur-seg{display:block;height:10px;border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink) 10%,var(--card))}
.cf-curriculum .cfcur-seg>i{display:block;height:100%;width:var(--f);border-radius:inherit;background:var(--accent-fill,var(--accent))}
.cf-curriculum .cfcur-left{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);margin:0}
.cf-curriculum .cfcur-stage{display:none}
.cf-curriculum .cfcur-list{list-style:none;margin:0;padding:0;max-width:46rem}
@container cfcur (min-width:960px){
.cf-curriculum .cfcur-head{grid-template-columns:minmax(0,1fr) minmax(340px,400px);gap:clamp(32px,4vw,56px)}
.cf-curriculum .cfcur-list{display:none}
.cf-curriculum .cfcur-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,400px);gap:clamp(32px,4vw,56px);align-items:start}
}
.cf-curriculum .cfcur-map{position:relative;width:100%}
.cf-curriculum .cfcur-svg{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
.cf-curriculum .cfcur-road-edge{fill:none;stroke:color-mix(in oklch,var(--ink) 15%,var(--surface));stroke-width:22;stroke-linecap:round}
.cf-curriculum .cfcur-road{fill:none;stroke:color-mix(in oklch,var(--ink) 4%,var(--surface));stroke-width:16;stroke-linecap:round}
.cf-curriculum .cfcur-done{fill:none;stroke:var(--accent-fill,var(--accent));stroke-width:8;stroke-linecap:round;stroke-dasharray:var(--len) 2;stroke-dashoffset:0;animation:cfcur-draw .42s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--d,0s)}
.cf-curriculum .cfcur-stop{position:absolute;z-index:1;display:flex;align-items:center;gap:16px;padding:0;margin:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:14px;transform:translateY(-50%)}
.cf-curriculum .cfcur-stop.is-left{flex-direction:row-reverse;text-align:right}
.cf-curriculum .cfcur-dot{flex:0 0 auto;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;transition:transform .16s ease,box-shadow .16s ease}
.cf-curriculum .is-complete .cfcur-dot{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));box-shadow:var(--shadow-sm)}
.cf-curriculum .is-current .cfcur-dot{width:60px;height:60px;background:var(--card);border:4px solid var(--accent-fill,var(--accent));color:var(--accent);box-shadow:var(--shadow-md);font-family:var(--font-display);font-weight:800;font-size:1.375rem;font-variant-numeric:tabular-nums;line-height:1}
.cf-curriculum .is-locked .cfcur-dot{background:var(--card);border:2px solid oklch(from var(--ink) l c h / .22);color:var(--muted)}
.cf-curriculum .is-finish .cfcur-dot{width:52px;height:52px;background:var(--ink);color:var(--card);box-shadow:var(--shadow-md)}
.cf-curriculum .cfcur-stop:hover .cfcur-dot,.cf-curriculum .cfcur-vbtn:hover .cfcur-dot{transform:scale(1.06)}
.cf-curriculum .cfcur-stop:active .cfcur-dot,.cf-curriculum .cfcur-vbtn:active .cfcur-dot{transform:scale(.97)}
.cf-curriculum .cfcur-stop[aria-pressed="true"] .cfcur-dot,.cf-curriculum .cfcur-vbtn[aria-expanded="true"] .cfcur-dot{outline:3px solid var(--accent);outline-offset:4px}
.cf-curriculum .cfcur-stop:focus-visible,.cf-curriculum .cfcur-vbtn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .55);outline-offset:6px}
.cf-curriculum .cfcur-lab{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.cf-curriculum .is-left .cfcur-lab{align-items:flex-end}
.cf-curriculum .cfcur-week{font-size:.875rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;line-height:1.2;color:var(--muted);margin-bottom:2px}
.cf-curriculum .cfcur-title{font-family:var(--font-display);font-weight:800;font-size:1.0625rem;line-height:1.2;color:var(--ink);text-wrap:balance}
.cf-curriculum .cfcur-meta{font-size:.9375rem;font-weight:600;line-height:1.3;color:var(--muted);text-wrap:pretty}
.cf-curriculum .is-complete .cfcur-meta{color:var(--success)}
.cf-curriculum .cfcur-here{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap;animation:cfcur-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-curriculum .cfcur-side{position:sticky;top:24px}
.cf-curriculum .cfcur-vrow{position:relative;padding-bottom:24px}
.cf-curriculum .cfcur-vrow:last-child{padding-bottom:0}
.cf-curriculum .cfcur-vrail{position:absolute;left:22px;top:30px;width:16px;height:100%;overflow:visible;z-index:0;pointer-events:none}
.cf-curriculum .cfcur-vedge{stroke:color-mix(in oklch,var(--ink) 15%,var(--surface));stroke-width:16}
.cf-curriculum .cfcur-vroad{stroke:color-mix(in oklch,var(--ink) 4%,var(--surface));stroke-width:10}
.cf-curriculum .cfcur-vdone{stroke:var(--accent-fill,var(--accent));stroke-width:6}
.cf-curriculum .cfcur-vbtn{position:relative;z-index:1;display:grid;grid-template-columns:60px minmax(0,1fr);gap:14px;align-items:start;width:100%;padding:0;margin:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:14px}
.cf-curriculum .cfcur-vdot{display:flex;align-items:center;justify-content:center;height:60px}
.cf-curriculum .cfcur-vbtn .cfcur-lab{padding-top:10px}
.cf-curriculum .cfcur-inline{position:relative;z-index:1;margin:16px 0 0 74px}
.cf-curriculum .cfcur-inline[hidden]{display:none}
@container cfcur (max-width:559px){
.cf-curriculum .cfcur-inline{margin-left:0;padding:20px 16px}
.cf-curriculum .cfcur-inline .cfcur-chip.is-current{display:none}
.cf-curriculum .cfcur-inline .cfcur-lesson{gap:10px;padding:12px 8px}
}
.cf-curriculum .cfcur-pmeta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 12px}
.cf-curriculum .cfcur-chip{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:4px 12px;border-radius:999px;font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
.cf-curriculum .cfcur-chip.is-complete{background:var(--success-soft);color:var(--success)}
.cf-curriculum .cfcur-chip.is-current{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-curriculum .cfcur-chip.is-locked{background:var(--secondary);color:var(--secondary-ink)}
.cf-curriculum .cfcur-chip.is-finish{background:var(--ink);color:var(--card)}
.cf-curriculum .cfcur-pweek{font-size:.9375rem;font-weight:600;line-height:1.3;color:var(--muted)}
.cf-curriculum .cfcur-h3{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;margin:0 0 8px;color:var(--ink);text-wrap:balance}
.cf-curriculum .cfcur-ptext{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;margin:0 0 12px;text-wrap:pretty}
.cf-curriculum .cfcur-pnote{font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);margin:0 0 20px;text-wrap:pretty}
.cf-curriculum .cfcur-lessons{list-style:none;margin:0 0 24px;padding:0}
.cf-curriculum .cfcur-lesson{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:12px;align-items:start;padding:12px;border-top:1px solid oklch(from var(--ink) l c h / .1)}
.cf-curriculum .cfcur-lesson:first-child{border-top-color:transparent}
.cf-curriculum .cfcur-lesson.is-next{background:color-mix(in oklch,var(--accent) 10%,var(--card));border-top-color:transparent;border-radius:10px}
.cf-curriculum .cfcur-lesson.is-next+.cfcur-lesson{border-top-color:transparent}
.cf-curriculum .cfcur-badge{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;margin-top:1px}
.cf-curriculum .cfcur-badge.is-done{background:var(--success);color:var(--badge-glyph,#fff)}
.cf-curriculum .cfcur-badge.is-todo{border:2px solid oklch(from var(--ink) l c h / .25)}
.cf-curriculum .cfcur-badge.is-next{color:var(--accent)}
.cf-curriculum .cfcur-badge.is-locked{color:var(--muted)}
.cf-curriculum .cfcur-ltext{display:flex;flex-direction:column;min-width:0}
.cf-curriculum .cfcur-upnext{font-size:.875rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;line-height:1.2;color:var(--ink);margin:0 0 6px}
.cf-curriculum .cfcur-ltitle{font-size:1.0625rem;font-weight:600;line-height:1.35;text-wrap:pretty}
.cf-curriculum .cfcur-lesson.is-next .cfcur-ltitle{font-weight:800}
.cf-curriculum .cfcur-lesson.is-locked .cfcur-ltitle{color:var(--muted)}
.cf-curriculum .cfcur-llen{font-size:.9375rem;font-weight:500;line-height:1.5;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.cf-curriculum .cfcur-lesson.is-next .cfcur-llen{color:var(--ink);font-weight:700}
.cf-curriculum .cfcur-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-curriculum .cfcur-go{margin-top:8px}
.cf-curriculum .cfcur-instr{font-size:1.0625rem;font-weight:600;line-height:1.45;margin:0 0 16px;text-wrap:pretty}
.cf-curriculum .cfcur-continue{--b:var(--button-bg,var(--cta));--b2:var(--button-bg-2,var(--cta-2));--sh:var(--shadow,oklch(.22 .03 260));display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;padding:12px 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;text-wrap:balance;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--b) calc(l + .04) c h),oklch(from var(--b2) calc(l - .02) c h));box-shadow:var(--button-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),0 1px 2px oklch(from var(--sh) l c h / .3),0 8px 16px -6px oklch(from var(--sh) l c h / .45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-curriculum .cfcur-continue:hover,.cf-curriculum .cfcur-continue.is-hover{background:linear-gradient(oklch(from var(--b) calc(l - .01) c h),oklch(from var(--b2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .18) c h),0 1px 2px oklch(from var(--sh) l c h / .34),0 10px 18px -6px oklch(from var(--sh) l c h / .55))}
.cf-curriculum .cfcur-continue:active,.cf-curriculum .cfcur-continue.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--b) calc(l - .05) c h),oklch(from var(--b2) calc(l - .06) c h));box-shadow:inset 0 2px 4px oklch(from var(--sh) l c h / .35),inset 0 -2px 0 oklch(from var(--b) calc(l - .18) c h),0 1px 2px oklch(from var(--sh) l c h / .3)}
.cf-curriculum .cfcur-continue:disabled{cursor:not-allowed;transform:none;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--shadow-sm)}
.cf-curriculum .cfcur-back{display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;padding:10px 24px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-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;cursor:pointer;transition:transform .16s ease,background .16s ease}
.cf-curriculum .cfcur-back:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-curriculum .cfcur-back:active{transform:translateY(1px);background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .07) c h)}
.cf-curriculum .cfcur-continue:focus-visible,.cf-curriculum .cfcur-back:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px}
.cf-curriculum .cfcur-rise,.cf-curriculum .cfcur-pbody{animation:cfcur-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--rd,0s)}
@keyframes cfcur-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes cfcur-pop{from{transform:scale(.9)}}
@keyframes cfcur-draw{from{stroke-dashoffset:var(--len)}}
@media (prefers-reduced-motion:reduce){
.cf-curriculum *,.cf-curriculum *::before,.cf-curriculum *::after{animation:none!important;transition:none!important}
.cf-curriculum .cfcur-stop:hover .cfcur-dot,.cf-curriculum .cfcur-vbtn:hover .cfcur-dot,.cf-curriculum .cfcur-stop:active .cfcur-dot,.cf-curriculum .cfcur-vbtn:active .cfcur-dot,.cf-curriculum .cfcur-continue:active,.cf-curriculum .cfcur-continue.is-active{transform:none}
}
`;
pieces/content/curriculum/specimen.tsx 127 lines
import __studioImage93c253ba from "../assets/a178ac696c70e6f7.webp";
import __studioImage29a04093 from "../assets/9219aea5e2c3fb66.webp";
import * as React from "react";
import Curriculum, { type CurriculumModule } from "../curriculum";
import { slot } from "../../slots";
type SpecimenState = "default" | "hover" | "active" | "disabled";
export const states = ["default", "hover", "active", "disabled"];
const MODULES: CurriculumModule[] = [
{
title: "Breathe, Brace & Deadlift",
week: "Weeks 1–2",
status: "complete",
lessons: [
{ title: "Welcome: how the 12 weeks work", length: "6 min" },
{ title: "Belly breathing and the brace", length: "9 min" },
{ title: "Your first kettlebell deadlift", length: "14 min" },
{ title: "Week 2 workout: deadlift density", length: "22 min" },
],
},
{
title: "The Hip Hinge Swing",
week: "Weeks 3–4",
status: "complete",
lessons: [
{ title: "From deadlift to swing", length: "11 min" },
{ title: "Fixing the squat-swing", length: "10 min" },
{ title: "Breathing with the bell", length: "7 min" },
{ title: "Week 4 workout: swing intervals", length: "20 min" },
],
},
{
title: "Goblet Squat Strength",
week: "Weeks 5–6",
status: "complete",
lessons: [
{ title: "Find your squat stance", length: "8 min" },
{ title: "Goblet squat with a pause", length: "12 min" },
{ title: "Mobility you'll actually do", length: "9 min" },
{ title: "Week 6 workout: squat ladders", length: "24 min" },
],
},
{
title: "The Clean & Rack",
week: "Weeks 7–8",
status: "current",
lessons: [
{ title: "Why the rack position matters", length: "8 min", done: true },
{ title: "The dead clean, step by step", length: "12 min", done: true },
{ title: "Clean to rack without the bang", length: "10 min" },
{ title: "Rack carries for a stronger trunk", length: "7 min" },
{ title: "Week 8 workout: clean ladders", length: "24 min" },
],
},
{
title: "Strict Press Ladders",
week: "Weeks 9–10",
status: "locked",
opens: "Mon, Apr 6",
lessons: [
{ title: "Pressing from a solid rack", length: "11 min" },
{ title: "The 1-2-3 press ladder", length: "13 min" },
{ title: "When the bell stalls", length: "9 min" },
{ title: "Week 10 workout: press ladders", length: "26 min" },
],
},
{
title: "Peak & Test Week",
week: "Weeks 11–12",
status: "locked",
opens: "Mon, Apr 20",
lessons: [
{ title: "Deload: lighter on purpose", length: "7 min" },
{ title: "Warm-up for your heaviest press", length: "10 min" },
{ title: "Test day: the 24 kg press", length: "15 min" },
],
},
];
export default function CurriculumSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<Curriculum
state={state}
headline={
<React.Fragment>
Week 12 is <mark>closer than it feels</mark>
</React.Fragment>
}
note={{
salutation: "Hi Sam,",
body: [
"Three modules down. You've built the brace, the swing and the squat that everything else stands on.",
"The Clean & Rack is where the bell starts heading overhead. Finish the next three lessons and the press ladders open on Mon, Apr 6.",
],
signoff: "See you in the next session,",
name: "Coach Mara Lind",
role: "Head coach, Kettle & Core",
}}
coachImage={slot(
"presenter",
__studioImage93c253ba
)}
coachImageAlt="Coach Mara Lind"
resultImage={slot(
"scene",
__studioImage29a04093
)}
resultImageAlt="A woman pressing a kettlebell overhead in a bright gym"
modules={MODULES}
result={{
title: "Press the 24 kg bell",
phrase: "your first strict 24 kg press",
week: "End of Week 12",
detail: "Test day. Warm up, chalk up and press the 24 kg bell overhead with one strong, strict rep.",
}}
copy={{
mapLabel: "12-Week Strength Base roadmap",
remainingMany: "{left} modules left, then test day",
remainingOne: "1 module left, then test day",
remainingNone: "Every module done. Test day is yours.",
finishLabel: "Test day",
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalCurriculum |
React.ReactNode |
|
lead OptionalCurriculum |
string |
|
note OptionalCurriculum |
CurriculumNote |
|
coachImage OptionalCurriculum |
string |
|
coachImageAlt OptionalCurriculum |
string |
|
resultImage OptionalCurriculum |
string |
|
resultImageAlt OptionalCurriculum |
string |
|
modules OptionalCurriculum |
CurriculumModule[] |
|
result OptionalCurriculum |
CurriculumResult |
|
copy OptionalCurriculum |
Partial<CurriculumCopy> |
|
href OptionalCurriculum |
string |
|
onAction OptionalCurriculum |
(detail: { module: number; lesson: number }) => void |
|
disabled OptionalCurriculum |
boolean |
|
state OptionalCurriculum |
"default" | "hover" | "active" | "disabled" |
|
className OptionalCurriculum |
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-focus- 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.
presenter- A photo of the host, coach or founder.
scene- A wide atmosphere photo behind or beside the copy.
-
9219aea5e2c3fb66.webp
image/webp · 50.1 KB
-
a178ac696c70e6f7.webp
image/webp · 33.4 KB
-
a57ca5c86a05001f.webp
image/webp · 108 KB