Story Reel Wall 1
Story reel wall: members' vertical video stories on a snapping reel. The story in front lifts, its words become the
Use it in a prompt
Use proof/story-reel-wall 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/proof/story-reel-wall.tsx. - Import it and pass your copy and images (Props tab):
import { StoryReelWall } from "@/components/funneldna/proof/story-reel-wall"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/story-reel-wall/component.tsx 842 lines
// layout: magazine-spread
// Story reel wall: members' vertical video stories on a snapping reel. The story in front lifts, its words become the
// pull line beside the headline, and the section closes on one plain instruction and the order button.
import React from "react";
import { AlertCircle, ChevronLeft, ChevronRight, Play, ShieldCheck, X } from "lucide-react";
import { Backdrop, FX_HOST } from "../fx/fx";
import gym from "../fx/backdrops/gym";
export type StoryReelStory = {
/** Name as the person agreed to be shown, e.g. "Dana R., 47". */
name?: string;
/** One-line result, exactly as supplied. */
result?: string;
/** Short quote; becomes the pull line while this story is in front. */
quote?: string;
/** Vertical (9:16) poster frame. */
poster?: string;
posterAlt?: string;
/** Video URL. Without it the card shows its poster and quote only (no play button). */
src?: string;
/** Running time shown on the card, e.g. "0:52". Only shown when supplied. */
duration?: string;
};
export type StoryReelWallCopy = {
railLabel: string;
previous: string;
next: string;
/** Template: "{current} of {total}" */
counter: string;
/** Screen-reader prefix on playable cards. */
playPrefix: string;
watchStory: string;
close: string;
player: string;
videoError: string;
};
export type StoryReelWallProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
lead?: string;
/** Proof. Defaults to empty: with no stories the section renders nothing. */
stories?: StoryReelStory[];
/** Plain instruction above the button. */
ctaInstruction?: string;
ctaLabel?: string;
/** One short reassurance line under the button (e.g. the guarantee). */
ctaNote?: string;
href?: string;
onAction?: () => void;
/** Called when a story's player opens. */
onPlay?: (story: StoryReelStory, index: number) => void;
/** Imported fx backdrop (or a photo URL) behind the band; null for none. A page's scene image replaces it. */
backdropImage?: string | null;
copy?: Partial<StoryReelWallCopy>;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_COPY: StoryReelWallCopy = {
railLabel: "Member stories",
previous: "Previous story",
next: "Next story",
counter: "{current} of {total}",
playPrefix: "Play video:",
watchStory: "Watch the story",
close: "Close video",
player: "Video story",
videoError: "This video can't play right now.",
};
export function StoryReelWall(props: StoryReelWallProps) {
const {
headline = "Hear it from the people who started where you are",
highlight = "started where you are",
lead = "Swipe through their stories, press play and picture your own first month.",
stories = [],
ctaInstruction = "Click the button below to get instant access",
ctaLabel = "Order now",
ctaNote = "",
href,
onAction,
onPlay,
backdropImage = gym,
copy: copyProp,
state = "default",
className = "",
} = props;
const copy = { ...DEFAULT_COPY, ...copyProp };
const items = React.useMemo(() => (stories ?? []).filter(isShowable), [stories]);
const total = items.length;
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "");
const railRef = React.useRef<HTMLUListElement>(null);
const dialogRef = React.useRef<HTMLDialogElement>(null);
const closeRef = React.useRef<HTMLButtonElement>(null);
const returnRef = React.useRef<HTMLElement | null>(null);
const lockRef = React.useRef(false);
const movedRef = React.useRef(false);
const lockTimer = React.useRef<number | undefined>(undefined);
const frameRef = React.useRef<number | undefined>(undefined);
const [active, setActive] = React.useState(0);
const [openIndex, setOpenIndex] = React.useState<number | null>(null);
const [failed, setFailed] = React.useState(false);
const [reduced, setReduced] = React.useState(false);
React.useEffect(() => {
if (typeof window === "undefined" || !window.matchMedia) return;
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
const update = () => setReduced(mq.matches);
update();
mq.addEventListener?.("change", update);
return () => mq.removeEventListener?.("change", update);
}, []);
React.useEffect(
() => () => {
window.clearTimeout(lockTimer.current);
if (frameRef.current !== undefined) window.cancelAnimationFrame(frameRef.current);
},
[],
);
React.useEffect(() => {
const d = dialogRef.current;
if (!d) return;
if (openIndex !== null) {
if (!d.open) {
if (typeof d.showModal === "function") d.showModal();
else d.setAttribute("open", "");
}
closeRef.current?.focus();
} else if (d.open) {
if (typeof d.close === "function") d.close();
else d.removeAttribute("open");
}
}, [openIndex]);
if (!total) return null;
const current = clamp(active, 0, total - 1);
const disabled = state === "disabled";
const firstVideo = items.findIndex((s) => Boolean(s.src));
const titleId = `${uid}-title`;
const playerTitleId = `${uid}-player`;
const openStory = openIndex === null ? undefined : items[openIndex];
const hasPull = items.some((s) => s.quote || s.result);
const forced = state === "hover" ? " is-hover" : state === "active" ? " is-press" : "";
const ctaClass = `srw-cta${forced}`;
const stepSize = () => {
const rail = railRef.current;
if (!rail || !rail.children.length) return 0;
const a = rail.children[0] as HTMLElement;
const b = rail.children[1] as HTMLElement | undefined;
return b ? b.offsetLeft - a.offsetLeft : a.offsetWidth;
};
const settle = () => {
const rail = railRef.current;
const step = stepSize();
if (!rail || !step) return;
const near = clamp(Math.round(rail.scrollLeft / step), 0, total - 1);
const atEnd = rail.scrollLeft >= rail.scrollWidth - rail.clientWidth - 2;
setActive((a) => (atEnd ? Math.max(clamp(a, 0, total - 1), near) : near));
};
const hold = (ms: number) => {
lockRef.current = true;
window.clearTimeout(lockTimer.current);
lockTimer.current = window.setTimeout(() => {
lockRef.current = false;
if (movedRef.current) {
movedRef.current = false;
settle();
}
}, ms);
};
const onScroll = () => {
if (lockRef.current) {
movedRef.current = true;
hold(180);
return;
}
if (frameRef.current !== undefined) return;
frameRef.current = window.requestAnimationFrame(() => {
frameRef.current = undefined;
settle();
});
};
const goTo = (index: number) => {
const next = clamp(index, 0, total - 1);
setActive(next);
movedRef.current = false;
hold(reduced ? 250 : 700);
const rail = railRef.current;
const step = stepSize();
if (rail && step && typeof rail.scrollTo === "function") {
rail.scrollTo({ left: next * step, behavior: reduced ? "auto" : "smooth" });
}
};
const onRailKey = (e: React.KeyboardEvent<HTMLUListElement>) => {
if (e.target !== e.currentTarget) return;
const map: Record<string, number> = { ArrowRight: current + 1, ArrowLeft: current - 1, Home: 0, End: total - 1 };
if (!(e.key in map)) return;
e.preventDefault();
goTo(map[e.key]);
};
const focusCard = (i: number) => {
movedRef.current = false;
hold(500);
setActive(i);
};
const openAt = (i: number, trigger: HTMLElement) => {
if (disabled || !items[i]?.src) return;
returnRef.current = trigger;
setActive(i);
setFailed(false);
setOpenIndex(i);
onPlay?.(items[i], i);
};
const closePlayer = () => setOpenIndex(null);
const onDialogClose = () => {
setOpenIndex(null);
const trigger = returnRef.current;
returnRef.current = null;
trigger?.focus({ preventScroll: true });
};
const trapFocus = (e: React.KeyboardEvent<HTMLDialogElement>) => {
if (e.key !== "Tab") return;
const nodes = Array.from(
e.currentTarget.querySelectorAll<HTMLElement>("button:not([disabled]), [href], video[controls], [tabindex]:not([tabindex='-1'])"),
);
if (!nodes.length) return;
const first = nodes[0];
const last = nodes[nodes.length - 1];
const here = document.activeElement;
if (e.shiftKey && (here === first || here === e.currentTarget)) {
e.preventDefault();
last.focus();
} else if (!e.shiftKey && here === last) {
e.preventDefault();
first.focus();
}
};
return (
<section className={`cf-story-reel-wall ${className}`.trim()} style={FX_HOST} aria-labelledby={titleId}>
{backdropImage ? <Backdrop src={backdropImage} treatment="scrim-dark" /> : null}
<style>{CSS}</style>
<div className="srw-wrap">
<header className="srw-head">
<h2 id={titleId} className="srw-title">
{withMark(headline, highlight)}
</h2>
{lead || hasPull ? (
<div className="srw-side">
{lead ? <p className="srw-lead">{lead}</p> : null}
{hasPull ? (
<div className="srw-pulls">
{items.map((s, i) => {
if (!s.quote && !s.result) return null;
const on = i === current;
return (
<figure key={i} className="srw-pull" data-on={on || undefined}>
{s.quote ? (
<blockquote>
<p className="srw-pull-text">“{s.quote}”</p>
</blockquote>
) : (
<p className="srw-pull-text">{s.result}</p>
)}
{s.name || s.src ? (
<figcaption className="srw-cap">
{s.name ? <span className="srw-cap-name">{s.name}</span> : null}
{s.src ? (
<button
type="button"
className="srw-watch"
disabled={disabled}
onClick={(e) => openAt(i, e.currentTarget)}
>
<Play className="srw-ico" size={16} strokeWidth={2.5} fill="currentColor" aria-hidden="true" />
{copy.watchStory}
</button>
) : null}
</figcaption>
) : null}
</figure>
);
})}
</div>
) : null}
</div>
) : null}
</header>
</div>
<ul ref={railRef} className="srw-rail" aria-label={copy.railLabel} tabIndex={0} onScroll={onScroll} onKeyDown={onRailKey}>
{items.map((s, i) => {
const on = i === current;
const isVideo = Boolean(s.src);
const stateClass = i === firstVideo ? forced : "";
const face = (
<>
{s.poster ? (
<img
className="srw-poster"
src={s.poster}
alt={isVideo ? "" : s.posterAlt || ""}
loading={i < 5 ? "eager" : "lazy"}
decoding="async"
draggable={false}
/>
) : null}
<span className="srw-scrim" aria-hidden="true" />
</>
);
return (
<li key={i} className="srw-item" style={{ "--i": i } as React.CSSProperties}>
{isVideo ? (
<button
type="button"
className={`srw-card is-video${stateClass}`}
data-active={on || undefined}
disabled={disabled}
onClick={(e) => openAt(i, e.currentTarget)}
onFocus={() => focusCard(i)}
>
{face}
{s.duration ? <span className="srw-chip">{s.duration}</span> : null}
<span className="srw-meta">
<span className="srw-play" aria-hidden="true">
<Play size={20} strokeWidth={2.5} fill="currentColor" />
</span>
<span className="srw-sr">{copy.playPrefix} </span>
{s.name ? <span className="srw-name">{s.name}</span> : null}
{s.result ? <span className="srw-result">{s.result}</span> : null}
</span>
</button>
) : (
<div className="srw-card is-quote" data-active={on || undefined}>
{face}
<div className="srw-meta">
{s.quote ? (
<blockquote className="srw-quote">
<p>“{s.quote}”</p>
</blockquote>
) : s.result ? (
<p className="srw-quote-result">{s.result}</p>
) : null}
{s.name ? <span className="srw-quote-name">{s.name}</span> : null}
</div>
</div>
)}
</li>
);
})}
</ul>
<div className="srw-wrap">
{total > 1 ? (
<div className="srw-nav">
<div className="srw-progress" aria-hidden="true">
<span style={{ width: `${((current + 1) / total) * 100}%` }} />
</div>
<p className="srw-count">{fill(copy.counter, { current: String(current + 1), total: String(total) })}</p>
<div className="srw-arrows">
<button type="button" className="srw-ctl" aria-label={copy.previous} disabled={current === 0} onClick={() => goTo(current - 1)}>
<ChevronLeft size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
<button
type="button"
className="srw-ctl"
aria-label={copy.next}
disabled={current === total - 1}
onClick={() => goTo(current + 1)}
>
<ChevronRight size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
</div>
) : null}
{ctaLabel ? (
<div className="srw-action">
{ctaInstruction ? <p className="srw-instruction">{ctaInstruction}</p> : null}
{href && !disabled ? (
<a className={ctaClass} href={href} onClick={onAction ? () => onAction() : undefined}>
{ctaLabel}
</a>
) : (
<button type="button" className={ctaClass} disabled={disabled} onClick={() => onAction?.()}>
{ctaLabel}
</button>
)}
{ctaNote ? (
<p className="srw-note">
<ShieldCheck className="srw-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{ctaNote}
</p>
) : null}
</div>
) : null}
</div>
<dialog
ref={dialogRef}
className="srw-dialog"
aria-labelledby={openStory?.name ? playerTitleId : undefined}
aria-label={openStory?.name ? undefined : copy.player}
onClose={onDialogClose}
onCancel={(e) => {
e.preventDefault();
closePlayer();
}}
onKeyDown={trapFocus}
onClick={(e) => {
if (e.target === e.currentTarget) closePlayer();
}}
>
{openStory ? (
<div className="srw-player">
<div className="srw-screen">
<video
key={openIndex ?? 0}
className="srw-video"
src={openStory.src}
poster={openStory.poster}
controls
playsInline
preload="none"
aria-label={openStory.name ? `${copy.player}: ${openStory.name}` : copy.player}
onError={() => setFailed(true)}
/>
{failed ? (
<p className="srw-error" role="status">
<AlertCircle className="srw-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.videoError}
</p>
) : null}
</div>
<div className="srw-aside">
{openStory.name ? (
<h3 id={playerTitleId} className="srw-dname">
{openStory.name}
</h3>
) : null}
{openStory.result ? <p className="srw-dresult">{openStory.result}</p> : null}
{openStory.quote ? (
<blockquote className="srw-dquote">
<p>“{openStory.quote}”</p>
</blockquote>
) : null}
</div>
<button ref={closeRef} type="button" className="srw-x" aria-label={copy.close} onClick={closePlayer}>
<X size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
) : null}
</dialog>
</section>
);
}
export default StoryReelWall;
function isShowable(s: StoryReelStory | null | undefined): s is StoryReelStory {
return Boolean(s && (s.poster || s.src || s.quote || s.result));
}
function clamp(n: number, min: number, max: number) {
return Math.min(Math.max(n, min), max);
}
function fill(template: string, values: Record<string, string>) {
return Object.entries(values).reduce((text, [key, value]) => text.split(`{${key}}`).join(value), template);
}
function withMark(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="srw-mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
const CSS = `
.cf-story-reel-wall {
--srw-gutter: clamp(16px, 5vw, 48px);
--srw-wide: 1120px;
--srw-gap: 16px;
--srw-per: 4.5;
--srw-gaps: 4;
--srw-side: max(var(--srw-gutter), calc((100% - var(--srw-wide)) / 2));
--srw-ease: cubic-bezier(.2, .7, .2, 1);
--srw-r: var(--radius, 12px);
--srw-marker: oklch(from var(--marker, #fae37c) l c h / 1);
--srw-marker-ink: oklch(from var(--marker, #fae37c) 0.24 0.05 h);
--srw-shadow: var(--shadow, oklch(0.22 0.03 256));
position: relative;
isolation: isolate;
overflow: hidden;
background: var(--band, #1b2a4a);
color: var(--band-ink, #ffffff);
font-family: var(--font-body, sans-serif);
padding-block: clamp(56px, 8vw, 112px) clamp(64px, 8.5vw, 120px);
}
.cf-story-reel-wall *, .cf-story-reel-wall *::before, .cf-story-reel-wall *::after { box-sizing: border-box; }
.cf-story-reel-wall .srw-wrap {
position: relative; z-index: 1; width: 100%;
max-width: calc(var(--srw-wide) + 2 * var(--srw-gutter));
margin-inline: auto; padding-inline: var(--srw-gutter);
}
.cf-story-reel-wall .srw-head {
display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
gap: 16px clamp(32px, 5vw, 72px); align-items: start;
}
.cf-story-reel-wall .srw-title {
margin: 0; color: var(--band-ink, #ffffff);
font-family: var(--font-display, sans-serif);
font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.06;
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
text-wrap: balance;
}
.cf-story-reel-wall .srw-mark {
color: var(--srw-marker-ink);
background: var(--srw-marker);
padding: 0 .14em; margin: 0 -.04em;
border-radius: .18em .34em .22em .38em;
-webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cf-story-reel-wall .srw-side { padding-top: 6px; min-width: 0; }
.cf-story-reel-wall .srw-side > * + * { margin-top: 24px; }
.cf-story-reel-wall .srw-lead {
margin: 0; max-width: 40rem;
font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.4; font-weight: 500;
text-wrap: pretty;
}
.cf-story-reel-wall .srw-pulls { display: grid; }
.cf-story-reel-wall .srw-pull { grid-area: 1 / 1; margin: 0; min-width: 0; visibility: hidden; opacity: 0; }
.cf-story-reel-wall .srw-pull[data-on] { visibility: visible; opacity: 1; animation: srw-rise .45s var(--srw-ease) both; }
.cf-story-reel-wall .srw-pull blockquote { margin: 0; }
.cf-story-reel-wall .srw-pull-text {
margin: 0; font-family: var(--font-display, sans-serif);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.22; font-weight: 700;
letter-spacing: -0.01em; text-wrap: pretty;
}
.cf-story-reel-wall .srw-cap {
margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
font-size: .9375rem; line-height: 1.4; font-weight: 600;
}
.cf-story-reel-wall .srw-cap-name { font-weight: 800; }
.cf-story-reel-wall .srw-watch {
appearance: none; background: none; border: 0; margin: 0; padding: 0;
min-height: 44px; cursor: pointer;
font: inherit; font-weight: 700; color: var(--band-ink, #ffffff);
text-decoration: underline; text-underline-offset: .18em;
text-decoration-color: oklch(from var(--band-ink, #ffffff) l c h / .45);
transition: text-decoration-color .16s ease;
}
.cf-story-reel-wall .srw-watch:disabled { cursor: not-allowed; opacity: .6; }
.cf-story-reel-wall .srw-watch:focus-visible { outline: 3px solid var(--band-ink, #ffffff); outline-offset: 3px; border-radius: 4px; }
.cf-story-reel-wall .srw-ico { display: inline-block; vertical-align: -0.15em; margin-inline-end: .4em; flex: none; }
.cf-story-reel-wall .srw-rail {
position: relative; z-index: 1;
display: flex; gap: var(--srw-gap);
margin: clamp(20px, 3vw, 32px) 0 0; list-style: none;
padding: 16px var(--srw-side) 32px;
overflow-x: auto; overflow-y: hidden;
scroll-snap-type: x mandatory; scroll-padding-inline: var(--srw-side);
overscroll-behavior-x: contain; scrollbar-width: none;
}
.cf-story-reel-wall .srw-rail::-webkit-scrollbar { display: none; }
.cf-story-reel-wall .srw-rail:focus-visible { outline: 3px solid var(--band-ink, #ffffff); outline-offset: -3px; }
.cf-story-reel-wall .srw-item {
flex: 0 0 calc((100% - var(--srw-gaps) * var(--srw-gap)) / var(--srw-per));
min-width: 0; scroll-snap-align: start;
animation: srw-rise .45s var(--srw-ease) both;
animation-delay: min(calc(var(--i, 0) * .07s), .28s);
}
.cf-story-reel-wall .srw-card {
appearance: none; position: relative; display: block; width: 100%;
aspect-ratio: 9 / 16; margin: 0; padding: 0; border: 0;
border-radius: var(--card-radius, var(--srw-r)); overflow: hidden; isolation: isolate;
background: oklch(from var(--band, #1b2a4a) calc(l + 0.06) c h);
color: var(--band-ink, #ffffff); font: inherit; text-align: left; cursor: default;
transform: scale(1);
box-shadow: var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 256 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 256 / 0.2)));
transition: transform .45s var(--srw-ease), box-shadow .45s var(--srw-ease);
}
.cf-story-reel-wall .srw-card::after {
content: ''; position: absolute; inset: 0; z-index: 3; border-radius: var(--card-radius, var(--srw-r)); pointer-events: none;
box-shadow: inset 0 0 0 1px oklch(from var(--band-ink, #ffffff) l c h / .16);
transition: box-shadow .45s var(--srw-ease);
}
.cf-story-reel-wall .srw-card[data-active] {
border-radius: var(--card-radius, var(--srw-r));
transform: scale(1.035);
box-shadow: var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 256 / 0.22), 0 12px 24px -8px oklch(0.22 0.03 256 / 0.32));
}
.cf-story-reel-wall .srw-card[data-active]::after {
border-radius: var(--card-radius, var(--srw-r));
box-shadow: inset 0 0 0 2px var(--accent-fill, var(--accent, #2f6fd6));
}
.cf-story-reel-wall .srw-card.is-video {
cursor: pointer;
--srw-play-on: var(--button-bg, var(--cta, #d9342b));
--srw-play-on-ink: var(--button-ink, var(--cta-ink, #ffffff));
}
.cf-story-reel-wall .srw-card.is-video:disabled { cursor: not-allowed; }
.cf-story-reel-wall .srw-card.is-video:focus-visible { outline: 3px solid var(--band-ink, #ffffff); outline-offset: 3px; }
.cf-story-reel-wall .srw-card.is-video:active:not(:disabled), .cf-story-reel-wall .srw-card.is-press { transform: scale(.985); }
.cf-story-reel-wall .srw-card[data-active].is-video:active:not(:disabled), .cf-story-reel-wall .srw-card[data-active].is-press { transform: scale(1.015); }
.cf-story-reel-wall .srw-poster {
position: absolute; inset: 0; width: 100%; height: 100%;
object-fit: cover; object-position: center 22%;
transform: scale(1);
transition: transform .45s var(--srw-ease), filter .45s var(--srw-ease);
}
.cf-story-reel-wall .srw-card:not([data-active]) .srw-poster { filter: brightness(.6) saturate(.78); }
.cf-story-reel-wall .srw-scrim {
position: absolute; inset: 0; z-index: 1; pointer-events: none;
background: linear-gradient(180deg,
oklch(from var(--band, #1b2a4a) l c h / 0) 34%,
oklch(from var(--band, #1b2a4a) calc(l - 0.04) c h / .8) 62%,
oklch(from var(--band, #1b2a4a) calc(l - 0.06) c h / .95) 100%);
}
.cf-story-reel-wall .srw-card.is-quote .srw-scrim {
background: linear-gradient(180deg,
oklch(from var(--band, #1b2a4a) l c h / .14) 0%,
oklch(from var(--band, #1b2a4a) calc(l - 0.02) c h / .72) 28%,
oklch(from var(--band, #1b2a4a) calc(l - 0.05) c h / .94) 56%,
oklch(from var(--band, #1b2a4a) calc(l - 0.06) c h / .97) 100%);
}
.cf-story-reel-wall .srw-chip {
position: absolute; z-index: 2; top: 12px; left: 12px;
display: inline-flex; align-items: center; min-height: 28px; padding: 4px 12px; border-radius: 999px;
background: oklch(from var(--band, #1b2a4a) calc(l - 0.04) c h / .88);
color: var(--band-ink, #ffffff);
font-size: .875rem; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums;
}
.cf-story-reel-wall .srw-meta {
position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 16px;
display: flex; flex-direction: column; align-items: flex-start;
}
.cf-story-reel-wall .srw-play {
width: 48px; height: 48px; margin-bottom: 12px; border-radius: 999px;
display: grid; place-items: center;
background: var(--band-ink, #ffffff); color: var(--band, #1b2a4a);
box-shadow: 0 1px 2px oklch(from var(--srw-shadow) l c h / .35), 0 6px 12px -4px oklch(from var(--srw-shadow) l c h / .45);
transition: transform .16s ease, background .16s ease, color .16s ease;
}
.cf-story-reel-wall .srw-play svg { transform: translateX(1px); }
.cf-story-reel-wall .srw-card:disabled .srw-play { opacity: .5; }
.cf-story-reel-wall .srw-name {
display: block; font-family: var(--font-display, sans-serif);
font-size: 1.3125rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance;
}
.cf-story-reel-wall .srw-result { display: block; margin-top: 4px; font-size: .9375rem; line-height: 1.4; font-weight: 600; text-wrap: pretty; }
.cf-story-reel-wall .srw-quote { margin: 0; }
.cf-story-reel-wall .srw-quote p, .cf-story-reel-wall .srw-quote-result {
margin: 0; font-size: 1.0625rem; line-height: 1.45; font-weight: 600; text-wrap: pretty;
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 9; overflow: hidden;
}
.cf-story-reel-wall .srw-quote-name { display: block; margin-top: 12px; font-size: .9375rem; line-height: 1.4; font-weight: 800; }
.cf-story-reel-wall .srw-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-story-reel-wall .srw-nav { display: flex; align-items: center; gap: 16px; }
.cf-story-reel-wall .srw-progress {
flex: 1; min-width: 48px; height: 4px; border-radius: 999px; overflow: hidden;
background: oklch(from var(--band-ink, #ffffff) l c h / .2);
}
.cf-story-reel-wall .srw-progress span {
display: block; height: 100%; border-radius: inherit; background: var(--band-ink, #ffffff);
transition: width .45s var(--srw-ease);
}
.cf-story-reel-wall .srw-count { margin: 0; font-size: .9375rem; line-height: 1.4; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cf-story-reel-wall .srw-arrows { display: flex; gap: 8px; }
.cf-story-reel-wall .srw-ctl, .cf-story-reel-wall .srw-x {
appearance: none; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; cursor: pointer;
border: 1px solid var(--button-2-border, transparent);
border-radius: var(--button-radius, var(--radius, 12px));
background: var(--button-2-bg, var(--secondary, #e6e9f0));
color: var(--button-2-ink, var(--secondary-ink, #18223a));
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(0.22 0.03 256 / 0.2)));
transition: transform .16s ease, background .16s ease;
}
.cf-story-reel-wall .srw-ctl:active:not(:disabled), .cf-story-reel-wall .srw-x:active { transform: translateY(1px); }
.cf-story-reel-wall .srw-ctl:focus-visible { outline: 3px solid var(--band-ink, #ffffff); outline-offset: 3px; }
.cf-story-reel-wall .srw-x:focus-visible { outline: 3px solid oklch(from var(--field-focus, var(--accent, #2f6fd6)) l c h / .55); outline-offset: 2px; }
.cf-story-reel-wall .srw-ctl:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.cf-story-reel-wall .srw-action { margin-top: clamp(32px, 4vw, 48px); display: flex; flex-direction: column; align-items: flex-start; }
.cf-story-reel-wall .srw-instruction {
margin: 0 0 16px; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; font-weight: 700; text-wrap: pretty;
}
.cf-story-reel-wall .srw-cta {
appearance: none; display: inline-flex; align-items: center; justify-content: center;
min-height: 64px; min-width: 12rem; padding: 0 28px; margin: 0; border: 0; cursor: pointer;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display, sans-serif));
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; white-space: nowrap; text-decoration: none;
color: var(--button-ink, var(--cta-ink, #ffffff));
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l + 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2, #b82a22)) calc(l - 0.02) c h));
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--srw-shadow) l c h / 0.35),
0 8px 16px -6px oklch(from var(--srw-shadow) l c h / 0.45));
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-story-reel-wall .srw-cta.is-hover {
background: linear-gradient(oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l - 0.01) c h), oklch(from var(--button-bg-2, var(--cta-2, #b82a22)) calc(l - 0.07) c h));
box-shadow:
inset 0 1px 0 oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--srw-shadow) l c h / 0.38),
0 10px 18px -6px oklch(from var(--srw-shadow) l c h / 0.55);
}
.cf-story-reel-wall .srw-cta:active:not(:disabled), .cf-story-reel-wall .srw-cta.is-press {
transform: translateY(1px);
box-shadow:
inset 0 2px 4px oklch(from var(--srw-shadow) l c h / 0.35),
inset 0 -2px 0 oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l - 0.16) c h),
0 1px 1px oklch(from var(--srw-shadow) l c h / 0.3);
}
.cf-story-reel-wall .srw-cta:focus-visible { outline: 3px solid var(--band-ink, #ffffff); outline-offset: 3px; }
.cf-story-reel-wall .srw-cta:disabled {
cursor: not-allowed; opacity: .7; text-shadow: none;
background: var(--button-2-bg, var(--secondary, #e6e9f0));
color: var(--button-2-ink, var(--secondary-ink, #18223a));
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(0.22 0.03 256 / 0.2)));
}
.cf-story-reel-wall .srw-note { margin: 12px 0 0; font-size: .9375rem; line-height: 1.4; font-weight: 600; text-wrap: pretty; }
.cf-story-reel-wall .srw-card.is-hover .srw-poster { transform: scale(1.04); }
.cf-story-reel-wall .srw-card.is-hover .srw-play {
background: var(--srw-play-on); color: var(--srw-play-on-ink); transform: scale(1.06);
}
.cf-story-reel-wall .srw-card.is-video:focus-visible .srw-play {
background: var(--srw-play-on); color: var(--srw-play-on-ink);
}
@media (hover: hover) {
.cf-story-reel-wall .srw-card.is-video:not(:disabled):hover .srw-poster { transform: scale(1.04); }
.cf-story-reel-wall .srw-card.is-video:not(:disabled):not([data-active]):hover .srw-poster { filter: brightness(.82) saturate(.92); }
.cf-story-reel-wall .srw-card.is-video:not(:disabled):hover .srw-play {
background: var(--srw-play-on); color: var(--srw-play-on-ink); transform: scale(1.06);
}
.cf-story-reel-wall .srw-watch:not(:disabled):hover { text-decoration-color: var(--band-ink, #ffffff); }
.cf-story-reel-wall .srw-ctl:not(:disabled):hover, .cf-story-reel-wall .srw-x:hover {
background: oklch(from var(--button-2-bg, var(--secondary, #e6e9f0)) calc(l - 0.05) c h);
}
.cf-story-reel-wall .srw-cta:not(:disabled):hover {
background: linear-gradient(oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l - 0.01) c h), oklch(from var(--button-bg-2, var(--cta-2, #b82a22)) calc(l - 0.07) c h));
box-shadow:
inset 0 1px 0 oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, #d9342b)) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--srw-shadow) l c h / 0.38),
0 10px 18px -6px oklch(from var(--srw-shadow) l c h / 0.55);
}
}
.cf-story-reel-wall .srw-dialog {
margin: auto; padding: 0; border: 0; overflow: auto;
width: auto; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px);
border-radius: var(--card-radius, var(--radius, 14px));
background: var(--card, #ffffff); color: var(--ink, #18223a);
font-family: var(--font-body, sans-serif);
box-shadow: var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 256 / 0.22), 0 12px 24px -8px oklch(0.22 0.03 256 / 0.32));
}
.cf-story-reel-wall .srw-dialog::backdrop { background: oklch(from var(--band, oklch(0.27 0.067 256)) calc(l - 0.1) c h / .86); }
.cf-story-reel-wall .srw-player {
position: relative; display: grid; grid-template-columns: auto 340px;
animation: srw-rise .3s var(--srw-ease) both;
}
.cf-story-reel-wall .srw-screen { position: relative; height: min(78dvh, 720px); aspect-ratio: 9 / 16; background: var(--band, #1b2a4a); }
.cf-story-reel-wall .srw-video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--band, #1b2a4a); }
.cf-story-reel-wall .srw-video:focus-visible { outline: 3px solid oklch(from var(--field-focus, var(--accent, #2f6fd6)) l c h / .55); outline-offset: -3px; }
.cf-story-reel-wall .srw-error {
position: absolute; left: 12px; right: 12px; bottom: 72px; margin: 0; padding: 12px 16px; border-radius: 10px;
background: var(--danger-soft, oklch(0.93 0.024 27)); color: var(--danger, oklch(0.5 0.17 27));
font-size: .9375rem; line-height: 1.4; font-weight: 700; text-wrap: pretty;
}
.cf-story-reel-wall .srw-aside {
display: flex; flex-direction: column; gap: 12px; min-width: 0;
padding: 64px clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px);
}
.cf-story-reel-wall .srw-dname {
margin: 0; color: var(--ink, #18223a); font-family: var(--font-display, sans-serif);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; text-wrap: balance;
}
.cf-story-reel-wall .srw-dresult { margin: 0; font-size: 1.0625rem; line-height: 1.5; font-weight: 700; text-wrap: pretty; }
.cf-story-reel-wall .srw-dquote { margin: 4px 0 0; }
.cf-story-reel-wall .srw-dquote p { margin: 0; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; text-wrap: pretty; }
.cf-story-reel-wall .srw-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; }
@keyframes srw-rise { from { opacity: .82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 1023px) { .cf-story-reel-wall { --srw-per: 2.5; --srw-gaps: 2; } }
@media (max-width: 860px) {
.cf-story-reel-wall .srw-head { grid-template-columns: minmax(0, 1fr); }
.cf-story-reel-wall .srw-side { padding-top: 0; }
}
@media (max-width: 799px) {
.cf-story-reel-wall .srw-dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
.cf-story-reel-wall .srw-player { grid-template-columns: minmax(0, 1fr); }
.cf-story-reel-wall .srw-screen { width: 100%; height: auto; max-height: 62dvh; }
.cf-story-reel-wall .srw-aside { padding-top: clamp(20px, 3vw, 32px); }
}
@media (max-width: 639px) {
.cf-story-reel-wall { --srw-per: 1.34; --srw-gaps: 1; --srw-gap: 12px; }
.cf-story-reel-wall .srw-arrows { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.cf-story-reel-wall *, .cf-story-reel-wall *::before, .cf-story-reel-wall *::after { animation: none !important; transition: none !important; }
}
`;
pieces/proof/story-reel-wall/specimen.tsx 72 lines
import __studioImagee9e2a742 from "../assets/ef0fe50281a385e5.webp";
import __studioImagefa7ff69a from "../assets/33ffdf11e404f645.webp";
import __studioImage1006d305 from "../assets/2c36145b8c48eefc.webp";
// Specimen: Strong After Forty member stories (fictional coaching business, clearly fictional sample people).
import React from "react";
import StoryReelWall, { type StoryReelStory } from "../story-reel-wall";
import defaults from "../../studio-defaults.json";
import track from "../../fx/backdrops/track";
import home from "../../fx/backdrops/home";
import kitchen from "../../fx/backdrops/kitchen";
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = "default" | "hover" | "active" | "disabled";
export default function StoryReelWallSpecimen({ state = "default" }: { state?: SpecimenState }) {
const stories: StoryReelStory[] = [
{
name: "Dana R., 47",
result: "Deadlifted her own bodyweight in week ten",
quote: "I thought my back was the reason I couldn't lift. It turned out nobody had ever shown me how.",
poster: __studioImagee9e2a742,
src: "videos/strong-after-forty/dana-r.mp4",
duration: "0:52",
},
{
name: "Glen W., 58",
quote: "I signed up so my knees would stop aching on the stairs. Now I walk the 5K loop on Sunday mornings for fun.",
poster: track,
posterAlt: "Running track in early morning light",
},
{
name: "Marcus T., 52",
result: "Back to running 5K without stopping",
quote: "Three short sessions a week. That's it. I stopped waiting for the perfect month to start.",
poster: __studioImagefa7ff69a,
src: "videos/strong-after-forty/marcus-t.mp4",
duration: "1:14",
},
{
name: "Lorraine K., 61",
quote: "I train in my living room with two dumbbells. My granddaughter says I carry the shopping faster than she does.",
poster: home,
posterAlt: "Bright living room with space to train",
},
{
name: "Priya S., 44",
result: "Trains three times a week around a full-time job",
quote: "Thirty minutes before the school run. The plan fits my week instead of me fitting the plan.",
poster: __studioImage1006d305,
src: "videos/strong-after-forty/priya-s.mp4",
duration: "0:38",
},
{
name: "Theo M., 49",
quote: "The food side surprised me most. Breakfast actually keeps me full until lunch now.",
poster: kitchen,
posterAlt: "Kitchen counter in morning light",
},
];
return (
<StoryReelWall
headline="They got stronger after forty. Press play and hear how."
highlight="stronger after forty"
lead="Six Strong After Forty members on the week it clicked. Swipe through, press play and picture your own first month."
stories={stories}
ctaNote={defaults.sample.guarantee}
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalStoryReelWall |
string |
|
highlight OptionalStoryReelWall |
string |
|
lead OptionalStoryReelWall |
string |
|
stories OptionalStoryReelWall |
StoryReelStory[] |
|
ctaInstruction OptionalStoryReelWall |
string |
|
ctaLabel OptionalStoryReelWall |
string |
|
ctaNote OptionalStoryReelWall |
string |
|
href OptionalStoryReelWall |
string |
|
onAction OptionalStoryReelWall |
() => void |
|
onPlay OptionalStoryReelWall |
(story: StoryReelStory, index: number) => void |
|
backdropImage OptionalStoryReelWall |
string | null |
|
copy OptionalStoryReelWall |
Partial<StoryReelWallCopy> |
|
state OptionalStoryReelWall |
"default" | "hover" | "active" | "disabled" |
|
className OptionalStoryReelWall |
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-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.
This piece reads no image slots.
-
0e5c13174fe9e7d9.webp
image/webp · 165 KB
-
2c36145b8c48eefc.webp
image/webp · 46.6 KB
-
33ffdf11e404f645.webp
image/webp · 44.6 KB
-
4b82104bfd627615.webp
image/webp · 44.9 KB
-
59f3da641341e0e5.webp
image/webp · 37.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d6298af761bd1067.webp
image/webp · 41.4 KB
-
ef0fe50281a385e5.webp
image/webp · 46.1 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB