VSL Urgency Rail 1
VSL hero with an urgency rail: a sound-on notice, a framed video slot and a transcript fork, beside a rail that counts down to a supplied deadline
Use it in a prompt
Use hero/vsl-urgency-rail 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/hero/vsl-urgency-rail.tsx. - Import it and pass your copy and images (Props tab):
import { VslUrgencyRail } from "@/components/funneldna/hero/vsl-urgency-rail"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/vsl-urgency-rail/component.tsx 375 lines
// layout: classic-centred-stack
// VSL hero with an urgency rail: a sound-on notice, a framed video slot and a transcript fork, beside a rail that counts down to a supplied deadline
// (or shows what's in the offer when there is no deadline), then the price and the one action. No deadline means no clock, never an evergreen timer.
import * as React from "react";
import { Volume2, FileText, Lock } from "lucide-react";
import { Texture, Glow, FX_HOST } from "../fx/fx";
import bokeh from "../fx/textures/bokeh";
export type VslUrgencyRailItem = {
name: string;
image?: string; // item thumbnail (slot item-n)
imageAlt?: string;
};
export type VslUrgencyRailProps = {
headlineLead?: React.ReactNode; // smaller lead-in line set inside the h1, above the big promise
headline?: React.ReactNode; // the big promise
subhead?: React.ReactNode;
aside?: React.ReactNode; // italic aside in the presenter's voice, under the subhead
soundNotice?: string; // bold part of the sound-on notice above the video
soundNote?: string;
video?: React.ReactNode; // the page's real video embed; takes the place of the poster
posterImage?: string; // still shown in the video slot until the page embeds its video (slot "scene")
videoTitle?: string; // accessible name of the video slot and alt text of the poster
transcriptPrompt?: string;
transcriptLabel?: string;
transcriptHref?: string; // the fork link shows only with an href or onTranscript
onTranscript?: () => void;
deadline?: string | number | Date; // a REAL deadline (ISO string, ms or Date); omit it and the rail shows the offer without a clock
deadlineHeading?: React.ReactNode; // what ends when the clock hits zero
expiredHeading?: React.ReactNode; // shown in place of the clock once the deadline has passed
offerHeading?: React.ReactNode; // rail heading when there is no deadline
unitLabels?: { days: string; hours: string; minutes: string; seconds: string };
timerLabel?: string; // accessible timer label; "{time}" is replaced with the time left
items?: VslUrgencyRailItem[]; // what they get, shown in the rail when no clock is running
pricePrefix?: string;
price?: string;
priceNote?: string; // the value said in words beside the price
label?: string; // button label, written as the outcome
href?: string;
onAction?: () => void;
disabled?: boolean;
reassurance?: string; // one short line under the button
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_UNITS = { days: "Days", hours: "Hours", minutes: "Minutes", seconds: "Seconds" };
export function VslUrgencyRail(props: VslUrgencyRailProps) {
const {
headlineLead = "A short walkthrough for people ready to start",
headline = "Make your next move with a clear plan",
subhead = "Watch the walkthrough, then take the first step while it's fresh.",
aside = "(Grab a pen. You'll want to take notes.)",
soundNotice = "Turn your sound on and press play.",
soundNote = "The video can take a few seconds to load.",
video,
posterImage,
videoTitle = "Watch the walkthrough",
transcriptPrompt = "Prefer to read?",
transcriptLabel = "Read the transcript",
transcriptHref,
onTranscript,
deadline,
deadlineHeading = "This offer ends when the clock hits zero",
expiredHeading = "This offer window has closed.",
offerHeading = "Everything from the video, ready when you are",
unitLabels = DEFAULT_UNITS,
timerLabel = "{time} left",
items = [],
pricePrefix = "Just",
price = "",
priceNote = "",
label = "Take the first step",
href,
onAction,
disabled = false,
reassurance = "",
state = "default",
className = "",
} = props;
const headingId = React.useId();
const clock = useClock(toMs(deadline));
const counting = Boolean(clock && !clock.done);
const hasVideo = Boolean(video || posterImage);
const hasFork = Boolean(transcriptLabel && (transcriptHref || onTranscript));
const showItems = !counting && items.length > 0;
const isDisabled = disabled || state === "disabled";
const stateClass = state === "hover" ? " is-hover" : state === "active" ? " is-active" : "";
const railHeading = clock ? (clock.done ? expiredHeading : deadlineHeading) : offerHeading;
const units: { key: string; label: string; value: number; fraction: number }[] = clock
? [
...(clock.showDays ? [{ key: "d", label: unitLabels.days, value: clock.days, fraction: clock.days / clock.daysMax }] : []),
{
key: "h",
label: unitLabels.hours,
value: clock.showDays ? clock.hours : clock.days * 24 + clock.hours,
fraction: clock.hours / 24,
},
{ key: "m", label: unitLabels.minutes, value: clock.minutes, fraction: clock.minutes / 60 },
{ key: "s", label: unitLabels.seconds, value: clock.seconds, fraction: clock.seconds / 60 },
]
: [];
const timeText = units.map((u) => `${u.value} ${u.label}`).join(", ");
const handleAction = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
event.preventDefault();
return;
}
onAction?.();
};
const action =
href && !isDisabled ? (
<a className={`vur-cta${stateClass}`} href={href} onClick={handleAction}>
{label}
</a>
) : (
<button type="button" className={`vur-cta${stateClass}`} disabled={isDisabled} onClick={handleAction}>
{label}
</button>
);
return (
<section
className={`cf-vsl-urgency-rail${className ? ` ${className}` : ""}`}
style={FX_HOST}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<Texture src={bokeh} tone="band-ink" />
<Glow />
<div className="vur-inner">
<header className="vur-head">
<h1 id={headingId} className="vur-h1 vur-rise">
{headlineLead ? <span className="vur-h1-lead">{headlineLead}</span> : null}
<span className="vur-h1-main">{headline}</span>
</h1>
{subhead || aside ? (
<p className="vur-sub vur-rise vur-d1">
{subhead}
{aside ? <em className="vur-aside">{aside}</em> : null}
</p>
) : null}
</header>
<div className={`vur-stage vur-rise vur-d2${hasVideo ? "" : " is-novideo"}`}>
{hasVideo ? (
<>
{soundNotice || soundNote ? (
<p className="vur-notice">
<Volume2 className="vur-ico" strokeWidth={2.5} aria-hidden="true" />
{soundNotice ? <strong>{soundNotice}</strong> : null}
{soundNote ? <span> {soundNote}</span> : null}
</p>
) : null}
<div className="vur-frame" role="region" aria-label={videoTitle}>
{video ? video : <img src={posterImage} alt={videoTitle} decoding="async" />}
</div>
{hasFork ? (
<p className="vur-fork">
<span>{transcriptPrompt} </span>
{transcriptHref ? (
<a className="vur-link" href={transcriptHref} onClick={() => onTranscript?.()}>
<FileText strokeWidth={2.5} aria-hidden="true" />
{transcriptLabel}
</a>
) : (
<button type="button" className="vur-link" onClick={() => onTranscript?.()}>
<FileText strokeWidth={2.5} aria-hidden="true" />
{transcriptLabel}
</button>
)}
</p>
) : null}
</>
) : null}
<div className="vur-rail">
<h2 className="vur-rail-h">{railHeading}</h2>
{counting ? (
<div className="vur-rings" role="timer" aria-live="off" aria-label={timerLabel.split("{time}").join(timeText)}>
{units.map((u) => (
<Ring key={u.key} value={u.value} fraction={u.fraction} label={u.label} />
))}
</div>
) : null}
{showItems ? (
<ul className="vur-items">
{items.map((item) => (
<li key={item.name} className="vur-item">
{item.image ? (
<img className="vur-thumb" src={item.image} alt={item.imageAlt ?? ""} width={56} height={56} loading="lazy" />
) : (
<span aria-hidden="true" />
)}
<span className="vur-item-name">{item.name}</span>
</li>
))}
</ul>
) : null}
{price ? (
<div className="vur-price">
<p className="vur-price-main">
{pricePrefix ? <span className="vur-price-pre">{pricePrefix}</span> : null}
<span className="vur-price-num">{price}</span>
</p>
{priceNote ? <p className="vur-price-note">{priceNote}</p> : null}
</div>
) : null}
<div className="vur-action">
{action}
{reassurance ? (
<p className="vur-reassure">
<Lock strokeWidth={2.5} aria-hidden="true" />
{reassurance}
</p>
) : null}
</div>
</div>
</div>
</div>
</section>
);
}
export default VslUrgencyRail;
function Ring({ value, fraction, label }: { value: number; fraction: number; label: string }) {
const r = 29;
const c = 2 * Math.PI * r;
const f = Math.min(1, Math.max(0, fraction));
return (
<div className="vur-ring" aria-hidden="true">
<span className="vur-dial">
<svg viewBox="0 0 64 64" focusable="false">
<circle className="vur-track" cx="32" cy="32" r={r} />
<circle
className="vur-arc"
cx="32"
cy="32"
r={r}
strokeDasharray={c}
strokeDashoffset={c * (1 - f)}
style={{ opacity: f > 0 ? 1 : 0 }}
/>
</svg>
<span className="vur-num" suppressHydrationWarning>
{String(value).padStart(2, "0")}
</span>
</span>
<span className="vur-unit">{label}</span>
</div>
);
}
function toMs(deadline: string | number | Date | undefined): number | null {
if (deadline === undefined || deadline === null || deadline === "") return null;
const ms = deadline instanceof Date ? deadline.getTime() : typeof deadline === "number" ? deadline : Date.parse(deadline);
return Number.isFinite(ms) ? ms : null;
}
function useClock(deadlineMs: number | null) {
const [now, setNow] = React.useState(() => Date.now());
const start = React.useMemo(() => (deadlineMs === null ? 0 : Math.max(0, deadlineMs - Date.now())), [deadlineMs]);
React.useEffect(() => {
if (deadlineMs === null) return;
setNow(Date.now());
if (deadlineMs - Date.now() <= 0) return;
const id = window.setInterval(() => {
const t = Date.now();
setNow(t);
if (deadlineMs - t <= 0) window.clearInterval(id);
}, 1000);
return () => window.clearInterval(id);
}, [deadlineMs]);
if (deadlineMs === null) return null;
const left = Math.max(0, deadlineMs - now);
const total = Math.floor(left / 1000);
return {
done: left <= 0,
days: Math.floor(total / 86400),
hours: Math.floor((total % 86400) / 3600),
minutes: Math.floor((total % 3600) / 60),
seconds: total % 60,
showDays: start >= 86400000,
daysMax: Math.max(1, Math.ceil(start / 86400000)),
};
}
const CSS = `
.cf-vsl-urgency-rail{position:relative;isolation:isolate;overflow:clip;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-vsl-urgency-rail *,.cf-vsl-urgency-rail *::before,.cf-vsl-urgency-rail *::after{box-sizing:border-box}
.cf-vsl-urgency-rail .vur-inner{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-vsl-urgency-rail .vur-head{max-width:58rem;margin:0 auto;text-align:center}
.cf-vsl-urgency-rail .vur-h1{margin:0;color:var(--band-ink);font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.04;text-wrap:balance}
.cf-vsl-urgency-rail .vur-h1-lead{display:block;margin:0 0 16px;font-family:var(--font-body);font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:600;line-height:1.4;letter-spacing:0;text-transform:none;text-wrap:balance}
.cf-vsl-urgency-rail .vur-h1-main{display:block}
.cf-vsl-urgency-rail .vur-sub{max-width:44rem;margin:24px auto 0;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;text-wrap:pretty}
.cf-vsl-urgency-rail .vur-aside{display:block;margin-top:8px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-style:italic;font-weight:500;line-height:1.5}
.cf-vsl-urgency-rail .vur-stage{display:grid;grid-template-columns:minmax(0,1fr) 26rem;column-gap:clamp(24px,3vw,40px);align-items:start;margin-top:clamp(32px,4vw,48px)}
.cf-vsl-urgency-rail .vur-notice{grid-column:1;grid-row:1;justify-self:center;max-width:100%;margin:0 0 16px;padding:8px 18px;border:1px solid oklch(from var(--band-ink) l c h / .2);border-radius:999px;background:color-mix(in oklch,var(--band-ink) 12%,var(--band));color:var(--band-ink);font-size:.9375rem;font-weight:500;line-height:1.4;text-align:center;text-wrap:pretty}
.cf-vsl-urgency-rail .vur-notice strong{font-weight:800}
.cf-vsl-urgency-rail .vur-ico{display:inline-block;width:18px;height:18px;margin-inline-end:.4em;vertical-align:-.2em;color:var(--band-ink)}
.cf-vsl-urgency-rail .vur-frame{grid-column:1;grid-row:2;position:relative;aspect-ratio:16/9;overflow:clip;border-radius:12px;background:oklch(from var(--band) calc(l - 0.06) c h);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32))}
.cf-vsl-urgency-rail .vur-frame > *{display:block;width:100%;height:100%;border:0}
.cf-vsl-urgency-rail .vur-frame > img{object-fit:cover;object-position:50% 40%}
.cf-vsl-urgency-rail .vur-fork{grid-column:1;grid-row:3;margin:16px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-align:center;text-wrap:pretty}
.cf-vsl-urgency-rail .vur-link{display:inline;margin:0;padding:0;border:0;border-radius:4px;background:none;color:var(--band-ink);font:inherit;font-weight:700;text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / .5);text-decoration-thickness:1.5px;text-underline-offset:.18em;cursor:pointer}
.cf-vsl-urgency-rail .vur-link:hover{text-decoration-color:var(--band-ink)}
.cf-vsl-urgency-rail .vur-link:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-vsl-urgency-rail .vur-link svg{display:inline-block;width:18px;height:18px;margin-inline-end:.35em;vertical-align:-.2em}
.cf-vsl-urgency-rail .vur-rail{grid-column:2;grid-row:1 / span 3;display:flex;flex-direction:column;gap:24px;padding:clamp(24px,2.2vw,28px);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));background:var(--card);color:var(--ink);box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32)))}
.cf-vsl-urgency-rail .vur-rail-h{margin:0;color:var(--ink);font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-align:center;text-wrap:balance}
.cf-vsl-urgency-rail .vur-rings{display:flex;justify-content:center;gap:10px}
.cf-vsl-urgency-rail .vur-ring{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:64px}
.cf-vsl-urgency-rail .vur-dial{position:relative;display:grid;place-items:center;width:64px;height:64px}
.cf-vsl-urgency-rail .vur-dial svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;transform:rotate(-90deg)}
.cf-vsl-urgency-rail .vur-track{fill:none;stroke:oklch(from var(--ink) l c h / .14);stroke-width:3}
.cf-vsl-urgency-rail .vur-arc{fill:none;stroke:var(--accent-fill,var(--accent));stroke-width:3;stroke-linecap:round;transition:stroke-dashoffset .3s linear}
.cf-vsl-urgency-rail .vur-num{position:relative;color:var(--ink);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:-0.01em;font-variant-numeric:tabular-nums}
.cf-vsl-urgency-rail .vur-unit{color:var(--muted);font-size:.875rem;font-weight:700;line-height:1.2}
.cf-vsl-urgency-rail .vur-items{display:grid;gap:12px;margin:0;padding:12px;list-style:none;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-vsl-urgency-rail .vur-item{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;gap:16px}
.cf-vsl-urgency-rail .vur-thumb{display:block;width:56px;height:56px;border-radius:8px;object-fit:cover;filter:drop-shadow(0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .22))}
.cf-vsl-urgency-rail .vur-item-name{color:var(--ink);font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3;text-wrap:pretty}
.cf-vsl-urgency-rail .vur-price{display:flex;align-items:center;justify-content:center;gap:16px;padding-top:4px}
.cf-vsl-urgency-rail .vur-price-main{display:inline-flex;align-items:baseline;gap:10px;margin:0;color:var(--ink);font-family:var(--font-display);font-weight:var(--display-weight,800);line-height:1;white-space:nowrap}
.cf-vsl-urgency-rail .vur-price-pre{color:var(--muted);font-family:var(--font-body);font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;letter-spacing:0;text-transform:none}
.cf-vsl-urgency-rail .vur-price-num{color:var(--ink);font-size:clamp(2.5rem,4.2vw,3.75rem);letter-spacing:-0.03em;font-variant-numeric:tabular-nums}
.cf-vsl-urgency-rail .vur-price-note{min-width:0;max-width:10rem;margin:0;color:var(--muted);font-size:.9375rem;font-weight:600;line-height:1.4;text-align:left;text-wrap:balance}
.cf-vsl-urgency-rail .vur-action{display:grid;gap:12px}
.cf-vsl-urgency-rail .vur-cta{display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin:0;padding:12px 18px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.125rem;line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .35),0 8px 16px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .5));transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-vsl-urgency-rail .vur-cta:not(:disabled):hover,.cf-vsl-urgency-rail .vur-cta.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.1) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.2) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .4),0 10px 20px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .6)}
.cf-vsl-urgency-rail .vur-cta:not(:disabled):active,.cf-vsl-urgency-rail .vur-cta.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - 0.22) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3)}
.cf-vsl-urgency-rail .vur-cta:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.cf-vsl-urgency-rail .vur-cta:disabled{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:not-allowed;transform:none}
.cf-vsl-urgency-rail .vur-reassure{margin:0;color:var(--muted);font-size:.9375rem;font-weight:600;line-height:1.4;text-align:center;text-wrap:pretty}
.cf-vsl-urgency-rail .vur-reassure svg{display:inline-block;width:16px;height:16px;margin-inline-end:.4em;vertical-align:-.15em}
@keyframes vur-in{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-vsl-urgency-rail .vur-rise{animation:vur-in .45s cubic-bezier(.2,.7,.2,1) both}
.cf-vsl-urgency-rail .vur-d1{animation-delay:.07s}
.cf-vsl-urgency-rail .vur-d2{animation-delay:.14s}
.cf-vsl-urgency-rail .vur-stage.is-novideo{grid-template-columns:minmax(0,1fr)}
.cf-vsl-urgency-rail .vur-stage.is-novideo .vur-rail{grid-column:1;grid-row:auto;justify-self:center;width:100%;max-width:34rem}
@media (max-width:960px){
.cf-vsl-urgency-rail .vur-stage{grid-template-columns:minmax(0,1fr)}
.cf-vsl-urgency-rail .vur-rail{grid-column:1;grid-row:auto;justify-self:center;width:100%;max-width:34rem;margin-top:24px}
.cf-vsl-urgency-rail .vur-stage.is-novideo .vur-rail{margin-top:0}
}
@media (max-width:600px){
.cf-vsl-urgency-rail .vur-notice{border-radius:var(--radius,12px);padding:10px 16px}
.cf-vsl-urgency-rail .vur-rail{gap:20px;padding:20px}
.cf-vsl-urgency-rail .vur-cta{padding:12px 14px}
.cf-vsl-urgency-rail .vur-rings{gap:8px}
.cf-vsl-urgency-rail .vur-ring{min-width:56px}
.cf-vsl-urgency-rail .vur-dial{width:56px;height:56px}
}
@media (prefers-reduced-motion:reduce){
.cf-vsl-urgency-rail .vur-rise{animation:none}
.cf-vsl-urgency-rail .vur-arc,.cf-vsl-urgency-rail .vur-cta{transition:none}
.cf-vsl-urgency-rail .vur-cta:not(:disabled):active,.cf-vsl-urgency-rail .vur-cta.is-active:not(:disabled){transform:none}
}
`;
pieces/hero/vsl-urgency-rail/specimen.tsx 42 lines
import __studioImagea3cc34b8 from "../assets/603db010cbe714a5.webp";
import * as React from "react";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import VslUrgencyRail from "../vsl-urgency-rail";
const sample = defaults.sample;
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = "default" | "hover" | "active" | "disabled";
// The sample offer has no deadline, so the rail shows the offer and no clock (never a fake timer).
// Pass a real `deadline` and the outlined countdown rings appear in the rail.
export default function VslUrgencyRailSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<VslUrgencyRail
state={state}
headlineLead="For anyone building their very first funnel"
headline={sample.headline}
subhead={sample.lead}
aside="(Grab a pen. You'll want to plan along with me.)"
posterImage={slot(
"scene",
__studioImagea3cc34b8
)}
videoTitle={`Walkthrough: ${sample.headline}`}
transcriptHref="#transcript"
offerHeading="Everything from the video, in one download"
items={sample.items.map((item, i) => ({
name: item.name,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
price={sample.price}
priceNote="One payment. Yours to keep."
label="Start planning my funnel"
href="#start"
reassurance={sample.sublabel}
/>
);
}
| Name | Type | Details |
|---|---|---|
headlineLead OptionalVslUrgencyRail |
React.ReactNode |
|
headline OptionalVslUrgencyRail |
React.ReactNode |
|
subhead OptionalVslUrgencyRail |
React.ReactNode |
|
aside OptionalVslUrgencyRail |
React.ReactNode |
|
soundNotice OptionalVslUrgencyRail |
string |
|
soundNote OptionalVslUrgencyRail |
string |
|
video OptionalVslUrgencyRail |
React.ReactNode |
|
posterImage OptionalVslUrgencyRail |
string |
|
videoTitle OptionalVslUrgencyRail |
string |
|
transcriptPrompt OptionalVslUrgencyRail |
string |
|
transcriptLabel OptionalVslUrgencyRail |
string |
|
transcriptHref OptionalVslUrgencyRail |
string |
|
onTranscript OptionalVslUrgencyRail |
() => void |
|
deadline OptionalVslUrgencyRail |
string | number | Date |
|
deadlineHeading OptionalVslUrgencyRail |
React.ReactNode |
|
expiredHeading OptionalVslUrgencyRail |
React.ReactNode |
|
offerHeading OptionalVslUrgencyRail |
React.ReactNode |
|
unitLabels OptionalVslUrgencyRail |
{ days: string; hours: string; minutes: string; seconds: string } |
|
timerLabel OptionalVslUrgencyRail |
string |
|
items OptionalVslUrgencyRail |
VslUrgencyRailItem[] |
|
pricePrefix OptionalVslUrgencyRail |
string |
|
price OptionalVslUrgencyRail |
string |
|
priceNote OptionalVslUrgencyRail |
string |
|
label OptionalVslUrgencyRail |
string |
|
href OptionalVslUrgencyRail |
string |
|
onAction OptionalVslUrgencyRail |
() => void |
|
disabled OptionalVslUrgencyRail |
boolean |
|
reassurance OptionalVslUrgencyRail |
string |
|
state OptionalVslUrgencyRail |
"default" | "hover" | "active" | "disabled" |
|
className OptionalVslUrgencyRail |
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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
scene- A wide atmosphere photo behind or beside the copy.
-
1349b95283af37a5.webp
image/webp · 97.5 KB
-
603db010cbe714a5.webp
image/webp · 46.5 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB