Story Arc 1
Story Arc: the founder's epiphany story drawn as one line that dips at the wall, lights up at the epiphany
Use it in a prompt
Use content/story-arc 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/story-arc.tsx. - Import it and pass your copy and images (Props tab):
import { StoryArc } from "@/components/funneldna/content/story-arc"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/story-arc/component.tsx 701 lines
// layout: scroll-panels
// Story Arc: the founder's epiphany story drawn as one line that dips at the wall, lights up at the epiphany
// and rises into the offer, so the reader feels the turn before the ask. One primary action closes the arc.
import * as React from "react";
import { Lightbulb, ShieldCheck } from "lucide-react";
import { motion, useMotionValueEvent, useReducedMotion, useScroll, useSpring } from "motion/react";
import { Divider, FX_HOST, Texture } from "../fx/fx";
import concrete from "../fx/textures/concrete";
type DividerTone = React.ComponentProps<typeof Divider>["tone"];
export type StoryBeatKind = "backstory" | "wall" | "epiphany" | "plan" | "result";
export type StoryBeat = {
heading: string;
text: string;
/** Where the beat sits on the arc; "epiphany" is the point that lights up. */
kind?: StoryBeatKind;
/** 0 = top of the arc, 1 = the lowest dip. Overrides the kind's position. */
depth?: number;
/** Optional photo for the beat (slot it on the page: story-1 … story-n). */
image?: string;
imageAlt?: string;
};
export type StoryArcProps = {
headline?: string;
/** Phrase inside the headline set in the accent colour. */
headlineEmphasis?: string;
lead?: string;
/** The story beats, in order. Only supplied beats are drawn. */
beats?: StoryBeat[];
/** Accessible name for the list of beats. */
storyLabel?: string;
closeHeadline?: string;
closeText?: string;
/** Price as supplied, e.g. "$47". Hidden when empty. */
price?: string;
/** Word before the price ("Just"). */
priceLead?: string;
/** The value in words beside the price. */
priceNote?: string;
actionLabel?: string;
href?: string;
onAction?: () => void;
/** One reassurance line under the button (a supplied guarantee only). */
reassurance?: string;
disabled?: boolean;
/** Colour token of the next section for the angled bottom edge; null removes it. */
edgeTone?: DividerTone | null;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const KIND_DEPTH: Record<StoryBeatKind, number> = {
backstory: 0.4,
wall: 1,
epiphany: 0.86,
plan: 0.42,
result: 0,
};
export function StoryArc(props: StoryArcProps) {
const {
headline = "The moment everything changed",
headlineEmphasis,
lead = "",
beats = [],
storyLabel = "The story, beat by beat",
closeHeadline = "Now it's your turn.",
closeText = "",
price = "",
priceLead = "Just",
priceNote = "",
actionLabel = "Yes! I'm ready to start",
href,
onAction,
reassurance = "",
disabled = false,
edgeTone = "band",
state = "default",
className,
} = props;
const reduce = useReducedMotion();
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "");
const gradId = `cf-story-arc-line-${uid}`;
const stageRef = React.useRef<HTMLDivElement>(null);
const pinRefs = React.useRef<Array<HTMLSpanElement | null>>([]);
const geoRef = React.useRef<ArcGeometry | null>(null);
const [geo, setGeo] = React.useState<ArcGeometry | null>(null);
const [reached, setReached] = React.useState(0);
const count = beats.length;
const epiIndex = beats.findIndex((b) => b.kind === "epiphany");
const depths = beats.map((b) => clamp01(b.depth ?? (b.kind ? KIND_DEPTH[b.kind] : 0.5)));
const measure = React.useCallback(() => {
const stage = stageRef.current;
if (!stage || count === 0) {
setGeo(null);
return;
}
const next = buildGeometry(stage, pinRefs.current.slice(0, count), epiIndex);
setGeo((prev) =>
prev && next && prev.d === next.d && prev.w === next.w && prev.h === next.h && prev.axis === next.axis ? prev : next,
);
}, [count, epiIndex]);
React.useEffect(() => {
measure();
const stage = stageRef.current;
if (!stage) return;
let alive = true;
const ro = new ResizeObserver(() => measure());
ro.observe(stage);
window.addEventListener("resize", measure);
if (document.fonts) {
document.fonts.ready.then(() => {
if (alive) measure();
});
}
return () => {
alive = false;
ro.disconnect();
window.removeEventListener("resize", measure);
};
}, [measure]);
const { scrollYProgress } = useScroll({ target: stageRef, offset: ["start end", "end center"] });
const drawn = useSpring(scrollYProgress, { stiffness: 140, damping: 32, restDelta: 0.001 });
React.useEffect(() => {
geoRef.current = geo;
setReached(countReached(geo, drawn.get()));
}, [geo, drawn]);
useMotionValueEvent(drawn, "change", (v) => {
setReached(countReached(geoRef.current, v));
});
const shownReached = reduce ? count : reached;
const isDisabled = disabled || state === "disabled";
const forced = state === "hover" || state === "active" ? state : undefined;
const hasBeats = count > 0;
const hasCopy = Boolean(closeHeadline || closeText || price);
const hasClose = hasCopy || Boolean(actionLabel);
const useGradient = epiIndex >= 0 && Boolean(geo?.epi);
const lineStroke = useGradient ? `url(#${gradId})` : "var(--sa-accent)";
const priceLine = `${priceLead} ${price}`.trim();
const button = href && !isDisabled ? (
<a className="cf-story-arc__btn" href={href} data-state={forced} onClick={onAction ? () => onAction() : undefined}>
{actionLabel}
</a>
) : (
<button
type="button"
className="cf-story-arc__btn"
data-state={forced}
disabled={isDisabled}
onClick={isDisabled || !onAction ? undefined : () => onAction()}
>
{actionLabel}
</button>
);
const rootClass = ["cf-story-arc", edgeTone ? "cf-story-arc--edge" : "", className ?? ""].filter(Boolean).join(" ");
return (
<section className={rootClass} style={FX_HOST}>
<style>{CSS}</style>
<Texture src={concrete} tone="ink" />
{edgeTone ? <Divider shape="angle" tone={edgeTone} height={56} /> : null}
<div className="cf-story-arc__inner">
<header className="cf-story-arc__head">
<h2 className="cf-story-arc__title">{withEmphasis(headline, headlineEmphasis)}</h2>
{lead ? <p className="cf-story-arc__lead">{lead}</p> : null}
</header>
<div ref={stageRef} className={`cf-story-arc__stage${hasBeats ? " cf-story-arc__stage--full" : ""}`}>
{hasBeats && geo ? (
<svg
className="cf-story-arc__line"
viewBox={`0 0 ${geo.w} ${geo.h}`}
preserveAspectRatio="xMinYMin meet"
aria-hidden="true"
focusable="false"
>
{useGradient && geo.epi ? (
<defs>
<linearGradient
id={gradId}
gradientUnits="userSpaceOnUse"
x1={geo.axis === "x" ? geo.epi.x - 70 : 0}
x2={geo.axis === "x" ? geo.epi.x + 70 : 0}
y1={geo.axis === "x" ? 0 : geo.epi.y - 70}
y2={geo.axis === "x" ? 0 : geo.epi.y + 70}
>
<stop offset="0" style={{ stopColor: "var(--story-line)" }} />
<stop offset="1" style={{ stopColor: "var(--sa-accent)" }} />
</linearGradient>
</defs>
) : null}
<path className="cf-story-arc__track" d={geo.d} />
{reduce ? (
<path className="cf-story-arc__ink" d={geo.d} style={{ stroke: lineStroke }} />
) : (
<motion.path className="cf-story-arc__ink" d={geo.d} style={{ stroke: lineStroke, pathLength: drawn }} />
)}
</svg>
) : null}
{hasBeats ? (
<ol className="cf-story-arc__beats" aria-label={storyLabel} style={{ "--n": count } as React.CSSProperties}>
{beats.map((beat, i) => {
const d = depths[i];
const dmax = Math.max(d, depths[i + 1] ?? d);
const phase = epiIndex < 0 ? "after" : i < epiIndex ? "before" : i === epiIndex ? "epi" : "after";
const isReached = shownReached > i;
return (
<li
key={`${i}-${beat.heading}`}
className={`cf-story-arc__beat${phase === "epi" ? " cf-story-arc__beat--epi" : ""}`}
style={{ "--d": d, "--dmax": dmax } as React.CSSProperties}
>
<span
ref={(el) => {
pinRefs.current[i] = el;
}}
className="cf-story-arc__pin"
data-phase={phase}
data-reached={isReached ? "true" : "false"}
aria-hidden="true"
>
{phase === "epi" ? <span className="cf-story-arc__glow" /> : null}
<span className="cf-story-arc__dot">
{phase === "epi" ? <Lightbulb size={16} strokeWidth={2.5} /> : null}
</span>
</span>
<span className="cf-story-arc__stem" aria-hidden="true" />
<motion.div
className="cf-story-arc__body"
initial={reduce ? false : { opacity: 0.82, y: 8 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.2 }}
transition={{ duration: 0.45, ease: [0.2, 0.7, 0.2, 1], delay: Math.min(i * 0.07, 0.28) }}
>
{beat.image ? (
<img
className="cf-story-arc__photo"
src={beat.image}
alt={beat.imageAlt ?? ""}
width={480}
height={360}
loading="lazy"
decoding="async"
/>
) : null}
<h3 className="cf-story-arc__beat-title">{beat.heading}</h3>
<p className="cf-story-arc__beat-text">{beat.text}</p>
</motion.div>
</li>
);
})}
</ol>
) : null}
</div>
{hasClose ? (
<div className={`cf-story-arc__close${hasCopy && actionLabel ? "" : " cf-story-arc__close--solo"}`}>
{hasCopy ? (
<div className="cf-story-arc__close-copy">
{closeHeadline ? <h3 className="cf-story-arc__close-title">{closeHeadline}</h3> : null}
{closeText ? <p className="cf-story-arc__close-text">{closeText}</p> : null}
{price ? (
<p className="cf-story-arc__price">
<strong className="cf-story-arc__price-big">{priceLine}</strong>
{priceNote ? <span className="cf-story-arc__price-note">{priceNote}</span> : null}
</p>
) : null}
</div>
) : null}
{actionLabel ? (
<div className="cf-story-arc__action">
{button}
{reassurance ? (
<p className="cf-story-arc__reassure">
<ShieldCheck className="cf-story-arc__icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{reassurance}
</p>
) : null}
</div>
) : null}
</div>
) : null}
</div>
</section>
);
}
export default StoryArc;
type Pt = { x: number; y: number };
type ArcGeometry = { w: number; h: number; d: string; axis: "x" | "y"; fracs: number[]; epi: Pt | null };
function clamp01(n: number) {
return Math.min(1, Math.max(0, Number.isFinite(n) ? n : 0.5));
}
function round(n: number) {
return Math.round(n * 10) / 10;
}
function withEmphasis(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="cf-story-arc__em">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
function countReached(geo: ArcGeometry | null, v: number) {
if (!geo || v <= 0.001) return 0;
let k = 0;
for (const f of geo.fracs) if (v >= f - 0.012) k += 1;
return k;
}
function bezierLength(a: Pt, c1: Pt, c2: Pt, b: Pt) {
let len = 0;
let px = a.x;
let py = a.y;
for (let s = 1; s <= 20; s += 1) {
const t = s / 20;
const u = 1 - t;
const x = u * u * u * a.x + 3 * u * u * t * c1.x + 3 * u * t * t * c2.x + t * t * t * b.x;
const y = u * u * u * a.y + 3 * u * u * t * c1.y + 3 * u * t * t * c2.y + t * t * t * b.y;
len += Math.hypot(x - px, y - py);
px = x;
py = y;
}
return len;
}
// Reads where each node actually rendered, then threads one smooth curve through them:
// horizontal tangents across the page on desktop, vertical tangents down the rail on phones.
function buildGeometry(stage: HTMLElement, pins: Array<HTMLElement | null>, epiIndex: number): ArcGeometry | null {
const box = stage.getBoundingClientRect();
if (box.width === 0) return null;
const pts: Pt[] = [];
for (const pin of pins) {
if (!pin) return null;
const r = pin.getBoundingClientRect();
pts.push({ x: round(r.left - box.left + r.width / 2), y: round(r.top - box.top + r.height / 2) });
}
if (!pts.length) return null;
const axis: "x" | "y" = getComputedStyle(stage).getPropertyValue("--arc-axis").trim() === "y" ? "y" : "x";
const w = round(box.width);
const h = round(box.height);
const last = pts[pts.length - 1];
const path = pts.slice();
if (axis === "x" && w - last.x > 24) path.push({ x: w, y: round(Math.max(4, last.y - 24)) });
if (axis === "y" && h - last.y > 24) path.push({ x: last.x, y: h });
let d = `M${path[0].x} ${path[0].y}`;
const cum = [0];
let total = 0;
for (let i = 1; i < path.length; i += 1) {
const a = path[i - 1];
const b = path[i];
const c1 = axis === "x" ? { x: round(a.x + (b.x - a.x) / 2), y: a.y } : { x: a.x, y: round(a.y + (b.y - a.y) / 2) };
const c2 = axis === "x" ? { x: round(b.x - (b.x - a.x) / 2), y: b.y } : { x: b.x, y: round(b.y - (b.y - a.y) / 2) };
d += ` C${c1.x} ${c1.y} ${c2.x} ${c2.y} ${b.x} ${b.y}`;
total += bezierLength(a, c1, c2, b);
cum.push(total);
}
const fracs = pts.map((_, i) => (total > 0 ? cum[i] / total : 0));
return { w, h, d, axis, fracs, epi: epiIndex >= 0 ? pts[epiIndex] ?? null : null };
}
const CSS = `
.cf-story-arc{
--sa-ink: var(--ink, oklch(0.21 0.034 263));
--sa-muted: var(--muted, oklch(0.446 0.03 258));
--sa-surface: var(--surface, oklch(1 0 0));
--sa-card: var(--card, oklch(1 0 0));
--sa-accent: var(--accent, oklch(0.5 0.171 257));
--sa-accent-fill: var(--accent-fill, var(--sa-accent));
--sa-accent-fill-ink: var(--accent-fill-ink, var(--sa-card));
--sa-shadow: var(--shadow, oklch(0.22 0.03 256));
--story-line: color-mix(in oklch, var(--sa-ink) 68%, var(--sa-surface));
--story-base: 18px;
--story-rise: 150px;
position: relative;
isolation: isolate;
overflow: clip;
background: var(--sa-surface);
color: var(--sa-ink);
font-family: var(--font-body, system-ui, sans-serif);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
}
.cf-story-arc *{ box-sizing: border-box; }
.cf-story-arc--edge{ padding-bottom: calc(clamp(64px, 8.5vw, 120px) + 56px); }
.cf-story-arc__inner{ position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.cf-story-arc__head{ max-width: 46rem; }
.cf-story-arc__title{
margin: 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: clamp(2rem, 3.6vw, 3.25rem);
line-height: 1.06;
color: var(--sa-ink);
text-wrap: balance;
}
.cf-story-arc__em{ color: var(--sa-accent); }
.cf-story-arc__lead{
margin: clamp(18px, 1.7vw, 24px) 0 0;
max-width: 60ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--sa-muted);
text-wrap: pretty;
}
.cf-story-arc__stage{ position: relative; --arc-axis: x; }
.cf-story-arc__stage--full{ margin-top: clamp(40px, 5vw, 64px); }
.cf-story-arc__line{
position: absolute; inset: 0; width: 100%; height: 100%;
overflow: visible; pointer-events: none; z-index: 0;
}
.cf-story-arc__track{ fill: none; stroke: oklch(from var(--sa-ink) l c h / 0.12); stroke-width: 3; stroke-linecap: round; }
.cf-story-arc__ink{ fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.cf-story-arc__beats{
position: relative; z-index: 1;
list-style: none; margin: 0; padding: 0;
display: grid;
grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
column-gap: clamp(20px, 2.4vw, 32px);
}
.cf-story-arc__beat{
--node: 18px;
position: relative;
padding-top: calc(var(--story-base) + var(--dmax) * var(--story-rise) + 64px);
}
.cf-story-arc__beat--epi{ --node: 30px; }
.cf-story-arc__pin{
position: absolute; left: 0;
top: calc(var(--story-base) + var(--d) * var(--story-rise));
width: var(--node); height: var(--node);
margin-top: calc(var(--node) / -2);
z-index: 2;
}
.cf-story-arc__glow{
position: absolute; left: 50%; top: 50%;
width: 54px; height: 54px; margin: -27px 0 0 -27px;
border-radius: 50%;
background: oklch(from var(--sa-accent-fill) l c h / 0.16);
box-shadow: inset 0 0 0 1px oklch(from var(--sa-accent-fill) l c h / 0.32);
opacity: 0; transform: scale(0.9);
transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
pointer-events: none;
}
.cf-story-arc__pin[data-reached="true"] > .cf-story-arc__glow{ opacity: 1; transform: scale(1); }
.cf-story-arc__dot{
position: relative;
display: flex; align-items: center; justify-content: center;
width: 100%; height: 100%;
border-radius: 50%;
background: var(--sa-card);
color: var(--sa-accent);
box-shadow: inset 0 0 0 3px oklch(from var(--sa-ink) l c h / 0.24);
transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}
.cf-story-arc__pin[data-phase="before"][data-reached="true"] .cf-story-arc__dot{
background: var(--story-line);
box-shadow: inset 0 0 0 3px var(--story-line);
}
.cf-story-arc__pin[data-phase="after"][data-reached="true"] .cf-story-arc__dot{
background: var(--sa-accent-fill);
box-shadow: inset 0 0 0 3px var(--sa-accent-fill);
}
.cf-story-arc__pin[data-phase="epi"] .cf-story-arc__dot{ box-shadow: inset 0 0 0 3px var(--sa-accent); }
.cf-story-arc__pin[data-phase="epi"][data-reached="true"] .cf-story-arc__dot{
background: var(--sa-accent-fill);
color: var(--sa-accent-fill-ink);
box-shadow: inset 0 0 0 3px var(--sa-accent-fill), 0 1px 2px oklch(from var(--sa-shadow) l c h / 0.3), 0 6px 12px -4px oklch(from var(--sa-shadow) l c h / 0.35);
}
.cf-story-arc__stem{
position: absolute;
left: calc(var(--node) / 2 - 1px);
top: calc(var(--story-base) + var(--d) * var(--story-rise) + var(--node) / 2 + 4px);
width: 2px;
height: calc((var(--dmax) - var(--d)) * var(--story-rise) + 64px - var(--node) / 2 - 18px);
border-radius: 2px;
background: oklch(from var(--sa-ink) l c h / 0.16);
z-index: 1;
}
.cf-story-arc__body{ position: relative; z-index: 1; display: flex; flex-direction: column; }
.cf-story-arc__photo{
display: block; width: 100%; height: auto; aspect-ratio: 4 / 3;
object-fit: cover; object-position: center;
border-radius: 12px;
margin: 0 0 16px;
background: color-mix(in oklch, var(--sa-ink) 6%, var(--sa-card));
}
.cf-story-arc__beat-title{
margin: 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
color: var(--sa-ink);
text-wrap: balance;
}
.cf-story-arc__beat--epi .cf-story-arc__beat-title{ color: var(--sa-accent); }
.cf-story-arc__beat-text{
margin: 12px 0 0;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--sa-ink);
text-wrap: pretty;
}
.cf-story-arc__close{
margin-top: clamp(48px, 6vw, 72px);
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 24px clamp(24px, 4vw, 56px);
padding: clamp(24px, 3.4vw, 40px);
background: var(--sa-card);
color: var(--sa-ink);
border: 1px solid var(--card-border, oklch(from var(--sa-ink) l c h / 0.12));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--sa-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--sa-shadow) l c h / 0.32)));
}
.cf-story-arc__close--solo{ grid-template-columns: minmax(0, 1fr); }
.cf-story-arc__close--solo .cf-story-arc__action{ justify-self: center; width: min(100%, 420px); }
.cf-story-arc__close-title{
margin: 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
color: var(--sa-ink);
text-wrap: balance;
}
.cf-story-arc__close-text{
margin: 8px 0 0;
max-width: 60ch;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--sa-muted);
text-wrap: pretty;
}
.cf-story-arc__price{
margin: 20px 0 0;
display: flex; flex-wrap: wrap; align-items: baseline;
gap: 12px 14px;
}
.cf-story-arc__price-big{
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
letter-spacing: -0.03em;
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1;
font-variant-numeric: tabular-nums;
color: var(--sa-ink);
white-space: nowrap;
}
.cf-story-arc__price-note{
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--sa-muted);
}
.cf-story-arc__action{ display: flex; flex-direction: column; align-items: stretch; min-width: min(100%, 340px); }
.cf-story-arc__reassure{
margin: 12px 0 0;
text-align: center;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--sa-muted);
text-wrap: pretty;
}
.cf-story-arc__icon{
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: 0.4em;
color: var(--success, oklch(0.5 0.138 150));
}
.cf-story-arc__btn{
--sa-btn: var(--button-bg, var(--cta, oklch(0.576 0.209 29.5)));
--sa-btn-2: var(--button-bg-2, var(--cta-2, oklch(0.506 0.206 29.5)));
appearance: none;
display: inline-flex; align-items: center; justify-content: center;
width: 100%;
min-height: 72px;
margin: 0;
padding: 12px 28px;
border: 0;
cursor: pointer;
text-align: center;
text-decoration: none;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display, inherit));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
text-wrap: balance;
color: var(--button-ink, var(--cta-ink, oklch(1 0 0)));
text-shadow: var(--button-text-shadow, none);
background-color: var(--sa-btn);
background-image: linear-gradient(oklch(from var(--sa-btn) calc(l + 0.04) c h), oklch(from var(--sa-btn-2) calc(l - 0.02) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--sa-btn) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--sa-btn) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--sa-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--sa-shadow) l c h / 0.42));
transition: transform 0.16s ease, box-shadow 0.16s ease, background-image 0.16s ease;
-webkit-tap-highlight-color: transparent;
}
.cf-story-arc__btn:hover:not(:disabled), .cf-story-arc__btn[data-state="hover"]{
transform: translateY(-1px);
background-image: linear-gradient(oklch(from var(--sa-btn) calc(l - 0.01) c h), oklch(from var(--sa-btn-2) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--sa-btn) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--sa-btn) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--sa-shadow) l c h / 0.32), 0 12px 20px -6px oklch(from var(--sa-shadow) l c h / 0.5);
}
.cf-story-arc__btn:active:not(:disabled), .cf-story-arc__btn[data-state="active"]{
transform: translateY(1px);
background-image: linear-gradient(oklch(from var(--sa-btn) calc(l - 0.04) c h), oklch(from var(--sa-btn-2) calc(l - 0.08) c h));
box-shadow: inset 0 2px 4px oklch(from var(--sa-btn) calc(l - 0.24) c h / 0.55), inset 0 -2px 0 oklch(from var(--sa-btn) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--sa-shadow) l c h / 0.3);
}
.cf-story-arc__btn:focus-visible{
outline: 3px solid oklch(from var(--field-focus, var(--sa-accent)) l c h / 0.6);
outline-offset: 3px;
}
.cf-story-arc__btn:disabled{
cursor: not-allowed;
transform: none;
background-image: none;
background-color: var(--secondary, oklch(0.93 0.015 263));
color: var(--secondary-ink, var(--sa-ink));
text-shadow: none;
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(from var(--sa-shadow) l c h / 0.2)));
}
@media (min-width: 1360px){
.cf-story-arc{ --story-rise: 170px; }
}
@media (max-width: 1099px){
.cf-story-arc__stage{ --arc-axis: y; }
.cf-story-arc__beats{ grid-template-columns: minmax(0, 1fr); row-gap: clamp(36px, 6vw, 48px); }
.cf-story-arc__beat{
padding-top: 0;
display: grid;
grid-template-columns: 30px minmax(0, 1fr);
column-gap: clamp(14px, 3vw, 24px);
align-items: start;
}
.cf-story-arc__pin{
position: relative; left: auto; top: auto;
grid-column: 1; grid-row: 1;
justify-self: center;
margin-top: calc(12px - var(--node) / 2);
z-index: 0;
}
.cf-story-arc__glow{ width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.cf-story-arc__stem{ display: none; }
.cf-story-arc__body{ grid-column: 2; grid-row: 1; max-width: 40rem; }
.cf-story-arc__photo{ order: 3; margin: 16px 0 0; max-width: 30rem; }
}
@media (max-width: 719px){
.cf-story-arc__close{ grid-template-columns: minmax(0, 1fr); text-align: center; }
.cf-story-arc__close-text{ margin-inline: auto; }
.cf-story-arc__price{ justify-content: center; flex-direction: column; align-items: center; }
.cf-story-arc__action{ min-width: 0; }
.cf-story-arc__close--solo .cf-story-arc__action{ width: 100%; }
}
@media (prefers-reduced-motion: reduce){
.cf-story-arc__glow, .cf-story-arc__dot, .cf-story-arc__btn{ transition: none; }
.cf-story-arc__btn:hover:not(:disabled), .cf-story-arc__btn[data-state="hover"],
.cf-story-arc__btn:active:not(:disabled), .cf-story-arc__btn[data-state="active"]{ transform: none; }
}
`;
pieces/content/story-arc/specimen.tsx 69 lines
import __studioImagef13edbfa from "../assets/3a531eac5ef85ede.webp";
import __studioImage1837bb2e from "../assets/4bfdc7b33a1f1188.webp";
import __studioImage09983b70 from "../assets/9d88c10c5eac151f.webp";
import { StoryArc, type StoryArcProps } from "../story-arc";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled"];
export default function StoryArcSpecimen({ state = "default" }: { state?: StoryArcProps["state"] }) {
return (
<StoryArc
state={state}
headline="Six months of collapsed bowls, then one two-minute lesson"
headlineEmphasis="one two-minute lesson"
lead="Here's how Kiln & Co. went from a borrowed garage wheel to a studio of its own, and the five moves that made the difference."
storyLabel="The Kiln & Co. story, beat by beat"
beats={[
{
kind: "backstory",
heading: "I learned on a borrowed wheel",
text: "I was a night-shift nurse throwing pots in a friend's garage on Sundays. Every bowl came off lopsided, and I loved it anyway.",
image: slot(
"story-1",
__studioImagef13edbfa,
),
imageAlt: "Clay-covered hands shaping a lopsided bowl on an old wheel in a garage",
},
{
kind: "wall",
heading: "Six months of collapsing walls",
text: "I bought a used wheel and watched every video I could find. The moment I pulled a wall up, it twisted and folded. I nearly sold the wheel.",
},
{
kind: "epiphany",
heading: "It was never my hands. It was my speed.",
text: "An old potter watched me for two minutes and laughed. I was centring wet clay far too fast. Slow the wheel, brace your elbow, and the clay does the work.",
image: slot(
"story-2",
__studioImage1837bb2e,
),
imageAlt: "An older potter's hands guiding a student's hands as she centres clay",
},
{
kind: "plan",
heading: "Five moves, one evening each",
text: "I turned his lesson into five moves you can practise in an evening: wedge, centre, open, pull, trim. Friends learned them at my kitchen table first.",
},
{
kind: "result",
heading: "Now I teach it from my own studio",
text: "Kiln & Co. began as weekend classes in a rented unit. The Wheel Course is the same five moves, filmed so you can learn them at your own wheel.",
image: slot(
"story-3",
__studioImage09983b70,
),
imageAlt: "The founder at her wheel in a bright studio lined with glazed bowls",
},
]}
closeHeadline="Throw your first centred bowl this week."
closeText="The Wheel Course walks you through all five moves, one short video at a time, at your own wheel."
price={defaults.sample.price}
priceLead="Just"
priceNote="less than one studio class"
actionLabel="Yes! I want the Wheel Course"
reassurance={defaults.sample.guarantee}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalStoryArc |
string |
|
headlineEmphasis OptionalStoryArc |
string |
|
lead OptionalStoryArc |
string |
|
beats OptionalStoryArc |
StoryBeat[] |
|
storyLabel OptionalStoryArc |
string |
|
closeHeadline OptionalStoryArc |
string |
|
closeText OptionalStoryArc |
string |
|
price OptionalStoryArc |
string |
|
priceLead OptionalStoryArc |
string |
|
priceNote OptionalStoryArc |
string |
|
actionLabel OptionalStoryArc |
string |
|
href OptionalStoryArc |
string |
|
onAction OptionalStoryArc |
() => void |
|
reassurance OptionalStoryArc |
string |
|
disabled OptionalStoryArc |
boolean |
|
edgeTone OptionalStoryArc |
DividerTone | null |
|
state OptionalStoryArc |
"default" | "hover" | "active" | "disabled" |
|
className OptionalStoryArc |
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-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
story-1- An image this piece places.
story-2- An image this piece places.
story-3- An image this piece places.
-
3a531eac5ef85ede.webp
image/webp · 83.1 KB
-
4bfdc7b33a1f1188.webp
image/webp · 49.4 KB
-
9d88c10c5eac151f.webp
image/webp · 48.4 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f211b3080387e46d.webp
image/webp · 105 KB