Welcome Video 1
Gets every new lead or buyer to watch the welcome video first, then take the one next step.
Use it in a prompt
Use checkout/welcome-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/checkout/welcome-video.tsx. - Import it and pass your copy and images (Props tab):
import { WelcomeVideo } from "@/components/funneldna/checkout/welcome-video"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/welcome-video/component.tsx 680 lines
// Gets every new lead or buyer to watch the welcome video first, then take the one next step.
// layout: scroll-panels
// Thank-you welcome video: a huge "Watch this first" hook, the founder's framed hello behind a play cover that loads the
// page's real video, its chapter and runtime, then one loud next-step button so every new lead or buyer acts right away.
import * as React from "react"
import { AlertCircle, Clock3, Loader2, Play, RotateCcw } from "lucide-react"
export type WelcomeVideoItem = {
image: string
alt: string
}
export type WelcomeVideoProps = {
/** Big hook line; the `highlight` phrase inside it gets one marker stroke. */
headline?: string
highlight?: string
subheadline?: string
/** Still of the host shown on the play cover (slot: presenter). */
posterImage?: string
posterAlt?: string
/** The page's real embed (iframe or player), revealed inside the frame when the cover is pressed. */
video?: React.ReactNode
/** Or a direct video file URL, played in a native video element when the cover is pressed. */
videoSrc?: string
chapterNumber?: string
chapterTitle?: string
/** Runtime shown on the cover and under the frame, e.g. "2:14". */
duration?: string
playLabel?: string
/** Accessible name of the play cover; "{duration}" is replaced with the runtime. */
playAriaLabel?: string
/** Screen-reader runtime text; "{duration}" is replaced with the runtime. */
runtimeLabel?: string
videoLoadingLabel?: string
errorTitle?: string
retryLabel?: string
ctaLabel?: string
ctaLoadingLabel?: string
/** One short reassurance line under the button. */
ctaNote?: string
/** What they get, shown as small product thumbnails beside the note. */
items?: WelcomeVideoItem[]
href?: string
onAction?: () => void
/** Fires when the play cover is pressed (also when no video is supplied, so the builder can open one). */
onPlay?: () => void
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled" | "loading" | "error"
className?: string
}
export function WelcomeVideo(props: WelcomeVideoProps) {
const {
headline = "Watch this first",
highlight = "this first",
subheadline = "A personal welcome before you dive in.",
posterImage,
posterAlt = "The founder recording a personal welcome video at his desk",
video,
videoSrc,
chapterNumber = "01",
chapterTitle = "Welcome & getting started",
duration = "2:14",
playLabel = "Watch the welcome",
playAriaLabel = "Play the welcome video ({duration})",
runtimeLabel = "Runtime {duration}",
videoLoadingLabel = "Loading your welcome video…",
errorTitle = "The welcome video didn't load.",
retryLabel = "Try again",
ctaLabel = "Download My Kit",
ctaLoadingLabel = "Preparing your kit…",
ctaNote = "Guide, workbook, and checklist",
items = [],
href,
onAction,
onPlay,
disabled = false,
state = "default",
className,
} = props
const headingId = React.useId()
const [playing, setPlaying] = React.useState(false)
const [buffering, setBuffering] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const [attempt, setAttempt] = React.useState(0)
const hasVideo = Boolean(video) || Boolean(videoSrc)
const showError = state === "error" || failed
const ctaBusy = state === "loading"
const ctaOff = disabled || state === "disabled"
const forced = state === "hover" ? " is-hover" : state === "active" ? " is-active" : ""
const play = () => {
onPlay?.()
if (!hasVideo) return
setFailed(false)
setPlaying(true)
if (!video && videoSrc) setBuffering(true)
}
const retry = () => {
setFailed(false)
setAttempt((n) => n + 1)
if (!video && videoSrc) {
setPlaying(true)
setBuffering(true)
}
}
const ctaInner = ctaBusy ? (
<>
<Loader2 className="wv-spin" aria-hidden="true" />
<span>{ctaLoadingLabel}</span>
</>
) : (
<span>{ctaLabel}</span>
)
const ctaClass = "wv-cta" + forced + (ctaBusy ? " is-loading" : "")
return (
<div className={["cf-welcome-video", className].filter(Boolean).join(" ")} role="group" aria-labelledby={headingId}>
<style>{CSS}</style>
<header className="wv-head wv-rise">
<h2 id={headingId} className="wv-title">
{markPhrase(headline, highlight)}
</h2>
{subheadline ? <p className="wv-sub">{subheadline}</p> : null}
</header>
<div className="wv-stage wv-rise wv-rise-1">
<div className="wv-frame">
<div className="wv-screen">
{playing && !showError ? (
video ? (
<div className="wv-embed">{video}</div>
) : videoSrc ? (
<video
key={attempt}
className="wv-native"
src={videoSrc}
poster={posterImage}
controls
autoPlay
playsInline
onPlaying={() => setBuffering(false)}
onCanPlay={() => setBuffering(false)}
onError={() => {
setFailed(true)
setBuffering(false)
}}
/>
) : null
) : null}
{!(playing && hasVideo) && !showError ? (
<button
type="button"
className={"wv-cover" + forced}
onClick={play}
aria-label={fill(playAriaLabel, duration)}
>
{posterImage ? (
<img
className="wv-poster"
src={posterImage}
alt={posterAlt}
width={1280}
height={720}
loading="eager"
decoding="async"
/>
) : null}
<span className="wv-play" aria-hidden="true">
<span className="wv-disc">
<Play fill="currentColor" strokeWidth={0} />
</span>
<span className="wv-pill">
<span>{playLabel}</span>
<span className="wv-dot" />
<span className="wv-pill-time">{duration}</span>
</span>
</span>
</button>
) : null}
{buffering && !showError ? (
<div className="wv-overlay" role="status">
<Loader2 className="wv-ico wv-spin" aria-hidden="true" />
<p>{videoLoadingLabel}</p>
</div>
) : null}
{showError ? (
<div className="wv-overlay" role="alert">
<AlertCircle className="wv-ico" aria-hidden="true" />
<p>{errorTitle}</p>
<button type="button" className="wv-retry" onClick={retry}>
<RotateCcw aria-hidden="true" />
<span>{retryLabel}</span>
</button>
</div>
) : null}
</div>
</div>
</div>
<div className="wv-chapter wv-rise wv-rise-2">
<span className="wv-num">{chapterNumber}</span>
<span className="wv-ctitle">{chapterTitle}</span>
<span className="wv-time">
<Clock3 aria-hidden="true" />
<span className="wv-sr">{fill(runtimeLabel, duration)}</span>
<span aria-hidden="true">{duration}</span>
</span>
</div>
<div className="wv-action wv-rise wv-rise-3">
{href && !ctaOff && !ctaBusy ? (
<a className={ctaClass} href={href} onClick={() => onAction?.()}>
{ctaInner}
</a>
) : (
<button
type="button"
className={ctaClass}
disabled={ctaOff}
aria-busy={ctaBusy || undefined}
aria-disabled={ctaBusy || undefined}
onClick={() => {
if (ctaBusy || ctaOff) return
onAction?.()
}}
>
{ctaInner}
</button>
)}
{ctaNote || items.length ? (
<div className="wv-note">
{items.length ? (
<span className="wv-thumbs">
{items.slice(0, 4).map((item, i) => (
<img key={i} src={item.image} alt={item.alt} width={80} height={80} loading="lazy" decoding="async" />
))}
</span>
) : null}
{ctaNote ? <span className="wv-note-text">{ctaNote}</span> : null}
</div>
) : null}
</div>
</div>
)
}
export default WelcomeVideo
function fill(template: string, duration: string) {
return template.split("{duration}").join(duration)
}
function markPhrase(text: string, phrase?: string) {
if (!phrase) return text
const at = text.lastIndexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="wv-mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
/* The marker hue keeps the documented #fae37c default as the last fallback inside var(). */
const CSS = `
.cf-welcome-video{
--wv-r:var(--card-radius,var(--radius,0.875rem));
--wv-shade:var(--shadow,oklch(0.22 0.03 260));
--wv-cta:var(--button-bg,var(--cta,oklch(0.58 0.21 29)));
--wv-cta-2:var(--button-bg-2,var(--cta-2,oklch(0.5 0.2 29)));
--wv-marker:color-mix(in oklch,var(--marker,#fae37c) 80%,transparent);
--wv-off:12px;
box-sizing:border-box;
width:100%;
max-width:60rem;
margin-inline:auto;
display:flex;
flex-direction:column;
align-items:center;
text-align:center;
color:var(--ink);
font-family:var(--font-body);
}
.cf-welcome-video *,.cf-welcome-video *::before,.cf-welcome-video *::after{box-sizing:border-box}
.cf-welcome-video .wv-head{width:100%}
.cf-welcome-video .wv-title{
margin:0;
font-family:var(--font-display);
font-weight:var(--display-weight,900);
text-transform:var(--display-case,none);
letter-spacing:var(--display-tracking,-0.035em);
font-size:clamp(2.75rem,1.4rem + 5.6vw,5.75rem);
line-height:0.98;
color:var(--ink);
text-wrap:balance;
}
.cf-welcome-video .wv-mark{
padding:0 0.1em;
margin:0 -0.04em;
border-radius:0.16em 0.34em 0.22em 0.42em;
background-image:linear-gradient(var(--wv-marker),var(--wv-marker));
background-repeat:no-repeat;
background-size:100% 46%;
background-position:0 88%;
-webkit-box-decoration-break:clone;
box-decoration-break:clone;
}
.cf-welcome-video .wv-sub{
margin:clamp(0.875rem,0.6rem + 0.9vw,1.375rem) 0 0;
font-size:clamp(1.125rem,0.98rem + 0.6vw,1.5rem);
line-height:1.35;
font-weight:500;
color:var(--muted);
text-wrap:balance;
}
.cf-welcome-video .wv-stage{
position:relative;
width:100%;
margin-top:clamp(1.75rem,1.2rem + 2vw,2.75rem);
padding:0 var(--wv-off) var(--wv-off) 0;
}
.cf-welcome-video .wv-stage::before{
content:'';
position:absolute;
inset:var(--wv-off) 0 0 var(--wv-off);
border-radius:calc(var(--wv-r) + 6px);
background:color-mix(in oklch,var(--ink) 7%,var(--surface,#ffffff));
}
.cf-welcome-video .wv-frame{
position:relative;
z-index:1;
padding:6px;
border-radius:calc(var(--wv-r) + 6px);
background:var(--band);
box-shadow:inset 0 1px 0 oklch(from var(--band) calc(l + 0.12) c h / 0.9),var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--wv-shade) l c h / 0.22),0 12px 24px -8px oklch(from var(--wv-shade) l c h / 0.32)));
}
.cf-welcome-video .wv-screen{
position:relative;
aspect-ratio:16/9;
overflow:hidden;
border-radius:var(--wv-r);
background:oklch(from var(--band) calc(l - 0.08) c h);
isolation:isolate;
}
.cf-welcome-video .wv-cover{
position:absolute;
inset:0;
display:grid;
place-items:center;
width:100%;
height:100%;
margin:0;
padding:0;
border:0;
border-radius:var(--wv-r);
background:none;
color:inherit;
font:inherit;
cursor:pointer;
-webkit-tap-highlight-color:transparent;
}
.cf-welcome-video .wv-cover::after{
content:'';
position:absolute;
inset:0;
z-index:1;
pointer-events:none;
background:
radial-gradient(circle at 50% 50%,oklch(from var(--band) l c h / 0.2),oklch(from var(--band) l c h / 0) 42%),
linear-gradient(to top,oklch(from var(--band) calc(l - 0.06) c h / 0.5),oklch(from var(--band) l c h / 0) 55%);
}
.cf-welcome-video .wv-poster{
position:absolute;
inset:0;
width:100%;
height:100%;
object-fit:cover;
object-position:50% 28%;
transition:transform 0.7s cubic-bezier(0.2,0.7,0.2,1);
}
.cf-welcome-video .wv-play{
position:relative;
z-index:2;
display:grid;
justify-items:center;
gap:0.75rem;
}
.cf-welcome-video .wv-disc{
position:relative;
display:grid;
place-items:center;
width:clamp(4.25rem,3.4rem + 3.4vw,6rem);
aspect-ratio:1;
border-radius:50%;
background:var(--card,#ffffff);
color:var(--ink);
box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--wv-shade) l c h / 0.22),0 4px 10px -2px oklch(from var(--wv-shade) l c h / 0.2));
transition:transform 0.2s cubic-bezier(0.2,0.7,0.2,1),box-shadow 0.2s;
}
.cf-welcome-video .wv-disc svg{width:38%;height:38%;margin-left:8%}
.cf-welcome-video .wv-disc::before{
content:'';
position:absolute;
inset:-8px;
border-radius:50%;
border:2px solid oklch(from var(--card,#ffffff) l c h / 0.75);
opacity:0;
transition:opacity 0.2s;
}
.cf-welcome-video .wv-pill{
display:inline-flex;
align-items:center;
gap:0.5rem;
padding:0.5rem 0.95rem;
border-radius:999px;
background:var(--card,#ffffff);
color:var(--ink);
font-weight:700;
font-size:0.9375rem;
line-height:1.2;
white-space:nowrap;
box-shadow:var(--shadow-sm,0 1px 1px oklch(from var(--wv-shade) l c h / 0.18),0 1px 3px oklch(from var(--wv-shade) l c h / 0.14));
}
.cf-welcome-video .wv-dot{width:4px;height:4px;border-radius:50%;background:var(--muted)}
.cf-welcome-video .wv-pill-time{color:var(--muted);font-variant-numeric:tabular-nums}
@media (hover:hover){
.cf-welcome-video .wv-cover:hover .wv-disc{transform:scale(1.07)}
.cf-welcome-video .wv-cover:hover .wv-disc::before{opacity:1}
.cf-welcome-video .wv-cover:hover .wv-poster{transform:scale(1.03)}
}
.cf-welcome-video .wv-cover.is-hover .wv-disc{transform:scale(1.07)}
.cf-welcome-video .wv-cover.is-hover .wv-disc::before{opacity:1}
.cf-welcome-video .wv-cover.is-hover .wv-poster{transform:scale(1.03)}
.cf-welcome-video .wv-cover:active .wv-disc,.cf-welcome-video .wv-cover.is-active .wv-disc{transform:scale(0.95)}
.cf-welcome-video .wv-cover:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:-7px}
.cf-welcome-video .wv-cover:focus-visible .wv-disc{box-shadow:0 0 0 4px var(--card,#ffffff),0 0 0 7px var(--field-focus,var(--accent))}
.cf-welcome-video .wv-embed,.cf-welcome-video .wv-native{
position:absolute;
inset:0;
display:block;
width:100%;
height:100%;
border:0;
background:oklch(from var(--band) calc(l - 0.08) c h);
}
.cf-welcome-video .wv-embed > *{display:block;width:100%;height:100%;border:0}
.cf-welcome-video .wv-native{object-fit:contain}
.cf-welcome-video .wv-overlay{
position:absolute;
inset:0;
z-index:3;
display:grid;
place-content:center;
justify-items:center;
gap:0.75rem;
padding:1.25rem;
background:var(--band);
color:var(--band-ink);
text-align:center;
}
.cf-welcome-video .wv-overlay p{margin:0;font-weight:700;font-size:1.0625rem;line-height:1.35;text-wrap:balance}
.cf-welcome-video .wv-ico{width:1.75rem;height:1.75rem}
.cf-welcome-video .wv-retry{
display:inline-flex;
align-items:center;
justify-content:center;
gap:0.5rem;
min-height:2.75rem;
padding:0 1.25rem;
border:1px solid var(--button-2-border,transparent);
border-radius:var(--button-radius,var(--radius,0.75rem));
background:var(--button-2-bg,var(--secondary));
color:var(--button-2-ink,var(--secondary-ink));
font-family:var(--button-font,var(--font-display));
font-weight:var(--button-weight,800);
text-transform:var(--button-case,none);
font-size:1rem;
cursor:pointer;
box-shadow:var(--button-2-shadow, var(--shadow-sm));
transition:transform 0.15s,background 0.15s;
}
.cf-welcome-video .wv-retry svg{width:1.05em;height:1.05em}
.cf-welcome-video .wv-retry:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h);transform:translateY(-1px)}
.cf-welcome-video .wv-retry:active{transform:translateY(1px)}
.cf-welcome-video .wv-retry:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-welcome-video .wv-chapter{
display:flex;
align-items:center;
gap:0.75rem;
width:100%;
margin-top:0.875rem;
padding:0 calc(var(--wv-off) + 0.25rem) 0 0.25rem;
text-align:left;
}
.cf-welcome-video .wv-num{
flex:none;
font-family:var(--font-display);
font-weight:800;
font-size:1.125rem;
color:var(--accent);
font-variant-numeric:tabular-nums;
}
.cf-welcome-video .wv-ctitle{
flex:1 1 auto;
min-width:0;
font-weight:700;
font-size:clamp(1rem,0.94rem + 0.3vw,1.1875rem);
line-height:1.3;
color:var(--ink);
text-wrap:pretty;
}
.cf-welcome-video .wv-time{
flex:none;
display:inline-flex;
align-items:center;
gap:0.375rem;
font-weight:700;
font-size:1rem;
color:var(--ink);
font-variant-numeric:tabular-nums;
}
.cf-welcome-video .wv-time svg{width:1rem;height:1rem;color:var(--muted)}
.cf-welcome-video .wv-action{
display:flex;
flex-direction:column;
align-items:center;
gap:0.875rem;
width:100%;
margin-top:clamp(1.75rem,1.3rem + 1.6vw,2.5rem);
}
.cf-welcome-video .wv-cta{
position:relative;
overflow:hidden;
display:inline-flex;
align-items:center;
justify-content:center;
gap:0.625rem;
width:min(100%,30rem);
min-height:clamp(3.75rem,3.3rem + 1.2vw,4.5rem);
margin:0 auto;
padding:0.875rem 1.5rem;
border:0;
border-radius:var(--button-radius,var(--radius,0.75rem));
background:linear-gradient(oklch(from var(--wv-cta) calc(l + 0.04) c h),oklch(from var(--wv-cta-2) l 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:clamp(1.25rem,1.05rem + 0.9vw,1.75rem);
line-height:1.1;
letter-spacing:-0.01em;
text-align:center;
text-decoration:none;
text-shadow:var(--button-text-shadow,none);
text-wrap:balance;
cursor:pointer;
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--wv-cta) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--wv-cta-2) calc(l - 0.12) c h),0 1px 2px oklch(from var(--wv-shade) l c h / 0.3),0 8px 16px -6px oklch(from var(--wv-shade) l c h / 0.45));
transition:transform 0.15s cubic-bezier(0.2,0.7,0.2,1),background 0.15s;
}
.cf-welcome-video .wv-cta > span{position:relative;z-index:1}
.cf-welcome-video .wv-cta::after{
content:'';
position:absolute;
inset:0;
pointer-events:none;
background:linear-gradient(105deg,transparent 30%,oklch(from var(--wv-cta) calc(l + 0.22) c h / 0.35) 50%,transparent 70%);
transform:translateX(-120%);
}
.cf-welcome-video .wv-cta:not(:disabled):hover,.cf-welcome-video .wv-cta.is-hover:not(:disabled){
background:linear-gradient(oklch(from var(--wv-cta) l c h),oklch(from var(--wv-cta-2) calc(l - 0.05) c h));
transform:translateY(-1px);
}
.cf-welcome-video .wv-cta:not(:disabled):hover::after,.cf-welcome-video .wv-cta.is-hover:not(:disabled)::after{
transform:translateX(120%);
transition:transform 0.7s ease;
}
.cf-welcome-video .wv-cta:not(:disabled):active,.cf-welcome-video .wv-cta.is-active:not(:disabled){
background:linear-gradient(oklch(from var(--wv-cta) calc(l - 0.04) c h),oklch(from var(--wv-cta-2) calc(l - 0.08) c h));
transform:translateY(1px);
box-shadow:inset 0 1px 0 oklch(from var(--wv-cta) calc(l + 0.08) c h / 0.5),inset 0 -1px 0 oklch(from var(--wv-cta-2) calc(l - 0.12) c h),0 1px 2px oklch(from var(--wv-shade) l c h / 0.3);
}
.cf-welcome-video .wv-cta:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-welcome-video .wv-cta:disabled{
cursor:not-allowed;
background:var(--secondary);
color:var(--secondary-ink);
text-shadow:none;
transform:none;
box-shadow:var(--button-2-shadow, var(--shadow-sm));
}
.cf-welcome-video .wv-cta:disabled::after{display:none}
.cf-welcome-video .wv-cta.is-loading{cursor:progress}
.cf-welcome-video .wv-cta .wv-spin{position:relative;z-index:1;width:1.1em;height:1.1em;flex:none}
.cf-welcome-video .wv-note{
display:flex;
align-items:center;
justify-content:center;
flex-wrap:wrap;
gap:0.625rem 0.75rem;
color:var(--muted);
font-size:1rem;
font-weight:500;
line-height:1.4;
}
.cf-welcome-video .wv-note-text{text-wrap:pretty}
.cf-welcome-video .wv-thumbs{display:flex}
.cf-welcome-video .wv-thumbs img{
display:block;
width:2.5rem;
height:2.5rem;
border-radius:0.5rem;
object-fit:cover;
border:2px solid var(--surface,#ffffff);
filter:drop-shadow(0 1px 2px oklch(from var(--wv-shade) l c h / 0.28));
transition:margin 0.25s ease;
}
.cf-welcome-video .wv-thumbs img + img{margin-left:-0.75rem}
@media (hover:hover){
.cf-welcome-video .wv-note:hover .wv-thumbs img + img{margin-left:-0.3rem}
}
.cf-welcome-video .wv-sr{
position:absolute;
width:1px;
height:1px;
padding:0;
margin:-1px;
overflow:hidden;
clip:rect(0 0 0 0);
white-space:nowrap;
border:0;
}
@media (max-width:34rem){
.cf-welcome-video{--wv-off:8px}
.cf-welcome-video .wv-play{gap:0.5rem}
.cf-welcome-video .wv-pill{font-size:0.875rem;padding:0.4rem 0.8rem}
.cf-welcome-video .wv-cta{width:100%;padding-inline:1rem}
}
@media (prefers-reduced-motion:no-preference){
.cf-welcome-video .wv-rise{animation:wv-rise 0.5s cubic-bezier(0.2,0.7,0.2,1) both}
.cf-welcome-video .wv-rise-1{animation-delay:0.08s}
.cf-welcome-video .wv-rise-2{animation-delay:0.16s}
.cf-welcome-video .wv-rise-3{animation-delay:0.24s}
.cf-welcome-video .wv-mark{animation:wv-draw 0.7s 0.3s cubic-bezier(0.4,0,0.2,1) both}
.cf-welcome-video .wv-disc::before{animation:wv-ring 2.4s ease-out 0.8s 3}
.cf-welcome-video .wv-spin{animation:wv-spin 0.9s linear infinite}
}
@media (prefers-reduced-motion:reduce){
.cf-welcome-video .wv-cta,.cf-welcome-video .wv-cta::after,.cf-welcome-video .wv-disc,.cf-welcome-video .wv-disc::before,.cf-welcome-video .wv-poster,.cf-welcome-video .wv-retry,.cf-welcome-video .wv-thumbs img{transition:none}
.cf-welcome-video .wv-cover:hover .wv-poster,.cf-welcome-video .wv-cover.is-hover .wv-poster{transform:none}
.cf-welcome-video .wv-cta:not(:disabled):hover,.cf-welcome-video .wv-cta.is-hover:not(:disabled){transform:none}
.cf-welcome-video .wv-cta::after{display:none}
}
@keyframes wv-rise{from{opacity:0.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes wv-draw{from{background-size:0% 46%}to{background-size:100% 46%}}
@keyframes wv-ring{0%{opacity:0.8;transform:scale(1)}100%{opacity:0;transform:scale(1.35)}}
@keyframes wv-spin{to{transform:rotate(360deg)}}
`
pieces/checkout/welcome-video/specimen.tsx 28 lines
import __studioImage1a2f0e95 from "../assets/bd6bf6b075793f1a.webp";
import * as React from "react"
import { WelcomeVideo, type WelcomeVideoProps } from "../welcome-video"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "loading", "error"]
export default function WelcomeVideoSpecimen({ state = "default" }: { state?: WelcomeVideoProps["state"] }) {
const sample = defaults.sample
const items = sample.items.map((item, i) => ({
image: slot(`item-${i + 1}`, item.image),
alt: item.imageAlt,
}))
return (
<WelcomeVideo
state={state}
subheadline={`A personal welcome to ${sample.name}.`}
posterImage={slot(
"presenter",
__studioImage1a2f0e95
)}
posterAlt="The founder of The Funnel Starter Kit recording a personal welcome at his desk"
items={items}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalWelcomeVideo |
string |
|
highlight OptionalWelcomeVideo |
string |
|
subheadline OptionalWelcomeVideo |
string |
|
posterImage OptionalWelcomeVideo |
string |
|
posterAlt OptionalWelcomeVideo |
string |
|
video OptionalWelcomeVideo |
React.ReactNode |
|
videoSrc OptionalWelcomeVideo |
string |
|
chapterNumber OptionalWelcomeVideo |
string |
|
chapterTitle OptionalWelcomeVideo |
string |
|
duration OptionalWelcomeVideo |
string |
|
playLabel OptionalWelcomeVideo |
string |
|
playAriaLabel OptionalWelcomeVideo |
string |
|
runtimeLabel OptionalWelcomeVideo |
string |
|
videoLoadingLabel OptionalWelcomeVideo |
string |
|
errorTitle OptionalWelcomeVideo |
string |
|
retryLabel OptionalWelcomeVideo |
string |
|
ctaLabel OptionalWelcomeVideo |
string |
|
ctaLoadingLabel OptionalWelcomeVideo |
string |
|
ctaNote OptionalWelcomeVideo |
string |
|
items OptionalWelcomeVideo |
WelcomeVideoItem[] |
|
href OptionalWelcomeVideo |
string |
|
onAction OptionalWelcomeVideo |
() => void |
|
onPlay OptionalWelcomeVideo |
() => void |
|
disabled OptionalWelcomeVideo |
boolean |
|
state OptionalWelcomeVideo |
"default" | "hover" | "active" | "disabled" | "loading" | "error" |
|
className OptionalWelcomeVideo |
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.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
presenter- A photo of the host, coach or founder.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
bd6bf6b075793f1a.webp
image/webp · 60.5 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB