Value Video 1
The lesson on stage: part one of a free lesson sits spotlit in a bento, chapter rows seek the player, and one email field asks for part two (the open loop).
Use it in a prompt
Use content/value-video 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/value-video.tsx. - Import it and pass your copy and images (Props tab):
import { ValueVideo } from "@/components/funneldna/content/value-video"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/value-video/component.tsx 499 lines
// layout: bento-grid
// The lesson on stage: part one of a free lesson sits spotlit in a bento, chapter rows seek the player, and one email field asks for part two (the open loop).
import * as React from 'react';
import { AlertCircle, Loader2, Play, ShieldCheck } from 'lucide-react';
import { FX_HOST, Spotlight } from '../fx/fx';
export type ValueVideoChapter = {
start: string; // timestamp where the chapter begins, 'm:ss' or 'h:mm:ss'
title: string;
detail?: string; // what this stretch of the lesson teaches
};
export type ValueVideoNext = {
title: string; // name of the next video (part two)
image?: string; // thumbnail of the next video (slot item-2)
imageAlt?: string;
runtime?: string; // e.g. '11 min'
adds?: string[]; // what part two adds that part one does not, numbered inline
};
// Templates: {n} chapter number, {count} chapter total, {start} timestamp, {title} chapter or next-video title.
export type ValueVideoCopy = {
playLabel: string;
playFrom: string;
caption: string;
chaptersHeading: string;
chaptersHint: string;
selected: string; // screen-reader note on the active chapter
nextHeading: string;
addsLead: string;
emailLabel: string;
emailPlaceholder: string;
submit: string;
submitting: string;
errorEmpty: string;
errorInvalid: string;
submitError: string;
privacy: string;
sampleInvalidEmail: string; // pre-filled value for the error state preview
};
export type ValueVideoProps = {
headline?: string;
highlight?: string; // phrase inside the headline that gets the marker stroke
lead?: string;
posterImage?: string; // still of the free lesson (slot item-1)
posterAlt?: string;
embed?: React.ReactNode; // the page's real video embed; replaces the poster and play button
runtime?: string; // e.g. '15 min'
chapters?: ValueVideoChapter[];
initialChapter?: number;
next?: ValueVideoNext;
copy?: Partial<ValueVideoCopy>;
onPlay?: (startSeconds: number, chapter: ValueVideoChapter | undefined, index: number) => void;
onSeek?: (startSeconds: number, chapter: ValueVideoChapter, index: number) => void;
onSubmit?: (values: { email: string }) => void | Promise<unknown>;
disabled?: boolean;
state?: 'default' | 'error' | 'disabled';
className?: string;
};
const DEFAULT_COPY: ValueVideoCopy = {
playLabel: 'Play the free lesson',
playFrom: 'Starts at {start}',
caption: 'Chapter {n} of {count} · {start} · {title}',
chaptersHeading: 'Skip to the part you need',
chaptersHint: 'Tap a chapter and the lesson jumps straight there.',
selected: '(selected)',
nextHeading: 'Part 2: {title}',
addsLead: 'Part 1 solves the first problem. Part 2 shows you what to do next.',
emailLabel: 'Where should we send part 2?',
emailPlaceholder: 'you@example.com',
submit: 'Send me part 2',
submitting: 'Sending part 2…',
errorEmpty: 'Enter your email so we know where to send part 2.',
errorInvalid: 'That email looks incomplete. Check it and try again.',
submitError: 'We couldn’t send it just now. Please try again.',
privacy: 'We respect your inbox. Unsubscribe anytime.',
sampleInvalidEmail: 'sam@example',
};
const DEFAULT_CHAPTERS: ValueVideoChapter[] = [
{ start: '0:00', title: 'The problem this lesson solves', detail: 'Why the usual fix keeps failing.' },
{ start: '3:00', title: 'The method, step by step', detail: 'Follow along as each step is shown.' },
{ start: '8:00', title: 'Check your own result', detail: 'How to tell it worked before you move on.' },
];
const DEFAULT_NEXT: ValueVideoNext = { title: 'Put it into practice' };
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
export function ValueVideo({
headline = 'Watch the free lesson',
highlight = 'free lesson',
lead = 'Part 1 plays right here. No email needed.',
posterImage,
posterAlt = '',
embed,
runtime = '',
chapters = DEFAULT_CHAPTERS,
initialChapter = 0,
next = DEFAULT_NEXT,
copy: copyProp,
onPlay,
onSeek,
onSubmit,
disabled = false,
state = 'default',
className,
}: ValueVideoProps) {
const copy = { ...DEFAULT_COPY, ...copyProp };
const uid = React.useId().replace(/:/g, '');
const count = chapters.length;
const clampIndex = (i: number) => Math.min(Math.max(i, 0), Math.max(count - 1, 0));
const [active, setActive] = React.useState(() => clampIndex(initialChapter));
const [email, setEmail] = React.useState(state === 'error' ? copy.sampleInvalidEmail : '');
const [touched, setTouched] = React.useState(state === 'error');
const [loading, setLoading] = React.useState(false);
const [sendError, setSendError] = React.useState<string | null>(null);
const inputRef = React.useRef<HTMLInputElement>(null);
const alive = React.useRef(true);
React.useEffect(() => {
alive.current = true;
return () => {
alive.current = false;
};
}, []);
React.useEffect(() => {
setEmail(state === 'error' ? copy.sampleInvalidEmail : '');
setTouched(state === 'error');
setSendError(null);
}, [state, copy.sampleInvalidEmail]);
const isOff = disabled || state === 'disabled';
const trimmed = email.trim();
const valid = EMAIL_RE.test(trimmed);
const fieldError = touched ? (!trimmed ? copy.errorEmpty : !valid ? copy.errorInvalid : null) : null;
const blocked = isOff || loading || (trimmed !== '' && !valid);
const activeIndex = clampIndex(active);
const current = chapters[activeIndex];
const start = current ? current.start : '0:00';
const adds = next.adds ?? [];
const errorId = `${uid}-err`;
const seek = (i: number) => {
const chapter = chapters[i];
if (!chapter) return;
setActive(i);
onSeek?.(toSeconds(chapter.start), chapter, i);
};
const play = () => {
onPlay?.(toSeconds(start), current, activeIndex);
};
const onListKey = (event: React.KeyboardEvent<HTMLOListElement>) => {
if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return;
const buttons = Array.from(event.currentTarget.querySelectorAll<HTMLButtonElement>('button'));
const at = buttons.indexOf(document.activeElement as HTMLButtonElement);
if (at < 0) return;
event.preventDefault();
const step = event.key === 'ArrowDown' ? 1 : -1;
buttons[(at + step + buttons.length) % buttons.length]?.focus();
};
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (isOff || loading) return;
setTouched(true);
setSendError(null);
if (!valid) {
inputRef.current?.focus();
return;
}
setLoading(true);
try {
await onSubmit?.({ email: trimmed });
} catch {
if (alive.current) setSendError(copy.submitError);
} finally {
if (alive.current) setLoading(false);
}
};
return (
<section
className={`cf-value-video${className ? ` ${className}` : ''}`}
style={FX_HOST}
aria-labelledby={`${uid}-h`}
>
<style dangerouslySetInnerHTML={{ __html: CSS }} />
<Spotlight />
<div className='cf-vv-wrap'>
<header className='cf-vv-head cf-vv-rise'>
<h2 id={`${uid}-h`} className='cf-vv-h2'>
{renderHeadline(headline, highlight)}
</h2>
{lead ? <p className='cf-vv-lead'>{lead}</p> : null}
</header>
<div className='cf-vv-grid'>
<figure className='cf-vv-player cf-vv-rise' style={{ '--d': '.07s' } as React.CSSProperties}>
<div className={`cf-vv-frame${embed ? ' is-embed' : ''}`}>
{embed ? (
<div className='cf-vv-embed'>{embed}</div>
) : (
<>
{posterImage ? (
<img src={posterImage} alt={posterAlt} width={1600} height={900} decoding='async' />
) : null}
<div className='cf-vv-playwrap'>
<button type='button' className='cf-vv-btn cf-vv-play' onClick={play}>
<span className='cf-vv-disc' aria-hidden='true'>
<Play fill='currentColor' strokeWidth={2.5} />
</span>
<span className='cf-vv-playtext'>
<span className='cf-vv-playlabel'>{copy.playLabel}</span>
<span className='cf-vv-playsub'>
{runtime ? `${runtime} · ` : ''}
{fill(copy.playFrom, { start })}
</span>
</span>
</button>
</div>
</>
)}
</div>
{current ? (
<figcaption className='cf-vv-caption' aria-live='polite'>
{fill(copy.caption, { n: activeIndex + 1, count, start: current.start, title: current.title })}
</figcaption>
) : null}
</figure>
{count ? (
<div className='cf-vv-chapters cf-vv-card cf-vv-rise' style={{ '--d': '.14s' } as React.CSSProperties}>
<h3 className='cf-vv-h3'>{copy.chaptersHeading}</h3>
{copy.chaptersHint ? <p className='cf-vv-hint'>{copy.chaptersHint}</p> : null}
<ol className='cf-vv-list' onKeyDown={onListKey}>
{chapters.map((chapter, i) => {
const on = i === activeIndex;
return (
<li key={`${chapter.start}-${i}`}>
<button
type='button'
className='cf-vv-row'
aria-current={on ? 'true' : undefined}
onClick={() => seek(i)}
>
<span className='cf-vv-time'>{chapter.start}</span>
<span className='cf-vv-rowtext'>
<span className='cf-vv-rowtitle'>
{chapter.title}
{on ? <span className='cf-vv-sr'> {copy.selected}</span> : null}
</span>
{chapter.detail ? <span className='cf-vv-rowdetail'>{chapter.detail}</span> : null}
</span>
<span className='cf-vv-now' aria-hidden='true'>
{on ? <Play size={16} fill='currentColor' strokeWidth={2.5} /> : null}
</span>
</button>
</li>
);
})}
</ol>
</div>
) : null}
<div className='cf-vv-ask cf-vv-card cf-vv-rise' style={{ '--d': '.21s' } as React.CSSProperties}>
<div className={`cf-vv-next${next.image ? ' has-thumb' : ''}`}>
{next.image ? (
<img
className='cf-vv-thumb'
src={next.image}
alt={next.imageAlt ?? ''}
width={320}
height={180}
loading='lazy'
decoding='async'
/>
) : null}
<div>
<h3 id={`${uid}-ask`} className='cf-vv-h3'>
{fill(copy.nextHeading, { title: next.title })}
</h3>
{next.runtime ? <p className='cf-vv-meta'>{next.runtime}</p> : null}
</div>
</div>
{copy.addsLead ? <p className='cf-vv-addslead'>{copy.addsLead}</p> : null}
{adds.length ? (
<ol className='cf-vv-adds'>
{adds.map((item, i) => (
<li key={`${i}-${item}`}>
<span className='cf-vv-num' aria-hidden='true'>
{i + 1}
</span>
<span>{item}</span>
</li>
))}
</ol>
) : null}
<form className='cf-vv-form' noValidate onSubmit={handleSubmit} aria-labelledby={`${uid}-ask`}>
<label className='cf-vv-label' htmlFor={`${uid}-email`}>
{copy.emailLabel}
</label>
<input
ref={inputRef}
id={`${uid}-email`}
className='cf-vv-input'
type='email'
name='email'
autoComplete='email'
inputMode='email'
placeholder={copy.emailPlaceholder}
value={email}
disabled={isOff}
aria-invalid={fieldError ? 'true' : undefined}
aria-describedby={fieldError ? errorId : undefined}
onChange={(event) => {
setEmail(event.target.value);
if (sendError) setSendError(null);
}}
onBlur={() => setTouched(true)}
/>
{fieldError ? (
<p id={errorId} className='cf-vv-error' role='alert'>
<AlertCircle className='cf-vv-inl' size={16} strokeWidth={2.5} aria-hidden='true' />
{fieldError}
</p>
) : null}
<button
type='submit'
className='cf-vv-btn cf-vv-submit'
disabled={blocked}
aria-busy={loading ? 'true' : undefined}
>
{loading ? (
<>
<Loader2 className='cf-vv-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{copy.submitting}</span>
</>
) : (
<span>{copy.submit}</span>
)}
</button>
{sendError ? (
<p className='cf-vv-error' role='alert'>
<AlertCircle className='cf-vv-inl' size={16} strokeWidth={2.5} aria-hidden='true' />
{sendError}
</p>
) : null}
{copy.privacy ? (
<p className='cf-vv-privacy'>
<ShieldCheck className='cf-vv-inl' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.privacy}
</p>
) : null}
</form>
</div>
</div>
</div>
</section>
);
}
export default ValueVideo;
function renderHeadline(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-vv-hl'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
function toSeconds(stamp: string): number {
return stamp.split(':').reduce((total, part) => total * 60 + (Number.parseInt(part, 10) || 0), 0);
}
function fill(template: string, values: Record<string, string | number>): string {
return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in values ? String(values[key]) : match));
}
const SH = 'var(--shadow,oklch(.22 .03 260))';
const CSS = `
.cf-value-video{position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-value-video *,.cf-value-video *::before,.cf-value-video *::after{box-sizing:border-box}
.cf-vv-wrap{position:relative;z-index:1;max-width:1040px;margin:0 auto}
.cf-vv-head{max-width:52rem;margin:0 auto clamp(32px,4vw,48px);text-align:center}
.cf-vv-h2{margin:0;font-family:var(--font-display);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);color:var(--band-ink);text-wrap:balance;font-variant-numeric:lining-nums}
.cf-vv-hl{background-image:linear-gradient(oklch(from var(--accent-fill,var(--accent)) l c h / .55),oklch(from var(--accent-fill,var(--accent)) l c h / .55));background-repeat:no-repeat;background-size:100% .5em;background-position:0 86%;padding:0 .1em;margin:0 -.05em;border-radius:.08em .14em .1em .16em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-vv-lead{max-width:44rem;margin:16px auto 0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--band-ink);text-wrap:pretty}
.cf-vv-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;align-items:stretch}
.cf-vv-player{grid-column:1/-1;margin:0}
.cf-vv-chapters{grid-column:1/span 7;display:flex;flex-direction:column}
.cf-vv-ask{grid-column:8/span 5}
.cf-vv-frame{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:oklch(from var(--band) calc(l - .06) c h);box-shadow:var(--shadow-lg,0 2px 4px oklch(from ${SH} l c h / .22),0 12px 24px -8px oklch(from ${SH} l c h / .32))}
.cf-vv-frame img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center 40%}
.cf-vv-frame:not(.is-embed)::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,oklch(from var(--band) l c h / .08),oklch(from var(--band) l c h / .42))}
.cf-vv-embed{position:absolute;inset:0}
.cf-vv-embed > *{display:block;width:100%;height:100%;border:0}
.cf-vv-playwrap{position:absolute;inset:0;z-index:2;display:grid;place-items:center;padding:12px}
.cf-vv-btn{display:inline-flex;align-items:center;justify-content:center;gap:12px;border:0;cursor:pointer;color:var(--button-ink,var(--cta-ink));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));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);text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from ${SH} l c h / .3),0 8px 16px -6px oklch(from ${SH} l c h / .42));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
.cf-vv-btn:hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));transform:translateY(-1px)}
.cf-vv-btn:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .2) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h)}
.cf-vv-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-vv-play:focus-visible{outline-color:var(--band-ink)}
.cf-vv-btn:disabled:not([aria-busy='true']){background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:not-allowed}
.cf-vv-btn[aria-busy='true']{cursor:progress}
.cf-vv-play{max-width:100%;min-height:72px;padding:0 28px 0 12px;text-align:left}
.cf-vv-disc{flex:none;display:grid;place-items:center;width:48px;height:48px;border-radius:999px;background:oklch(from var(--button-ink,var(--cta-ink)) l c h / .2)}
.cf-vv-disc svg{width:20px;height:20px;margin-left:2px}
.cf-vv-playtext{display:grid;gap:2px}
.cf-vv-playlabel{font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15}
.cf-vv-playsub{font-family:var(--font-body);font-size:14px;line-height:1.2;font-weight:700;font-variant-numeric:tabular-nums}
.cf-vv-caption{margin:16px 0 0;text-align:center;font-size:15px;line-height:1.4;font-weight:600;color:var(--band-ink);font-variant-numeric:tabular-nums;text-wrap:pretty}
.cf-vv-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,0 1px 2px oklch(from ${SH} l c h / .22),0 4px 10px -2px oklch(from ${SH} l c h / .2)));padding:clamp(20px,3vw,32px)}
.cf-vv-ask{border-color:color-mix(in oklch,var(--accent) 35%,var(--card));box-shadow:var(--shadow-lg,0 2px 4px oklch(from ${SH} l c h / .22),0 12px 24px -8px oklch(from ${SH} l c h / .32))}
.cf-vv-h3{margin:0;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);color:var(--ink);text-wrap:balance}
.cf-vv-hint{margin:8px 0 0;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-vv-list{list-style:none;margin:16px -12px 0;padding:0;display:grid;gap:4px;flex:1 1 auto;align-content:space-between}
.cf-vv-row{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) 20px;align-items:start;gap:14px;padding:12px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:background .16s ease}
.cf-vv-row:hover{background:color-mix(in oklch,var(--ink) 5%,var(--card))}
.cf-vv-row:active{background:color-mix(in oklch,var(--ink) 8%,var(--card))}
.cf-vv-row[aria-current='true']{background:color-mix(in oklch,var(--accent) 10%,var(--card))}
.cf-vv-row[aria-current='true']:hover{background:color-mix(in oklch,var(--accent) 14%,var(--card))}
.cf-vv-row:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-vv-time{min-width:60px;min-height:30px;display:inline-flex;align-items:center;justify-content:center;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--ink);font-family:var(--font-body);font-size:14px;line-height:1.2;font-weight:800;font-variant-numeric:tabular-nums lining-nums;transition:background .16s ease}
.cf-vv-row:hover:not([aria-current='true']) .cf-vv-time{background:color-mix(in oklch,var(--ink) 10%,var(--card))}
.cf-vv-row[aria-current='true'] .cf-vv-time{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-vv-rowtext{display:grid;gap:2px;min-width:0;padding-top:4px}
.cf-vv-rowtitle{font-size:17px;line-height:1.3;font-weight:700;color:var(--ink);text-wrap:pretty}
.cf-vv-row[aria-current='true'] .cf-vv-rowtitle{font-weight:800}
.cf-vv-rowdetail{font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-vv-now{display:grid;place-items:center;height:30px;color:var(--accent)}
.cf-vv-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-vv-next{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.cf-vv-next.has-thumb{grid-template-columns:148px minmax(0,1fr)}
.cf-vv-thumb{display:block;width:100%;aspect-ratio:16/9;height:auto;object-fit:cover;object-position:center;border-radius:8px}
.cf-vv-meta{margin:8px 0 0;font-size:15px;line-height:1.4;font-weight:600;color:var(--muted)}
.cf-vv-addslead{margin:24px 0 0;font-size:17px;line-height:1.5;font-weight:600;color:var(--ink);text-wrap:pretty}
.cf-vv-adds{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:12px}
.cf-vv-adds li{display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:baseline;font-size:17px;line-height:1.45;color:var(--ink);text-wrap:pretty}
.cf-vv-num{font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;font-weight:800;color:var(--accent);font-variant-numeric:tabular-nums lining-nums}
.cf-vv-form{margin-top:24px}
.cf-vv-label{display:block;margin:0 0 8px;font-size:17px;line-height:1.3;font-weight:700;color:var(--label-ink,var(--ink))}
.cf-vv-input{display:block;width:100%;min-height:56px;padding:0 16px;font-family:var(--font-body);font-size:17px;font-weight:500;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));-webkit-appearance:none;appearance:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-vv-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-vv-input:hover:not(:disabled):not(:focus):not([aria-invalid='true']){border-color:color-mix(in oklch,var(--field-ink) 40%,var(--field))}
.cf-vv-input:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-vv-input[aria-invalid='true']{border-color:var(--danger)}
.cf-vv-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-vv-input:disabled{background:color-mix(in oklch,var(--ink) 5%,var(--field));cursor:not-allowed}
.cf-vv-error{margin:8px 0 0;font-size:15px;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
.cf-vv-submit{width:100%;min-height:56px;margin-top:12px;padding:12px 16px;font-size:clamp(1.0625rem,1.3vw,1.1875rem);line-height:1.15;text-align:center}
.cf-vv-submit > span{text-wrap:balance}
.cf-vv-privacy{margin:12px 0 0;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-vv-inl{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-vv-spin{animation:cf-vv-spin .8s linear infinite}
@keyframes cf-vv-spin{to{transform:rotate(360deg)}}
@keyframes cf-vv-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-vv-rise{animation:cf-vv-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--d,0s)}
@media (max-width:900px){
.cf-vv-grid{grid-template-columns:minmax(0,1fr);gap:16px}
.cf-vv-chapters,.cf-vv-ask{grid-column:1/-1}
}
@media (max-width:640px){
.cf-vv-player{margin-inline:calc(-1 * clamp(16px,5vw,48px))}
.cf-vv-frame{border-radius:0}
.cf-vv-frame:not(.is-embed){aspect-ratio:4/3}
.cf-vv-list{align-content:start}
.cf-vv-caption{padding-inline:clamp(16px,5vw,48px)}
.cf-vv-play{min-height:56px;padding:0 20px 0 8px;gap:10px}
.cf-vv-disc{width:40px;height:40px}
.cf-vv-disc svg{width:18px;height:18px}
.cf-vv-playlabel{font-size:1.0625rem}
.cf-vv-list{margin-top:12px}
.cf-vv-row{gap:12px;padding:10px 12px}
.cf-vv-time{min-width:56px}
.cf-vv-row:not([aria-current='true']) .cf-vv-rowdetail{display:none}
.cf-vv-next.has-thumb{grid-template-columns:112px minmax(0,1fr);gap:14px}
.cf-vv-addslead{margin-top:20px}
}
@media (prefers-reduced-motion:reduce){
.cf-vv-rise,.cf-vv-spin{animation:none}
.cf-vv-btn,.cf-vv-row,.cf-vv-time,.cf-vv-input{transition:none}
.cf-vv-btn:hover:not(:disabled),.cf-vv-btn:active:not(:disabled){transform:none}
}
`;
pieces/content/value-video/specimen.tsx 55 lines
import __studioImage82136e6f from "../assets/8e6e2fce6b3f932b.webp";
import __studioImagecc1fb5fa from "../assets/dc05beef6eb94642.webp";
import * as React from 'react';
import { ValueVideo } from '../value-video';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'error', 'disabled'];
export default function ValueVideoSpecimen({ state = 'default' }: { state?: 'default' | 'error' | 'disabled' }) {
return (
<ValueVideo
state={state}
headline='How to find a roof leak in 15 minutes'
highlight='in 15 minutes'
lead='A free lesson from Ridgeway Roofing. Grab a flashlight, press play and you’ll know where the water gets in. Part 1 needs no email.'
posterImage={slot(
'item-1',
__studioImage82136e6f
)}
posterAlt='A roofer in an attic shining a flashlight on a damp patch of roof decking'
runtime='15 min'
chapters={[
{ start: '0:00', title: 'Read the stain on your ceiling', detail: 'What its shape tells you about where the water started.' },
{ start: '2:10', title: 'Find the wet spot in the attic', detail: 'The flashlight angle that makes damp decking shine.' },
{ start: '5:30', title: 'Trace it uphill to the source', detail: 'Why the leak is rarely right above the stain.' },
{ start: '8:45', title: 'Check the four usual suspects', detail: 'Vent boots, flashing, nail pops and valleys.' },
{ start: '12:20', title: 'Confirm it with the hose test', detail: 'One helper, one garden hose, no climbing guesswork.' },
]}
next={{
title: 'Patch it before the next storm',
runtime: 'Free · 11 min',
image: slot(
'item-2',
__studioImagecc1fb5fa
),
imageAlt: 'Gloved hands sealing around a roof vent on asphalt shingles',
adds: [
'The temporary patch that holds until a roofer can get there',
'Which fixes are safe to do yourself, and which aren’t',
'What a fair repair quote should include',
],
}}
copy={{
addsLead: 'Part 1 shows you where the water gets in. Part 2 shows you how to stop it:',
emailLabel: 'Where should we send part 2?',
submit: 'Show me how to patch it',
submitting: 'Sending part 2…',
errorEmpty: 'Enter your email so we can send you part 2.',
privacy: defaults.sample.registration.privacy,
sampleInvalidEmail: 'pat@example',
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalValueVideo |
string |
Default 'Watch the free lesson'
|
highlight OptionalValueVideo |
string |
Default 'free lesson'
|
lead OptionalValueVideo |
string |
Default 'Part 1 plays right here. No email needed.'
|
posterImage OptionalValueVideo |
string |
|
posterAlt OptionalValueVideo |
string |
Default ''
|
embed OptionalValueVideo |
React.ReactNode |
|
runtime OptionalValueVideo |
string |
Default ''
|
chapters OptionalValueVideo |
ValueVideoChapter[] |
Default DEFAULT_CHAPTERS
|
initialChapter OptionalValueVideo |
number |
Default 0
|
next OptionalValueVideo |
ValueVideoNext |
Default DEFAULT_NEXT
|
copy OptionalValueVideo |
Partial<ValueVideoCopy> |
|
onPlay OptionalValueVideo |
(startSeconds: number, chapter: ValueVideoChapter | undefined, index: number) => void |
|
onSeek OptionalValueVideo |
(startSeconds: number, chapter: ValueVideoChapter, index: number) => void |
|
onSubmit OptionalValueVideo |
(values: { email: string }) => void | Promise<unknown> |
|
disabled OptionalValueVideo |
boolean |
Default false
|
state OptionalValueVideo |
'default' | 'error' | 'disabled' |
Default 'default'
|
className OptionalValueVideo |
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-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--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
8e6e2fce6b3f932b.webp
image/webp · 89.2 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
dc05beef6eb94642.webp
image/webp · 115 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB