Hook Headline Video 2
Watch-or-read VSL top for physical e-com: hook line, huge headline and a stage that swaps the page's player for an
Use it in a prompt
Use hero/hook-headline-video-2 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/hook-headline-video-2.tsx. - Import it and pass your copy and images (Props tab):
import { HookHeadlineVideo2 } from "@/components/funneldna/hero/hook-headline-video-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/hook-headline-video-2/component.tsx 496 lines
// layout: sticky-offer-side
// Watch-or-read VSL top for physical e-com: hook line, huge headline and a stage that swaps the page's player for an
// editorial transcript and keeps the reader's place, beside a sticky offer card. On phones the offer becomes a sticky bottom bar.
import * as React from "react"
import { BookOpen, Check, Play, ShieldCheck } from "lucide-react"
import { FX_HOST, Pattern } from "../fx/fx"
export type HookHeadlineVideo2View = "watch" | "read"
export type TranscriptParagraph = {
/** Bold lead-in that opens the paragraph. */
lead?: string
/** The rest of the paragraph. */
text: string
}
export type HookHeadlineVideo2Props = {
/** One-line hook above the headline. */
preHead?: string
/** Main headline (h1). */
headline?: string
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string
/** Sub-headline under the headline. */
lead?: string
/** Prompt beside the toggle while the video shows. */
readPrompt?: string
/** Prompt beside the toggle while the transcript shows. */
watchPrompt?: string
watchTab?: string
readTab?: string
/** Accessible name of the watch/read toggle group. */
toggleLabel?: string
/** Which view shows first. */
view?: HookHeadlineVideo2View
onViewChange?: (view: HookHeadlineVideo2View) => void
/** The page's own embedded player. It replaces the poster frame. */
embed?: React.ReactNode
/** Poster frame shown until the page wires its player (slot: scene). */
posterImage?: string
/** Text on the play button over the poster. */
playLabel?: string
/** Plain caption under the poster. */
posterCaption?: string
/** Called when the visitor presses play on the poster. */
onPlay?: () => void
/** Accessible name of the transcript column. */
transcriptLabel?: string
/** Letter salutation that opens the transcript. */
salutation?: string
/** Transcript excerpt, one record per paragraph. */
transcript?: TranscriptParagraph[]
signOff?: string
signName?: string
signRole?: string
/** Product cut-out on a transparent background (slot: product). */
productImage?: string
productAlt?: string
/** Starburst sticker shape, transparent background (slot: stamp). Its outline is filled with the accent colour. */
burstImage?: string
/** Small word above the price in the starburst. */
burstLabel?: string
/** Card title (h2). */
productName?: string
/** One short line under the card title. */
productLine?: string
/** Lead-in before the who-it-is-for lines. */
forLead?: string
/** Three short lines on who it is for. */
forLines?: string[]
/** Today's price; the starburst and bar price hide when empty. */
price?: string
/** Regular price for the anchor line; hidden when empty. */
regularPrice?: string
/** Card anchor line. Placeholders: {regularPrice}, {price}. */
anchorTemplate?: string
/** Bar anchor line on phones. Placeholder: {regularPrice}. */
barTemplate?: string
/** Primary button text. */
label?: string
/** Shorter button text for the phone bar (falls back to label). */
barLabel?: string
/** Reassurance line under the button; hidden when empty. */
guarantee?: string
/** Navigation destination of the primary button. */
href?: string
/** Handles a click on the primary button. */
onAction?: (event: React.MouseEvent<HTMLElement>) => void
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
const DEFAULT_TRANSCRIPT: TranscriptParagraph[] = [
{ lead: "Here’s the problem.", text: "Café cold brew costs you every single morning, and the jug in your fridge tastes flat by Wednesday." },
{ lead: "So I built Brewline.", text: "It steeps a full batch on your counter while you sleep. No pods, no plug, no line at the counter." },
{ lead: "Here’s how it works.", text: "Add coarse grounds and cold water at night. In the morning, pull the tap and pour over ice. That’s the whole ritual." },
{ lead: "Why it tastes smoother.", text: "Cold water steeps slowly, so you get the deep, chocolatey side of the bean without the burnt edge of hot coffee." },
]
const DEFAULT_FOR = [
"Drink iced coffee most mornings",
"Are done with café prices and lines",
"Want fresh cold brew without a machine to babysit",
]
/** Space kept between the sticky toggle and the stage when the view swaps. */
const GAP = 12
const useIsoLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect
export function HookHeadlineVideo2(props: HookHeadlineVideo2Props) {
const {
preHead = "Still paying café prices for iced coffee?",
headline = "Cold brew that’s ready before your alarm goes off",
highlight = "ready before your alarm",
lead = "Brewline steeps a smooth batch on your counter overnight. Pull the tap, pour over ice, and you’re out the door.",
readPrompt = "Prefer to read?",
watchPrompt = "Prefer to watch?",
watchTab = "Watch",
readTab = "Read",
toggleLabel = "Watch the story or read it",
view: initialView = "watch",
onViewChange,
embed,
posterImage,
playLabel = "Watch the story",
posterCaption = "From grounds at night to the first pour in the morning.",
onPlay,
transcriptLabel = "Transcript of the story",
salutation = "Dear coffee lover,",
transcript = DEFAULT_TRANSCRIPT,
signOff = "To your best mornings,",
signName = "Maya",
signRole = "Founder, Brewline",
productImage,
productAlt = "The Brewline countertop cold-brew system",
burstImage,
burstLabel = "Today",
productName = "The Brewline Countertop System",
productLine = "Steeps overnight. Pours from the tap.",
forLead = "It’s for you if you…",
forLines = DEFAULT_FOR,
price = "",
regularPrice = "",
anchorTemplate = "Regularly {regularPrice} · today {price}",
barTemplate = "Regularly {regularPrice}",
label = "Send Me My Brewline",
barLabel = "",
guarantee = "",
href,
onAction,
disabled = false,
state = "default",
className = "",
} = props
const [view, setView] = React.useState<HookHeadlineVideo2View>(initialView)
const switchRef = React.useRef<HTMLDivElement>(null)
const stageRef = React.useRef<HTMLDivElement>(null)
const offsets = React.useRef<Record<HookHeadlineVideo2View, number>>({ watch: 0, read: 0 })
const pending = React.useRef(false)
const stageId = React.useId()
const nameId = React.useId()
React.useEffect(() => {
setView(initialView)
}, [initialView])
const choose = (next: HookHeadlineVideo2View) => {
if (next === view) return
const bar = switchRef.current
const stage = stageRef.current
if (bar && stage) {
const edge = bar.getBoundingClientRect().bottom + GAP
offsets.current[view] = Math.max(0, edge - stage.getBoundingClientRect().top)
}
pending.current = true
setView(next)
onViewChange?.(next)
}
// Signature: the swap keeps the visitor's place. Each view remembers how far in they were; the stage
// re-aligns under the sticky toggle instead of jumping the page.
useIsoLayoutEffect(() => {
if (!pending.current) return
pending.current = false
const bar = switchRef.current
const stage = stageRef.current
if (!bar || !stage) return
const edge = bar.getBoundingClientRect().bottom + GAP
const top = stage.getBoundingClientRect().top
const into = Math.min(offsets.current[view], Math.max(0, stage.offsetHeight - 160))
if (into === 0 && top >= edge) return
window.scrollBy({ top: top - edge + into, left: 0, behavior: "instant" as ScrollBehavior })
}, [view])
const isDisabled = disabled || state === "disabled"
const stateClass = state === "hover" ? " is-hover" : state === "active" ? " is-active" : ""
const cta = (extra: string, text: string) =>
href && !isDisabled ? (
<a className={`cf-hhv2__btn${extra}${stateClass}`} href={href} onClick={onAction}>
{text}
</a>
) : (
<button
type="button"
className={`cf-hhv2__btn${extra}${stateClass}`}
disabled={isDisabled}
onClick={isDisabled ? undefined : onAction}
>
{text}
</button>
)
const assure = guarantee ? (
<p className="cf-hhv2__assure">
<ShieldCheck className="cf-hhv2__assure-icon" size={18} strokeWidth={2.5} aria-hidden="true" />
{guarantee}
</p>
) : null
const anchorLine = regularPrice ? fill(anchorTemplate, { regularPrice, price }) : ""
const barLine = regularPrice ? fill(barTemplate, { regularPrice, price }) : ""
const burstStyle = burstImage
? ({ ["--cf-hhv2-burst" as string]: `url("${burstImage}")` } as React.CSSProperties)
: undefined
const watchPane = (
<div className="cf-hhv2__pane" key="watch">
{embed ? (
<div className="cf-hhv2__embed">{embed}</div>
) : (
<div className="cf-hhv2__screen">
<button type="button" className={`cf-hhv2__poster${stateClass}`} onClick={onPlay}>
{posterImage ? <img className="cf-hhv2__poster-img" src={posterImage} alt="" /> : null}
<span className="cf-hhv2__play">
<span className="cf-hhv2__disc" aria-hidden="true">
<Play size={20} strokeWidth={2.5} fill="currentColor" />
</span>
{playLabel}
</span>
</button>
</div>
)}
{posterCaption ? <p className="cf-hhv2__caption">{posterCaption}</p> : null}
</div>
)
const readPane = (
<article className="cf-hhv2__pane cf-hhv2__read" key="read" aria-label={transcriptLabel}>
<div className="cf-hhv2__prose">
{salutation ? <p className="cf-hhv2__hello">{salutation}</p> : null}
{transcript.map((para, i) => (
<p key={i}>
{para.lead ? <b>{para.lead} </b> : null}
{para.text}
</p>
))}
{signOff || signName ? (
<div className="cf-hhv2__sign">
{signOff ? <p>{signOff}</p> : null}
{signName ? <p className="cf-hhv2__sign-name">{signName}</p> : null}
{signRole ? <p className="cf-hhv2__sign-role">{signRole}</p> : null}
</div>
) : null}
</div>
{label ? (
<div className="cf-hhv2__read-cta">
{cta("", label)}
{assure}
</div>
) : null}
</article>
)
return (
<section className={`cf-hook-headline-video-2 ${className}`.trim()} style={FX_HOST}>
<style>{CSS}</style>
<Pattern name="grid" fade="corner" />
<div className="cf-hhv2__inner">
<div className="cf-hhv2__grid">
<div className="cf-hhv2__main">
{preHead ? <p className="cf-hhv2__pre">{preHead}</p> : null}
<h1 className="cf-hhv2__h1">{marked(headline, highlight)}</h1>
{lead ? <p className="cf-hhv2__lead">{lead}</p> : null}
<div className="cf-hhv2__switch" ref={switchRef}>
<span className="cf-hhv2__prompt">{view === "watch" ? readPrompt : watchPrompt}</span>
<div className="cf-hhv2__seg" role="group" aria-label={toggleLabel}>
<button
type="button"
className="cf-hhv2__opt"
aria-pressed={view === "watch"}
aria-controls={stageId}
onClick={() => choose("watch")}
>
<Play size={18} strokeWidth={2.5} aria-hidden="true" />
{watchTab}
</button>
<button
type="button"
className="cf-hhv2__opt"
aria-pressed={view === "read"}
aria-controls={stageId}
onClick={() => choose("read")}
>
<BookOpen size={18} strokeWidth={2.5} aria-hidden="true" />
{readTab}
</button>
</div>
</div>
<div className="cf-hhv2__stage" id={stageId} ref={stageRef}>
{view === "watch" ? watchPane : readPane}
</div>
</div>
<aside className="cf-hhv2__offer" aria-labelledby={nameId}>
<div className="cf-hhv2__card">
{productImage || price ? (
<figure className="cf-hhv2__product">
{productImage ? <img className="cf-hhv2__product-img" src={productImage} alt={productAlt} /> : null}
{price ? (
<span
className={`cf-hhv2__burst${burstImage ? "" : " is-plain"}${price.length > 4 ? " is-long" : ""}`}
style={burstStyle}
>
<span className="cf-hhv2__burst-shape" aria-hidden="true" />
{burstImage ? <img className="cf-hhv2__burst-tex" src={burstImage} alt="" aria-hidden="true" /> : null}
<span className="cf-hhv2__burst-text">
{burstLabel ? <span className="cf-hhv2__burst-label">{burstLabel}</span> : null}
<span className="cf-hhv2__burst-price">{price}</span>
</span>
</span>
) : null}
</figure>
) : null}
<h2 className="cf-hhv2__name" id={nameId}>
{productName}
</h2>
{productLine ? <p className="cf-hhv2__line">{productLine}</p> : null}
{forLines.length ? (
<>
{forLead ? <p className="cf-hhv2__for-lead">{forLead}</p> : null}
<ul className="cf-hhv2__for">
{forLines.map((line) => (
<li key={line}>
<span className="cf-hhv2__tick" aria-hidden="true">
<Check size={14} strokeWidth={3} />
</span>
<span>{line}</span>
</li>
))}
</ul>
</>
) : null}
{label ? (
<div className="cf-hhv2__buy">
{anchorLine ? <p className="cf-hhv2__anchor">{anchorLine}</p> : null}
{cta("", label)}
{assure}
</div>
) : null}
</div>
</aside>
</div>
{label ? (
<div className="cf-hhv2__bar">
{price ? (
<div className="cf-hhv2__bar-price">
<span className="cf-hhv2__bar-now">{price}</span>
{barLine ? <span className="cf-hhv2__bar-was">{barLine}</span> : null}
</div>
) : null}
{cta(" is-bar", barLabel || label)}
</div>
) : null}
</div>
</section>
)
}
export default HookHeadlineVideo2
function marked(text: string, phrase: string): React.ReactNode {
const at = phrase ? text.indexOf(phrase) : -1
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="cf-hhv2__mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((out, key) => out.split("{" + key + "}").join(values[key]), template)
}
// The headline marker uses the bump strip/ink pair: the host keeps that pair readable on light and dark themes.
const CSS = `
.cf-hook-headline-video-2{--g:clamp(16px,5vw,48px);--cf-hhv2-sh:var(--shadow,oklch(0.22 0.03 260));position:relative;isolation:isolate;overflow-x:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) var(--g) clamp(64px,8.5vw,120px)}
.cf-hook-headline-video-2 *,.cf-hook-headline-video-2 *::before,.cf-hook-headline-video-2 *::after{box-sizing:border-box}
.cf-hhv2__inner{position:relative;z-index:1;max-width:1180px;margin:0 auto}
.cf-hhv2__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,360px);gap:clamp(32px,4.5vw,64px);align-items:start}
.cf-hhv2__main{min-width:0}
.cf-hhv2__pre{margin:0 0 16px;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:700;color:var(--accent);text-wrap:balance;animation:cf-hhv2-in .45s cubic-bezier(.2,.7,.2,1) both}
.cf-hhv2__h1{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,4.6vw,4.375rem);line-height:1.04;color:var(--ink);text-wrap:balance;animation:cf-hhv2-in .45s .07s cubic-bezier(.2,.7,.2,1) both}
.cf-hhv2__mark{color:var(--bump-ink,var(--ink));background-image:linear-gradient(transparent 34%,var(--bump-strip,#f5e27a) 34%,var(--bump-strip,#f5e27a) 94%,transparent 94%);padding:0 .1em;margin:0 -.04em;border-radius:.14em .3em .2em .26em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-hhv2__lead{margin:20px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty;animation:cf-hhv2-in .45s .14s cubic-bezier(.2,.7,.2,1) both}
.cf-hhv2__switch{position:sticky;top:12px;z-index:3;display:flex;width:fit-content;max-width:100%;align-items:center;gap:12px;margin-top:32px;padding:4px 4px 4px 18px;background:var(--card);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:999px;box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--cf-hhv2-sh) l c h / .22),0 4px 10px -2px oklch(from var(--cf-hhv2-sh) l c h / .2));animation:cf-hhv2-in .45s .21s cubic-bezier(.2,.7,.2,1) both}
.cf-hhv2__prompt{font-size:.9375rem;line-height:1.2;font-weight:700;color:var(--ink);white-space:nowrap}
.cf-hhv2__seg{display:flex;gap:4px;padding:4px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card))}
.cf-hhv2__opt{appearance:none;border:0;margin:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:999px;background:transparent;color:var(--muted);font-family:var(--font-body);font-size:.9375rem;font-weight:800;line-height:1;cursor:pointer;transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-hhv2__opt:hover{color:var(--ink);background:color-mix(in oklch,var(--ink) 11%,var(--card))}
.cf-hhv2__opt[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--cf-hhv2-sh) l c h / .2),0 1px 3px oklch(from var(--cf-hhv2-sh) l c h / .14))}
.cf-hhv2__opt[aria-pressed="true"] svg{color:var(--accent)}
.cf-hhv2__opt:active{transform:scale(.97)}
.cf-hhv2__opt:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .55);outline-offset:2px}
.cf-hhv2__stage{margin-top:16px;overflow-anchor:none}
.cf-hhv2__pane{animation:cf-hhv2-in .45s cubic-bezier(.2,.7,.2,1) both}
.cf-hhv2__screen{position:relative;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:var(--band);filter:drop-shadow(0 2px 3px oklch(from var(--cf-hhv2-sh) l c h / .3)) drop-shadow(0 14px 16px oklch(from var(--cf-hhv2-sh) l c h / .22))}
.cf-hhv2__embed{border-radius:14px;overflow:hidden;background:var(--band)}
.cf-hhv2__poster{appearance:none;border:0;margin:0;padding:0;position:absolute;inset:0;display:block;width:100%;height:100%;background:transparent;color:inherit;font:inherit;font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);cursor:pointer}
.cf-hhv2__poster-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 40%;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.cf-hhv2__poster::after{content:"";position:absolute;inset:0;background:oklch(from var(--band) l c h / .26);transition:background .16s ease}
.cf-hhv2__play{position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%,-50%);display:inline-flex;align-items:center;gap:12px;min-height:64px;padding:10px 24px 10px 10px;border-radius:999px;background:var(--card);color:var(--ink);font-family:var(--button-font,var(--font-display));font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:var(--button-weight,800);text-transform:var(--button-case,none);line-height:1.15;white-space:nowrap;box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--cf-hhv2-sh) l c h / .22),0 12px 24px -8px oklch(from var(--cf-hhv2-sh) l c h / .32));transition:transform .16s ease,box-shadow .16s ease}
.cf-hhv2__disc{display:grid;place-items:center;width:44px;height:44px;border-radius:999px;background:linear-gradient(oklch(from var(--accent-fill,var(--accent)) calc(l + .03) c h),oklch(from var(--accent-fill,var(--accent)) calc(l - .04) c h));color:var(--accent-fill-ink,var(--card))}
.cf-hhv2__disc svg{margin-left:3px}
.cf-hhv2__poster:hover::after,.cf-hhv2__poster.is-hover::after{background:oklch(from var(--band) l c h / .12)}
.cf-hhv2__poster:hover .cf-hhv2__poster-img,.cf-hhv2__poster.is-hover .cf-hhv2__poster-img{transform:scale(1.03)}
.cf-hhv2__poster:hover .cf-hhv2__play,.cf-hhv2__poster.is-hover .cf-hhv2__play{transform:translate(-50%,-50%) scale(1.04)}
.cf-hhv2__poster:active .cf-hhv2__play,.cf-hhv2__poster.is-active .cf-hhv2__play{transform:translate(-50%,-50%) scale(.97);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--cf-hhv2-sh) l c h / .2))}
.cf-hhv2__poster:focus-visible{outline:none}
.cf-hhv2__poster:focus-visible .cf-hhv2__play{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px;box-shadow:0 0 0 3px var(--card)}
.cf-hhv2__caption{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-hhv2__read{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 var(--cf-hhv2-sh) l c h / .22),0 4px 10px -2px oklch(from var(--cf-hhv2-sh) l c h / .2)));padding:clamp(24px,4vw,48px) clamp(20px,4.5vw,56px)}
.cf-hhv2__prose{max-width:62ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.6;color:var(--ink)}
.cf-hhv2__prose p{margin:0 0 16px;text-wrap:pretty}
.cf-hhv2__prose b{font-weight:800}
.cf-hhv2__prose .cf-hhv2__hello{margin-bottom:16px;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:800;letter-spacing:-.01em}
.cf-hhv2__sign{margin-top:24px}
.cf-hhv2__sign p{margin:0}
.cf-hhv2__sign .cf-hhv2__sign-name{margin-top:8px;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:800}
.cf-hhv2__sign .cf-hhv2__sign-role{margin-top:4px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
.cf-hhv2__read-cta{margin-top:32px;max-width:420px}
.cf-hhv2__offer{position:sticky;top:24px;min-width:0;animation:cf-hhv2-in .45s .28s cubic-bezier(.2,.7,.2,1) both}
.cf-hhv2__card{background:var(--card);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent) 28%,var(--card));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--cf-hhv2-sh) l c h / .22),0 12px 24px -8px oklch(from var(--cf-hhv2-sh) l c h / .32)));padding:clamp(20px,3vw,32px)}
.cf-hhv2__product{position:relative;margin:0 0 16px;display:grid;place-items:center;min-height:132px;padding-top:12px}
.cf-hhv2__product-img{display:block;width:auto;max-width:100%;max-height:240px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--cf-hhv2-sh) l c h / .3)) drop-shadow(0 14px 14px oklch(from var(--cf-hhv2-sh) l c h / .2))}
.cf-hhv2__burst{position:absolute;top:0;right:-4px;z-index:1;display:grid;place-items:center;width:124px;height:124px;transform:rotate(-8deg);filter:drop-shadow(0 2px 2px oklch(from var(--cf-hhv2-sh) l c h / .35)) drop-shadow(0 8px 10px oklch(from var(--cf-hhv2-sh) l c h / .22));animation:cf-hhv2-pop .3s .3s cubic-bezier(.2,.7,.2,1) both}
.cf-hhv2__burst-shape{position:absolute;inset:0;background:linear-gradient(160deg,oklch(from var(--accent-fill,var(--accent)) calc(l + .03) c h),oklch(from var(--accent-fill,var(--accent)) calc(l - .03) c h));-webkit-mask-image:var(--cf-hhv2-burst);mask-image:var(--cf-hhv2-burst);-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}
.cf-hhv2__burst.is-plain .cf-hhv2__burst-shape{inset:12px;border-radius:var(--radius,12px);-webkit-mask-image:none;mask-image:none}
.cf-hhv2__burst-tex{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply;opacity:.3;pointer-events:none}
.cf-hhv2__burst-text{position:relative;display:grid;justify-items:center;gap:4px;padding:0 12px;color:var(--accent-fill-ink,var(--card));text-align:center;line-height:1}
.cf-hhv2__burst-label{font-size:.875rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.cf-hhv2__burst-price{font-family:var(--font-display);font-size:2.5rem;font-weight:800;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.cf-hhv2__burst.is-long .cf-hhv2__burst-price{font-size:1.625rem}
.cf-hhv2__name{margin:0;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:-.01em;text-wrap:balance}
.cf-hhv2__line{margin:8px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-hhv2__for-lead{margin:24px 0 12px;font-size:.9375rem;line-height:1.4;font-weight:800;color:var(--ink)}
.cf-hhv2__for{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.cf-hhv2__for li{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:12px;align-items:start;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-hhv2__tick{display:grid;place-items:center;width:24px;height:24px;margin-top:-1px;border-radius:999px;background:var(--success);color:var(--badge-glyph,#fff)}
.cf-hhv2__buy{margin-top:28px}
.cf-hhv2__anchor{margin:0 0 12px;font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--muted);text-align:center;font-variant-numeric:tabular-nums}
.cf-hhv2__btn{appearance:none;margin:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;padding:0 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));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));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.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;text-wrap:balance;text-shadow:var(--button-text-shadow,none);cursor:pointer;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 var(--cf-hhv2-sh) l c h / .3),0 8px 16px -6px oklch(from var(--cf-hhv2-sh) l c h / .35));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-hhv2__btn:hover:not(:disabled),.cf-hhv2__btn.is-hover{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);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 - .18) c h),0 1px 2px oklch(from var(--cf-hhv2-sh) l c h / .32),0 10px 18px -6px oklch(from var(--cf-hhv2-sh) l c h / .42))}
.cf-hhv2__btn:active:not(:disabled),.cf-hhv2__btn.is-active{transform:translateY(1px);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 - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .2) c h / .45),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--cf-hhv2-sh) l c h / .28)}
.cf-hhv2__btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px}
.cf-hhv2__btn:disabled{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none;cursor:not-allowed;transform:none}
.cf-hhv2__assure{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-align:center;text-wrap:pretty}
.cf-hhv2__assure-icon{display:inline-block;vertical-align:-.2em;margin-inline-end:.4em;color:var(--success)}
.cf-hhv2__bar{display:none;position:sticky;bottom:0;z-index:4;align-items:center;gap:12px;margin:32px calc(var(--g) * -1) 0;padding:12px var(--g) calc(12px + env(safe-area-inset-bottom,0px));background:var(--card);color:var(--ink);border-top:1px solid oklch(from var(--ink) l c h / .12);box-shadow:0 -1px 2px oklch(from var(--cf-hhv2-sh) l c h / .12),0 -8px 16px -8px oklch(from var(--cf-hhv2-sh) l c h / .3)}
.cf-hhv2__bar-price{display:grid;gap:4px;flex:0 0 auto}
.cf-hhv2__bar-now{font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.cf-hhv2__bar-was{font-size:.875rem;line-height:1.2;font-weight:700;color:var(--muted);white-space:nowrap}
.cf-hhv2__btn.is-bar{flex:1 1 auto;width:auto;min-width:0;min-height:56px;padding:0 16px;font-size:1.125rem;white-space:nowrap}
@keyframes cf-hhv2-in{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-hhv2-pop{from{transform:rotate(-8deg) scale(.9)}to{transform:rotate(-8deg) scale(1)}}
@media (max-width:860px){
.cf-hook-headline-video-2{padding-bottom:0}
.cf-hhv2__grid{grid-template-columns:minmax(0,1fr)}
.cf-hhv2__offer{position:static;width:100%;max-width:560px}
.cf-hhv2__buy,.cf-hhv2__read-cta{display:none}
.cf-hhv2__product-img{max-height:200px}
.cf-hhv2__bar{display:flex}
}
@media (max-width:480px){.cf-hhv2__opt{padding:0 14px}.cf-hhv2__switch{padding-left:14px;gap:10px}}
@media (max-width:360px){.cf-hhv2__opt svg{display:none}.cf-hhv2__switch{gap:8px}}
@media (prefers-reduced-motion:reduce){.cf-hook-headline-video-2 *{animation:none!important;transition:none!important}}
`
pieces/hero/hook-headline-video-2/specimen.tsx 42 lines
import __studioImagef4611ba5 from "../assets/5ee72e7aa6eb3643.webp";
import __studioImage2005d79a from "../assets/102a587fa362a8a9.webp";
import __studioImageb7f6a13b from "../assets/01bca30fd58d382b.webp";
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { HookHeadlineVideo2, type HookHeadlineVideo2Props, type TranscriptParagraph } from "../hook-headline-video-2"
export const states = ["default", "hover", "active", "disabled"]
const TRANSCRIPT: TranscriptParagraph[] = [
{ lead: "Here’s the problem.", text: "Café cold brew costs you every single morning, and the jug in your fridge tastes flat by Wednesday." },
{ lead: "So I built Brewline.", text: "It steeps a full batch on your counter while you sleep. No pods, no plug, no line at the counter." },
{ lead: "Here’s how it works.", text: "Add coarse grounds and cold water at night. In the morning, pull the tap and pour over ice. That’s the whole ritual." },
{ lead: "Why it tastes smoother.", text: "Cold water steeps slowly, so you get the deep, chocolatey side of the bean without the burnt edge of hot coffee." },
{ lead: "And you’re covered.", text: "Try it for 30 days. If it doesn’t earn its spot on your counter, send it back for a full refund." },
]
export default function HookHeadlineVideo2Specimen({ state = "default" }: { state?: HookHeadlineVideo2Props["state"] }) {
const sample = defaults.sample
return (
<HookHeadlineVideo2
state={state}
posterImage={slot(
"scene",
__studioImagef4611ba5
)}
productImage={slot(
"product",
__studioImage2005d79a
)}
burstImage={slot(
"stamp",
__studioImageb7f6a13b
)}
transcript={TRANSCRIPT}
signName="Maya Torres"
price={sample.price}
regularPrice={sample.regularPrice}
guarantee={sample.guarantee}
/>
)
}
| Name | Type | Details |
|---|---|---|
preHead OptionalHookHeadlineVideo2 |
string |
|
headline OptionalHookHeadlineVideo2 |
string |
|
highlight OptionalHookHeadlineVideo2 |
string |
|
lead OptionalHookHeadlineVideo2 |
string |
|
readPrompt OptionalHookHeadlineVideo2 |
string |
|
watchPrompt OptionalHookHeadlineVideo2 |
string |
|
watchTab OptionalHookHeadlineVideo2 |
string |
|
readTab OptionalHookHeadlineVideo2 |
string |
|
toggleLabel OptionalHookHeadlineVideo2 |
string |
|
view OptionalHookHeadlineVideo2 |
HookHeadlineVideo2View |
|
onViewChange OptionalHookHeadlineVideo2 |
(view: HookHeadlineVideo2View) => void |
|
embed OptionalHookHeadlineVideo2 |
React.ReactNode |
|
posterImage OptionalHookHeadlineVideo2 |
string |
|
playLabel OptionalHookHeadlineVideo2 |
string |
|
posterCaption OptionalHookHeadlineVideo2 |
string |
|
onPlay OptionalHookHeadlineVideo2 |
() => void |
|
transcriptLabel OptionalHookHeadlineVideo2 |
string |
|
salutation OptionalHookHeadlineVideo2 |
string |
|
transcript OptionalHookHeadlineVideo2 |
TranscriptParagraph[] |
|
signOff OptionalHookHeadlineVideo2 |
string |
|
signName OptionalHookHeadlineVideo2 |
string |
|
signRole OptionalHookHeadlineVideo2 |
string |
|
productImage OptionalHookHeadlineVideo2 |
string |
|
productAlt OptionalHookHeadlineVideo2 |
string |
|
burstImage OptionalHookHeadlineVideo2 |
string |
|
burstLabel OptionalHookHeadlineVideo2 |
string |
|
productName OptionalHookHeadlineVideo2 |
string |
|
productLine OptionalHookHeadlineVideo2 |
string |
|
forLead OptionalHookHeadlineVideo2 |
string |
|
forLines OptionalHookHeadlineVideo2 |
string[] |
|
price OptionalHookHeadlineVideo2 |
string |
|
regularPrice OptionalHookHeadlineVideo2 |
string |
|
anchorTemplate OptionalHookHeadlineVideo2 |
string |
|
barTemplate OptionalHookHeadlineVideo2 |
string |
|
label OptionalHookHeadlineVideo2 |
string |
|
barLabel OptionalHookHeadlineVideo2 |
string |
|
guarantee OptionalHookHeadlineVideo2 |
string |
|
href OptionalHookHeadlineVideo2 |
string |
|
onAction OptionalHookHeadlineVideo2 |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalHookHeadlineVideo2 |
boolean |
|
state OptionalHookHeadlineVideo2 |
"default" | "hover" | "active" | "disabled" |
|
className OptionalHookHeadlineVideo2 |
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.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
scene- A wide atmosphere photo behind or beside the copy.
stamp- A stamp or badge graphic, on a transparent background.
-
01bca30fd58d382b.webp
image/webp · 125 KB
-
102a587fa362a8a9.webp
image/webp · 51.4 KB
-
5ee72e7aa6eb3643.webp
image/webp · 35 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB