Delayed Offer Reveal 1
Reveals the offer at the presentation’s decision point and carries the viewer into checkout.
Use it in a prompt
Use offer/delayed-offer-reveal 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/offer/delayed-offer-reveal.tsx. - Import it and pass your copy and images (Props tab):
import { DelayedOfferReveal } from "@/components/funneldna/offer/delayed-offer-reveal"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/delayed-offer-reveal/component.tsx 457 lines
// Reveals the offer at the presentation’s decision point and carries the viewer into checkout.
"use client"
import * as React from "react"
import { AlertCircle, Check, Loader2, Lock, MonitorPlay, ShieldCheck } from "lucide-react"
export type DelayedOfferRevealProps = {
/** Supporting copy; {productName}, {time} and {saving} are replaced as text. */
copy?: Partial<DelayedOfferRevealCopy>
/** Canonical guarantee artwork slot; guaranteeSeal remains an alias. */
sealGuaranteeImage?: string
/** Force the offer open (true) or closed (false). Leave undefined to reveal by video time. */
revealed?: boolean
/** The reveal moment, in seconds from the start of the presentation (video-relative, never a deadline). */
revealAt?: number
/** Current playback position in seconds. Pass it from your player's time updates. */
currentTime?: number
/** id of an HTML5 <video> element on the page. The component follows its playback automatically. */
videoId?: string
/** Called once, at the moment the offer opens. */
onReveal?: () => void
waitingTitle?: string
waitingNote?: string
headline?: string
/** One short continuous phrase inside the headline that gets the marker stroke. */
highlight?: string
lead?: string
productName?: string
mediaNote?: string
/** Real product images (1 to 4). They fan out as the product shot. */
images?: DelayedOfferImage[]
regularLabel?: string
/** Struck regular price; shown (with the calculated saving) only when supplied. */
regularPrice?: string
priceLabel?: string
price?: string
note?: string
label?: string
sublabel?: string
/** Checkout URL. Used as a plain link when no onAction is given. */
href?: string
/** Your own checkout handler. While its promise is pending the button shows loadingText; a rejection shows errorText. */
onAction?: () => void | Promise<void>
loadingText?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
successText?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
successNote?: string
errorText?: string
guarantee?: string
guaranteeNote?: string
/** Image URL of a guarantee seal on a transparent background. Falls back to a shield icon. */
guaranteeSeal?: string
disabled?: boolean
state?: DelayedOfferRevealState
className?: string
}
export function DelayedOfferReveal({
copy: copyOverrides,
revealed,
revealAt,
currentTime,
videoId,
onReveal,
waitingTitle = "Your offer appears right here after the presentation.",
waitingNote = "Keep watching. There is nothing to do yet. This space opens the moment the presentation gets to it.",
headline = "Build your first funnel with a clear plan",
highlight = "a clear plan",
lead = "Get the guide, workbook, and checklist in one download. One payment. Yours to keep.",
productName = "The Funnel Starter Kit",
mediaNote,
images = [],
regularLabel = "Regular value",
regularPrice,
priceLabel = "Get the complete kit for",
price = "$47",
note,
label = "Yes! Give Me Access",
sublabel = "",
href = "#checkout",
onAction,
loadingText = "Opening secure checkout…",
errorText = "We couldn’t open checkout. Please tap the button again.",
guarantee = "30-day money-back guarantee",
guaranteeNote = "Try everything inside. Not for you? Get your money back.",
guaranteeSeal,
sealGuaranteeImage = guaranteeSeal,
disabled = false,
state = "default",
className,
}: DelayedOfferRevealProps) {
const copy = { ...DEFAULT_COPY, ...Object.fromEntries(Object.entries(copyOverrides ?? {}).filter(([, value]) => value !== undefined)) }
const [videoTime, setVideoTime] = React.useState<number | undefined>(undefined)
React.useEffect(() => {
if (!videoId || typeof document === "undefined") return
const el = document.getElementById(videoId)
if (!(el instanceof HTMLVideoElement)) return
const sync = () => setVideoTime(el.currentTime)
sync()
el.addEventListener("timeupdate", sync)
el.addEventListener("seeked", sync)
return () => {
el.removeEventListener("timeupdate", sync)
el.removeEventListener("seeked", sync)
}
}, [videoId])
const time = currentTime ?? videoTime
const uncontrolled = revealed === undefined && revealAt === undefined
const wants = revealed === true || uncontrolled || (revealAt !== undefined && time !== undefined && time >= revealAt)
const [open, setOpen] = React.useState(wants)
const [animate, setAnimate] = React.useState(false)
const [announce, setAnnounce] = React.useState("")
React.useEffect(() => {
if (wants && !open) {
setOpen(true)
setAnimate(true)
setAnnounce(copy.availableAnnouncement)
onReveal?.()
}
}, [wants, open, onReveal, copy.availableAnnouncement])
const shown = revealed === false ? false : open
const [status, setStatus] = React.useState<"idle" | "loading" | "error">(state === "error" ? "error" : "idle")
const isDisabled = disabled || state === "disabled"
async function handleClick(event: React.MouseEvent<HTMLButtonElement>) {
event.preventDefault()
if (isDisabled || status === "loading" || !onAction) return
setStatus("loading")
try {
await onAction()
setStatus("idle")
} catch {
setStatus("error")
}
}
const save = savings(regularPrice, price)
const shots = images.slice(0, 4)
const hasMedia = shots.length > 0
const btnClass = [
"dor-btn",
state === "hover" ? "is-hover" : "",
state === "active" ? "is-active" : "",
status === "loading" ? "is-loading" : "",
].filter(Boolean).join(" ")
const inner =
status === "loading" ? (
<>
<Loader2 className="dor-spin" aria-hidden="true" />
<span className="dor-btn-label">{loadingText}</span>
</>
) : (
<span className="dor-btn-label">{label}</span>
)
const button =
onAction || !href ? (
<button type="button" className={btnClass} onClick={handleClick} disabled={isDisabled} aria-busy={status === "loading" || undefined}>
{inner}
</button>
) : (
<a
className={btnClass}
href={href}
aria-disabled={isDisabled || undefined}
onClick={isDisabled ? (event) => event.preventDefault() : undefined}
>
{inner}
</a>
)
return (
<section
className={["cf-delayed-offer-reveal dor", className].filter(Boolean).join(" ")}
aria-label={shown ? copy.offerLabel.replace("{productName}", () => productName) : copy.waitingLabel}
>
<style>{CSS}</style>
<p className="dor-sr" aria-live="polite">{announce}</p>
{!shown ? (
<div className="dor-wait">
<span className="dor-wait-icon" aria-hidden="true"><MonitorPlay /></span>
<p className="dor-wait-title">{waitingTitle}</p>
{waitingNote && <p className="dor-wait-note">{waitingNote}</p>}
{revealAt !== undefined && (
<p className="dor-wait-time">
<span className="dor-wait-live" aria-hidden="true" />
<span>{timeCopy(copy.opensAt, formatTime(revealAt))}</span>
{time !== undefined && (
<>
<span className="dor-wait-sep" aria-hidden="true">·</span>
<span>{timeCopy(copy.currentTime, formatTime(Math.min(time, revealAt)))}</span>
</>
)}
</p>
)}
</div>
) : (
<div className={["dor-card", animate ? "dor-in" : "", hasMedia ? "" : "dor-card--solo"].filter(Boolean).join(" ")}>
<header className="dor-head">
<h2 className="dor-headline">{withHighlight(headline, highlight)}</h2>
{lead && <p className="dor-lead">{lead}</p>}
</header>
<div className="dor-grid">
{hasMedia && (
<figure className="dor-media">
<div className="dor-stage">
{shots.map((shot, index) => (
<span className="dor-shot" key={`${shot.alt}-${index}`} style={shotStyle(index, shots.length)}>
<img src={shot.src} alt={shot.alt} width={360} height={360} loading="lazy" decoding="async" />
</span>
))}
</div>
<figcaption className="dor-caption">
<strong>{productName}</strong>
{mediaNote && <span>{mediaNote}</span>}
</figcaption>
</figure>
)}
<div className="dor-buy">
<div className="dor-price">
{priceLabel && <p className="dor-price-head">{priceLabel}</p>}
<p className="dor-price-line">
{regularPrice && (
<span className="dor-was-col">
<s className="dor-was"><span className="dor-sr">{regularLabel}: </span>{regularPrice}</s>
<span className="dor-was-label" aria-hidden="true">{regularLabel}</span>
</span>
)}
<strong className="dor-amount"><span className="dor-sr">{copy.todayLabel}</span>{price}</strong>
</p>
{(save || note) && (
<p className="dor-foot">
{save && (
<span className="dor-save"><Check aria-hidden="true" />{copy.saving.replace("{saving}", () => save)}</span>
)}
{save && note && <span className="dor-dot" aria-hidden="true">·</span>}
{note && <span className="dor-note">{note}</span>}
</p>
)}
</div>
<div className="dor-cta">
{button}
{sublabel && (
<p className="dor-sub"><Lock aria-hidden="true" /><span>{sublabel}</span></p>
)}
{status === "error" && (
<p className="dor-msg dor-msg--error" role="alert"><AlertCircle aria-hidden="true" /><span>{errorText}</span></p>
)}
</div>
{guarantee && (
<div className="dor-guarantee">
{sealGuaranteeImage ? (
<img className="dor-seal-img" src={sealGuaranteeImage} alt="" width={72} height={72} aria-hidden="true" />
) : (
<span className="dor-seal" aria-hidden="true"><ShieldCheck /></span>
)}
<p className="dor-guarantee-copy">
<strong>{guarantee}</strong>
{guaranteeNote && <span>{guaranteeNote}</span>}
</p>
</div>
)}
</div>
</div>
</div>
)}
</section>
)
}
export default DelayedOfferReveal
export type DelayedOfferRevealState = "default" | "hover" | "active" | "disabled" | "error" | "success"
export type DelayedOfferImage = { src: string; alt: string }
function formatTime(seconds: number) {
const t = Math.max(0, Math.floor(seconds))
const h = Math.floor(t / 3600)
const m = Math.floor((t % 3600) / 60)
const s = String(t % 60).padStart(2, "0")
return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${s}` : `${m}:${s}`
}
function toNumber(value?: string) {
if (!value) return null
const match = value.replace(/,/g, "").match(/[0-9]+(?:[.][0-9]+)?/)
return match ? parseFloat(match[0]) : null
}
function savings(regular?: string, price?: string) {
const a = toNumber(regular)
const b = toNumber(price)
if (a === null || b === null || !price || a <= b) return null
const diff = a - b
const at = price.search(/[0-9]/)
const prefix = at > 0 ? price.slice(0, at).trim() : ""
return `${prefix}${Number.isInteger(diff) ? diff : diff.toFixed(2)}`
}
function withHighlight(text: string, phrase?: string) {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="dor-mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
function shotStyle(index: number, count: number) {
const mid = (count - 1) / 2
const step = count > 1 ? index / (count - 1) : 0.5
return {
left: `${count > 1 ? step * 44 : 22}%`,
zIndex: 10 - Math.round(Math.abs(index - mid) * 2),
"--rot": `${count > 1 ? -8 + step * 16 : 0}deg`,
} as React.CSSProperties
}
const DEFAULT_COPY = {
availableAnnouncement: "The offer is now available.",
offerLabel: "{productName} offer",
waitingLabel: "The offer appears after the presentation",
opensAt: "Opens at {time} in the presentation",
currentTime: "You’re at {time}",
todayLabel: "Today: ",
saving: "You save {saving}",
}
type DelayedOfferRevealCopy = typeof DEFAULT_COPY
function timeCopy(template: string, time: string) {
return template.split("{time}").map((part, index) => <React.Fragment key={index}>{index > 0 && <strong>{time}</strong>}{part}</React.Fragment>)
}
const CSS = `
.cf-delayed-offer-reveal{--dor-marker:var(--marker, var(--warning-soft));--dor-save:var(--success);--dor-gold:var(--warning);position:relative;display:block;width:100%;max-width:1040px;margin-inline:auto;color:var(--ink,#101828);font-family:var(--font-body,Arial,sans-serif);box-sizing:border-box}
.cf-delayed-offer-reveal *,.cf-delayed-offer-reveal *::before,.cf-delayed-offer-reveal *::after{box-sizing:border-box}
.cf-delayed-offer-reveal :where(h2,p,figure,figcaption){margin:0}
.cf-delayed-offer-reveal .dor-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.cf-delayed-offer-reveal .dor-wait{display:grid;justify-items:center;max-width:640px;margin-inline:auto;padding:clamp(1.75rem,4vw,2.5rem) clamp(1.25rem,4vw,2.75rem);text-align:center;border:1px solid var(--card-border, oklch(from var(--ink) l c h / 0.1));border-radius:var(--card-radius, calc(var(--radius,14px) + 4px));background:var(--card,#fff);box-shadow:var(--card-shadow, 0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35))}
.cf-delayed-offer-reveal .dor-wait-icon{display:grid;place-items:center;width:3rem;height:3rem;margin-bottom:1rem;border-radius:999px;background:var(--warning-soft);color:var(--warning)}
.cf-delayed-offer-reveal .dor-wait-icon svg{width:1.375rem;height:1.375rem;stroke-width:2}
.cf-delayed-offer-reveal .dor-wait-title{font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.375rem,2.6vw,1.75rem);font-weight:var(--display-weight, 700);line-height:1.2;letter-spacing:var(--display-tracking, -.015em);color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-wait-note{max-width:44ch;margin-top:.625rem;font-size:1rem;font-weight:500;line-height:1.55;color:var(--muted,#4a5565);text-wrap:pretty}
.cf-delayed-offer-reveal .dor-wait-time{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.25rem .5rem;margin-top:1.25rem;padding:.5rem 1rem;border-radius:999px;background:var(--warning-soft);font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--warning);font-variant-numeric:tabular-nums}
.cf-delayed-offer-reveal .dor-wait-time strong{font-weight:700;color:var(--warning)}
.cf-delayed-offer-reveal .dor-wait-live{flex:none;width:.5rem;height:.5rem;border-radius:999px;background:var(--dor-gold);animation:dor-pulse 2.2s ease-out infinite}
.cf-delayed-offer-reveal .dor-wait-sep{opacity:.6}
.cf-delayed-offer-reveal .dor-card{position:relative;padding:clamp(1.5rem,4vw,3rem) clamp(1.25rem,4vw,3rem) clamp(1.5rem,3.6vw,2.75rem);border:1px solid var(--card-border, oklch(from var(--ink) l c h / 0.11));border-radius:var(--card-radius, calc(var(--radius,14px) + 8px));background:var(--card,#fff);box-shadow:var(--card-shadow, inset 0 0 0 5px color-mix(in oklch,var(--band,#0f2747) 3%,var(--card,#fff)),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35))}
.cf-delayed-offer-reveal .dor-head{display:grid;justify-items:center;text-align:center}
.cf-delayed-offer-reveal .dor-headline{font-family:var(--font-display,Arial,sans-serif);font-size:clamp(2rem,4.4vw,3.375rem);font-weight:var(--display-weight, 800);line-height:1.05;letter-spacing:var(--display-tracking, -.03em);color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-mark{padding:0 .12em;margin:0 -.04em;border-radius:.2em .5em .25em .45em;background:linear-gradient(180deg,transparent 0 28%,var(--dor-marker) 28% 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-delayed-offer-reveal .dor-lead{max-width:48ch;margin-top:1rem;font-size:clamp(1.0625rem,1.5vw,1.25rem);font-weight:500;line-height:1.5;color:var(--muted,#4a5565);text-wrap:pretty}
.cf-delayed-offer-reveal .dor-grid{display:grid;grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr);align-items:start;gap:clamp(1.5rem,3.4vw,2.5rem);margin-top:clamp(1.75rem,3.6vw,2.5rem)}
.cf-delayed-offer-reveal .dor-card--solo .dor-grid{grid-template-columns:minmax(0,1fr);max-width:560px;margin-inline:auto}
.cf-delayed-offer-reveal .dor-media{align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:clamp(1.25rem,3vw,2rem) clamp(.75rem,2.4vw,1.25rem) clamp(1.25rem,2.6vw,1.75rem);border-radius:calc(var(--radius,14px) + 2px);background:var(--band,#0f2747);color:var(--band-ink,#fff);box-shadow:inset 0 0 0 1px var(--band-ink)}
.cf-delayed-offer-reveal .dor-stage{position:relative;width:100%;max-width:420px;aspect-ratio:5/4;margin-inline:auto}
.cf-delayed-offer-reveal .dor-stage::after{content:"";position:absolute;left:12%;right:12%;bottom:3%;height:12%;z-index:0;border-radius:50%;background:oklch(from var(--card) calc(l - 0.12) c h / 0.35);pointer-events:none}
.cf-delayed-offer-reveal .dor-shot{position:absolute;top:48%;width:56%;aspect-ratio:1;overflow:hidden;border:4px solid var(--card-border, var(--card));border-radius:var(--card-radius, var(--radius, 14px));background:var(--card);box-shadow:var(--card-shadow, 0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35));transform:translateY(-50%) rotate(var(--rot,0deg));transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.cf-delayed-offer-reveal .dor-shot img{display:block;width:100%;height:100%;object-fit:cover}
@media (hover:hover) and (pointer:fine){.cf-delayed-offer-reveal .dor-stage:hover .dor-shot{transform:translateY(calc(-50% - 8px)) rotate(calc(var(--rot,0deg) * 1.35))}}
.cf-delayed-offer-reveal .dor-caption{margin-top:1rem;text-align:center}
.cf-delayed-offer-reveal .dor-caption strong{display:block;font-family:var(--font-display,Arial,sans-serif);font-size:1.1875rem;font-weight:var(--display-weight, 800);line-height:1.25;color:var(--band-ink,#fff);text-wrap:balance;text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-caption span{display:block;margin-top:.375rem;font-size:.9375rem;font-weight:500;line-height:1.45;color:var(--band-ink);text-wrap:pretty}
.cf-delayed-offer-reveal .dor-buy{min-width:0}
.cf-delayed-offer-reveal .dor-price{display:grid;justify-items:center;text-align:center;padding-top:.25rem}
.cf-delayed-offer-reveal .dor-price-head{font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.375rem,2.4vw,1.75rem);font-weight:var(--display-weight, 800);line-height:1.15;letter-spacing:var(--display-tracking, -.02em);color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-price-line{display:flex;align-items:center;justify-content:center;gap:clamp(1rem,2.6vw,1.5rem);margin-top:.875rem}
.cf-delayed-offer-reveal .dor-was-col{display:grid;justify-items:center;gap:.375rem}
.cf-delayed-offer-reveal .dor-was{font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.625rem,2.8vw,2.125rem);font-weight:var(--display-weight, 800);line-height:1;color:var(--danger);font-variant-numeric:tabular-nums;text-decoration:line-through;text-decoration-thickness:3px;text-decoration-color:var(--danger);text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-was-label{font-size:.875rem;font-weight:600;line-height:1.2;color:var(--muted,#4a5565);white-space:nowrap}
.cf-delayed-offer-reveal .dor-amount{display:block;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(3.75rem,7vw,5.25rem);font-weight:var(--display-weight, 900);line-height:.9;letter-spacing:var(--display-tracking, -.045em);font-variant-numeric:tabular-nums;color:var(--ink,#101828);text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.25rem .625rem;margin-top:1rem}
.cf-delayed-offer-reveal .dor-save{display:inline-flex;align-items:center;gap:.375rem;font-size:1.0625rem;font-weight:800;line-height:1.3;color:var(--dor-save);white-space:nowrap}
.cf-delayed-offer-reveal .dor-save svg{flex:none;width:1.125rem;height:1.125rem;stroke-width:3}
.cf-delayed-offer-reveal .dor-dot{color:var(--muted,#4a5565);font-weight:700}
.cf-delayed-offer-reveal .dor-note{font-size:1rem;font-weight:600;line-height:1.4;color:var(--muted,#4a5565);text-wrap:pretty}
.cf-delayed-offer-reveal .dor-cta{margin-top:1.5rem}
.cf-delayed-offer-reveal .dor-btn{position:relative;display:flex;align-items:center;justify-content:center;gap:.75rem;width:100%;min-height:4.5rem;padding:1rem 1.25rem;overflow:hidden;border:1px solid var(--button-bg-2, var(--cta-2,#b42318));border-radius:var(--button-radius, calc(var(--radius,14px) - 2px));background:linear-gradient(180deg,var(--button-bg,var(--cta)),var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h)));color:var(--button-ink, var(--cta-ink,#fff));font-family:var(--button-font, var(--font-display,Arial,sans-serif));font-size:1.3125rem;font-weight:var(--button-weight, 800);line-height:1.15;letter-spacing:-.01em;text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));cursor:pointer;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .35),inset 0 -3px 0 oklch(from var(--surface) min(0.24, calc(l - 0.12)) c h / .18),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35));transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;-webkit-tap-highlight-color:transparent;text-transform:var(--button-case, none)}
.cf-delayed-offer-reveal .dor-btn-label{min-width:0;text-wrap:balance}
.cf-delayed-offer-reveal .dor-btn:not(:disabled):not([aria-disabled="true"]):not(.is-loading):hover,.cf-delayed-offer-reveal .dor-btn.is-hover{transform:translateY(-2px);filter:none;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .4),inset 0 -3px 0 oklch(from var(--surface) min(0.24, calc(l - 0.12)) c h / .18),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35));background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h)}
.cf-delayed-offer-reveal .dor-btn:not(:disabled):not([aria-disabled="true"]):not(.is-loading):active,.cf-delayed-offer-reveal .dor-btn.is-active{transform:translateY(2px);filter:none;box-shadow:var(--button-shadow, inset 0 1px 3px oklch(from var(--surface) min(0.24, calc(l - 0.12)) c h / 0.35),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35));background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h)}
.cf-delayed-offer-reveal .dor-btn:focus-visible{outline:3px solid var(--accent,#0f5fc2);outline-offset:3px}
.cf-delayed-offer-reveal .dor-btn:disabled,.cf-delayed-offer-reveal .dor-btn[aria-disabled="true"]{cursor:not-allowed;border-color:var(--ink);background:var(--ink);box-shadow:var(--button-shadow, inset 0 -3px 0 oklch(from var(--surface) min(0.24, calc(l - 0.12)) c h / .15));text-shadow:none}
.cf-delayed-offer-reveal .dor-btn.is-loading{cursor:progress}
.cf-delayed-offer-reveal .dor-spin{flex:none;width:1.375rem;height:1.375rem;animation:dor-spin .8s linear infinite}
.cf-delayed-offer-reveal .dor-sub,.cf-delayed-offer-reveal .dor-msg{display:flex;align-items:center;justify-content:center;text-align:center;text-wrap:pretty}
.cf-delayed-offer-reveal .dor-sub{gap:.5rem;margin-top:.75rem;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted,#4a5565)}
.cf-delayed-offer-reveal .dor-sub svg{flex:none;width:1rem;height:1rem}
.cf-delayed-offer-reveal .dor-msg{gap:.5rem;margin-top:.625rem;font-size:.9375rem;font-weight:700;line-height:1.4}
.cf-delayed-offer-reveal .dor-msg svg{flex:none;width:1.125rem;height:1.125rem}
.cf-delayed-offer-reveal .dor-msg--error{color:var(--danger)}
.cf-delayed-offer-reveal .dor-guarantee{display:flex;align-items:center;justify-content:center;gap:1rem;margin-top:1.375rem;padding:0 .25rem}
.cf-delayed-offer-reveal .dor-seal-img{flex:none;width:4.5rem;height:4.5rem;object-fit:contain;background:transparent;filter:drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35)) drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35))}
.cf-delayed-offer-reveal .dor-seal{display:grid;place-items:center;flex:none;width:2.75rem;height:2.75rem;border-radius:999px;background:var(--success-soft);color:var(--dor-save)}
.cf-delayed-offer-reveal .dor-seal svg{width:1.375rem;height:1.375rem}
.cf-delayed-offer-reveal .dor-guarantee-copy{min-width:0;text-align:left}
.cf-delayed-offer-reveal .dor-guarantee-copy strong{display:block;font-size:1.0625rem;font-weight:800;line-height:1.3;color:var(--ink,#101828)}
.cf-delayed-offer-reveal .dor-guarantee-copy span{display:block;margin-top:.1875rem;font-size:.9375rem;font-weight:500;line-height:1.45;color:var(--muted,#4a5565);text-wrap:pretty}
@keyframes dor-rise{0%{opacity:0;transform:translateY(32px) scale(.985)}100%{opacity:1;transform:none}}
.cf-delayed-offer-reveal .dor-card.dor-in{animation:dor-rise .7s cubic-bezier(.16,1,.3,1) both}
@keyframes dor-pop{0%{opacity:0;transform:scale(.86)}100%{opacity:1;transform:none}}
.cf-delayed-offer-reveal .dor-in .dor-amount{transform-origin:center;animation:dor-pop .45s cubic-bezier(.2,.9,.3,1.2) .45s both}
@keyframes dor-shine{0%{transform:translateX(-120%)}100%{transform:translateX(120%)}}
.cf-delayed-offer-reveal .dor-in .dor-btn::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 30%,oklch(from var(--card) l c h / 0.38) 50%,transparent 70%);transform:translateX(-120%);animation:dor-shine 1s cubic-bezier(.3,.6,.2,1) .75s 1 both}
@keyframes dor-spin{to{transform:rotate(360deg)}}
@keyframes dor-pulse{0%{box-shadow:0 0 0 0 oklch(from var(--dor-gold) l c h / 0.55)}70%,100%{box-shadow:0 0 0 .5rem oklch(from var(--dor-gold) l c h / 0)}}
@media (max-width:760px){.cf-delayed-offer-reveal .dor-grid{grid-template-columns:minmax(0,1fr)}.cf-delayed-offer-reveal .dor-stage{max-width:340px}}
@media (max-width:480px){
.cf-delayed-offer-reveal .dor-card{padding:1.5rem 1rem 1.25rem}
.cf-delayed-offer-reveal .dor-media{padding:1rem .5rem 1.125rem}
.cf-delayed-offer-reveal .dor-price-head{font-size:1.3125rem;text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-amount{font-size:3.5rem;text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-was{font-size:1.5rem;text-transform:var(--display-case, none)}
.cf-delayed-offer-reveal .dor-btn{min-height:3.875rem;padding:.875rem;gap:.5rem;font-size:1.0625rem;text-transform:var(--button-case, none);font-family:var(--button-font, var(--font-body))}
.cf-delayed-offer-reveal .dor-guarantee{justify-content:flex-start;gap:.75rem;padding:0}
.cf-delayed-offer-reveal .dor-seal-img{width:3.75rem;height:3.75rem}
.cf-delayed-offer-reveal .dor-wait{padding:1.5rem 1.125rem}
.cf-delayed-offer-reveal .dor-wait-time{border-radius:1rem}
}
@media (prefers-reduced-motion:reduce){
.cf-delayed-offer-reveal .dor-card.dor-in,.cf-delayed-offer-reveal .dor-in .dor-amount{animation:none}
.cf-delayed-offer-reveal .dor-in .dor-btn::after{display:none}
.cf-delayed-offer-reveal .dor-btn,.cf-delayed-offer-reveal .dor-shot{transition:none}
.cf-delayed-offer-reveal .dor-spin,.cf-delayed-offer-reveal .dor-wait-live{animation:none}
}
@media (forced-colors:active){.cf-delayed-offer-reveal .dor-card,.cf-delayed-offer-reveal .dor-wait,.cf-delayed-offer-reveal .dor-btn{border:1px solid CanvasText}}
`
pieces/offer/delayed-offer-reveal/specimen.tsx 69 lines
import { slot } from "../../slots";
import __studioImage3cf63b59 from "../assets/eba74a3fb9a09662.webp";
"use client"
import * as React from "react"
import { DelayedOfferReveal, type DelayedOfferRevealState } from "../delayed-offer-reveal"
import defaults from "../../studio-defaults.json"
export const states = ["default", "hover", "active", "disabled", "error"]
// The offer moment: 42:00 into the presentation. Video-relative, never a deadline.
const REVEAL_AT = 42 * 60
const GUARANTEE_SEAL = __studioImage3cf63b59
// default: the last seconds of the presentation play, then the offer slides in.
// disabled: the calm "before" state, held while the presentation is still running.
function startTime(state: string) {
if (state === "disabled") return REVEAL_AT - 754
if (state === "default") return REVEAL_AT - 5
return REVEAL_AT
}
function Demo({ state }: { state: string }) {
const actionTimer = React.useRef<number | null>(null)
React.useEffect(() => () => { if (actionTimer.current !== null) window.clearTimeout(actionTimer.current) }, [])
const sample = defaults.sample
const [time, setTime] = React.useState(() => startTime(state))
React.useEffect(() => {
if (state !== "default" || time >= REVEAL_AT) return
const id = window.setTimeout(() => setTime((t) => t + 1), 1000)
return () => window.clearTimeout(id)
}, [state, time])
const images = sample.items.map((item, index) => ({ src: slot(`item-${index + 1}`, item.image), alt: item.imageAlt }))
return (
<DelayedOfferReveal
state={state as DelayedOfferRevealState}
revealAt={REVEAL_AT}
currentTime={time}
headline={sample.headline}
highlight="a clear plan"
lead={sample.reason}
productName={sample.name}
mediaNote="Planning guide · Copy workbook · Launch checklist"
images={images}
regularPrice={sample.regularPrice}
price={sample.price}
priceLabel={sample.todayLabel}
note={sample.note}
label={sample.label}
sublabel={sample.sublabel}
guarantee={sample.guarantee}
sealGuaranteeImage={slot("seal-guarantee", GUARANTEE_SEAL)}
onAction={() => new Promise<void>((resolve) => { actionTimer.current = window.setTimeout(resolve, 1100) })}
/>
)
}
export default function DelayedOfferRevealSpecimen({ state = "default" }: { state?: string }) {
return (
<div>
<Demo key={state} state={state} />
</div>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalDelayedOfferReveal |
Partial<DelayedOfferRevealCopy> |
|
sealGuaranteeImage OptionalDelayedOfferReveal |
string |
Default guaranteeSeal
|
revealed OptionalDelayedOfferReveal |
boolean |
|
revealAt OptionalDelayedOfferReveal |
number |
|
currentTime OptionalDelayedOfferReveal |
number |
|
videoId OptionalDelayedOfferReveal |
string |
|
onReveal OptionalDelayedOfferReveal |
() => void |
|
waitingTitle OptionalDelayedOfferReveal |
string |
Default "Your offer appears right here after the presentation."
|
waitingNote OptionalDelayedOfferReveal |
string |
Default "Keep watching. There is nothing to do yet. This space opens the moment the presentation gets to it."
|
headline OptionalDelayedOfferReveal |
string |
Default "Build your first funnel with a clear plan"
|
highlight OptionalDelayedOfferReveal |
string |
Default "a clear plan"
|
lead OptionalDelayedOfferReveal |
string |
Default "Get the guide, workbook, and checklist in one download. One payment. Yours to keep."
|
productName OptionalDelayedOfferReveal |
string |
Default "The Funnel Starter Kit"
|
mediaNote OptionalDelayedOfferReveal |
string |
|
images OptionalDelayedOfferReveal |
DelayedOfferImage[] |
Default []
|
regularLabel OptionalDelayedOfferReveal |
string |
Default "Regular value"
|
regularPrice OptionalDelayedOfferReveal |
string |
|
priceLabel OptionalDelayedOfferReveal |
string |
Default "Get the complete kit for"
|
price OptionalDelayedOfferReveal |
string |
Default "$47"
|
note OptionalDelayedOfferReveal |
string |
|
label OptionalDelayedOfferReveal |
string |
Default "Yes! Give Me Access"
|
sublabel OptionalDelayedOfferReveal |
string |
Default ""
|
href OptionalDelayedOfferReveal |
string |
Default "#checkout"
|
onAction OptionalDelayedOfferReveal |
() => void | Promise<void> |
|
loadingText OptionalDelayedOfferReveal |
string |
Default "Opening secure checkout…"
|
successText OptionalDelayedOfferReveal |
string |
|
successNote OptionalDelayedOfferReveal |
string |
|
errorText OptionalDelayedOfferReveal |
string |
Default "We couldn’t open checkout. Please tap the button again."
|
guarantee OptionalDelayedOfferReveal |
string |
Default "30-day money-back guarantee"
|
guaranteeNote OptionalDelayedOfferReveal |
string |
Default "Try everything inside. Not for you? Get your money back."
|
guaranteeSeal OptionalDelayedOfferReveal |
string |
|
disabled OptionalDelayedOfferReveal |
boolean |
Default false
|
state OptionalDelayedOfferReveal |
DelayedOfferRevealState |
Default "default"
|
className OptionalDelayedOfferReveal |
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.
--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.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
eba74a3fb9a09662.webp
image/webp · 245 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB