Delayed Offer Reveal 4
Under the presentation, a full-width photo shows the product in use. At the video-relative reveal moment, the offer card rises over the photo's lower edge with a quantity stepper, a live total and the yes button, so the order arrives right after the proof of use.
Use it in a prompt
Use offer/delayed-offer-reveal-4 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-4.tsx. - Import it and pass your copy and images (Props tab):
import { DelayedOfferReveal4 } from "@/components/funneldna/offer/delayed-offer-reveal-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/delayed-offer-reveal-4/component.tsx 565 lines
// layout: scroll-panels
// Under the presentation, a full-width photo shows the product in use. At the video-relative reveal moment, the offer card rises over the photo's lower edge with a quantity stepper, a live total and the yes button, so the order arrives right after the proof of use.
"use client"
import * as React from "react"
import { AlertCircle, Loader2, LockKeyhole, Minus, MonitorPlay, Plus, ShieldCheck } from "lucide-react"
export type DelayedOfferReveal4State = "default" | "before" | "hover" | "active" | "disabled" | "error"
export type DelayedOfferReveal4Paragraph = {
/** Bold lead-in phrase that opens the paragraph. */
lead: React.ReactNode
text?: React.ReactNode
}
export type DelayedOfferReveal4Order = {
quantity: number
/** Formatted total, e.g. "$94". */
total: string
}
export type DelayedOfferReveal4Props = {
/** Force the offer open (true) or closed (false). Leave undefined to open 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, from your player's time updates. */
currentTime?: number
/** id of an HTML5 <video> on the page. The block follows its playback when currentTime is not given. */
videoId?: string
/** Called once, when the offer card first appears. */
onReveal?: () => void
/** Photo of the product in use (scene slot). */
sceneImage?: string
sceneImageAlt?: string
/** CSS object-position for the photo crop. */
scenePosition?: string
/** Product cut-out on a transparent background (product slot). */
productImage?: string
productImageAlt?: string
/** The short line under the photo before the reveal. */
waitingText?: string
/** Screen-reader announcement when the card appears. */
availableAnnouncement?: string
headline?: React.ReactNode
paragraphs?: DelayedOfferReveal4Paragraph[]
/** Small-caps label before the price inside the copy. */
investmentLabel?: string
/** Words after the price; {guarantee} and {limit} are replaced. */
investmentNote?: string
productName?: string
/** Line under the product name; {price} is replaced. */
unitNote?: string
/** Price of one unit, e.g. "$47". The total is calculated from it. */
price?: string
/** Most units per order (the stepper's upper limit). */
limit?: number
defaultQuantity?: number
/** Controlled quantity. Leave undefined to let the block keep its own. */
quantity?: number
onQuantityChange?: (quantity: number) => void
quantityLabel?: string
unitSingular?: string
unitPlural?: string
/** {limit} is replaced. Set to "" to hide. */
limitNote?: string
decreaseLabel?: string
increaseLabel?: string
/** {quantity} and {unit} are replaced. */
totalLabel?: string
/** Live announcement on change; {quantity}, {unit} and {total} are replaced. */
totalAnnouncement?: string
label?: string
/** Checkout URL, used as a plain link when no onAction is given; {quantity} is replaced. */
href?: string
/** Action handler with the chosen quantity. While its promise is pending the button shows loadingText; a rejection shows errorText. */
onAction?: (order: DelayedOfferReveal4Order) => void | Promise<void>
loadingText?: string
errorText?: string
guarantee?: string
reassurance?: string
disabled?: boolean
state?: DelayedOfferReveal4State
className?: string
}
const useIsoLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect
export function DelayedOfferReveal4({
revealed,
revealAt,
currentTime,
videoId,
onReveal,
sceneImage,
sceneImageAlt = "An Ember cast iron skillet searing on a home stove",
scenePosition = "center 55%",
productImage,
productImageAlt = "The Ember Cast Iron Skillet Set",
waitingText = "Keep watching. Your order opens right here.",
availableAnnouncement = "The offer is now open below the presentation.",
headline = "Bring home the skillet you just watched.",
paragraphs = [
{ lead: "You saw the crust form.", text: "Now get that same sear on your own stove tonight." },
{ lead: "It moves from stove to oven.", text: "Brown it on the burner, finish it in the oven, serve it at the table." },
],
investmentLabel = "Your investment:",
investmentNote = "per set, backed by our {guarantee}.",
productName = "Ember Cast Iron Skillet Set",
unitNote = "{price} each",
price = "$47",
limit = 3,
defaultQuantity = 1,
quantity,
onQuantityChange,
quantityLabel = "How many sets?",
unitSingular = "set",
unitPlural = "sets",
limitNote = "Up to {limit} per order",
decreaseLabel = "Decrease quantity",
increaseLabel = "Increase quantity",
totalLabel = "Total for {quantity} {unit}",
totalAnnouncement = "{quantity} {unit} selected. Total {total}.",
label = "Yes! I want my Ember set",
href = "#checkout",
onAction,
loadingText = "Opening secure checkout…",
errorText = "Checkout didn’t open. Please tap the button again.",
guarantee = "30-day money-back guarantee",
reassurance = "Secure checkout",
disabled = false,
state = "default",
className,
}: DelayedOfferReveal4Props) {
const headingId = React.useId()
const waitId = React.useId()
const qtyLabelId = React.useId()
const errorId = React.useId()
const [videoTime, setVideoTime] = React.useState<number | undefined>(undefined)
React.useEffect(() => {
setVideoTime(undefined)
if (!videoId) return
const video = document.getElementById(videoId)
if (!(video instanceof HTMLVideoElement)) return
const sync = () => setVideoTime(video.currentTime)
sync()
const events = ["timeupdate", "seeked", "loadedmetadata"] as const
events.forEach((name) => video.addEventListener(name, sync))
return () => events.forEach((name) => video.removeEventListener(name, sync))
}, [videoId])
const threshold = revealAt !== undefined && Number.isFinite(revealAt) ? Math.max(0, revealAt) : undefined
const time = currentTime ?? videoTime
const reached = threshold === undefined || (time !== undefined && Number.isFinite(time) && time >= threshold)
const wants = revealed ?? reached
const [latched, setLatched] = React.useState(wants)
React.useEffect(() => {
if (wants) setLatched(true)
}, [wants])
const shown = state === "before" ? false : revealed ?? (latched || wants)
const prevShown = React.useRef(shown)
const notified = React.useRef(false)
const [rising, setRising] = React.useState(false)
const [announcement, setAnnouncement] = React.useState("")
useIsoLayoutEffect(() => {
if (shown && !prevShown.current) {
setRising(true)
setAnnouncement(availableAnnouncement)
}
if (!shown) setRising(false)
prevShown.current = shown
}, [shown, availableAnnouncement])
React.useEffect(() => {
if (shown && !notified.current) {
notified.current = true
onReveal?.()
}
}, [shown, onReveal])
const blocked = disabled || state === "disabled"
const max = Math.max(1, Math.floor(Number.isFinite(limit) ? limit : 3))
const clampQty = (n: number) => Math.min(max, Math.max(1, Math.round(Number.isFinite(n) ? n : 1)))
const [ownQty, setOwnQty] = React.useState(() => clampQty(defaultQuantity))
const qty = clampQty(quantity ?? ownQty)
const unit = qty === 1 ? unitSingular : unitPlural
const total = formatTotal(price, qty)
const atMin = qty <= 1
const atMax = qty >= max
const [bumped, setBumped] = React.useState(false)
const [liveTotal, setLiveTotal] = React.useState("")
function change(next: number) {
if (blocked) return
const value = clampQty(next)
if (value === qty) return
if (quantity === undefined) setOwnQty(value)
setBumped(true)
onQuantityChange?.(value)
setLiveTotal(
fill(totalAnnouncement, {
quantity: value,
unit: value === 1 ? unitSingular : unitPlural,
total: formatTotal(price, value),
}),
)
}
const [status, setStatus] = React.useState<"idle" | "loading" | "error">(state === "error" ? "error" : "idle")
const busy = React.useRef(false)
const mounted = React.useRef(false)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
React.useEffect(() => {
setStatus(state === "error" ? "error" : "idle")
}, [state])
async function run() {
if (blocked || busy.current || !onAction) return
busy.current = true
setStatus("loading")
try {
await onAction({ quantity: qty, total })
if (mounted.current) setStatus("idle")
} catch {
if (mounted.current) setStatus("error")
} finally {
busy.current = false
}
}
const btnClass = [
"dor4-btn",
state === "hover" ? "is-hover" : "",
state === "active" ? "is-active" : "",
status === "loading" ? "is-loading" : "",
]
.filter(Boolean)
.join(" ")
const describedBy = status === "error" ? errorId : undefined
const btnInner =
status === "loading" ? (
<>
<Loader2 className="dor4-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{loadingText}</span>
</>
) : (
<span>{label}</span>
)
const actionControl = blocked ? (
<button type="button" className={btnClass} disabled>
{btnInner}
</button>
) : onAction ? (
<button
type="button"
className={btnClass}
onClick={run}
aria-busy={status === "loading" || undefined}
aria-describedby={describedBy}
>
{btnInner}
</button>
) : (
<a className={btnClass} href={fill(href, { quantity: qty })} aria-describedby={describedBy}>
{btnInner}
</a>
)
const totalLine = fill(totalLabel, { quantity: qty, unit })
const totalFigure = (
<span key={bumped ? `t-${qty}` : "t"} className={bumped ? "dor4-total dor4-tick" : "dor4-total"}>
{total}
</span>
)
const hasPhoto = Boolean(sceneImage)
const cardClass = ["dor4-card", rising ? "is-rising" : "", hasPhoto ? "" : "is-flat"].filter(Boolean).join(" ")
return (
<section
className={["cf-delayed-offer-reveal-4", className].filter(Boolean).join(" ")}
aria-labelledby={shown ? headingId : waitId}
>
<style>{CSS}</style>
<div className="dor4-wrap">
{hasPhoto ? (
<div className="dor4-photo">
<img
src={sceneImage}
alt={sceneImageAlt}
width={1600}
height={762}
decoding="async"
style={{ objectPosition: scenePosition }}
/>
</div>
) : null}
{!shown ? (
<p id={waitId} className={hasPhoto ? "dor4-wait" : "dor4-wait is-flat"}>
<MonitorPlay className="dor4-inline" size={18} strokeWidth={2.5} aria-hidden="true" />
{waitingText}
</p>
) : (
<div className={cardClass}>
<div className="dor4-copy">
<h2 id={headingId} className="dor4-h">
{headline}
</h2>
<div className="dor4-paras">
{paragraphs.map((paragraph, index) => (
<p key={index} className="dor4-p">
<b>{paragraph.lead}</b>
{paragraph.text ? <> {paragraph.text}</> : null}
</p>
))}
<p className="dor4-p">
<span className="dor4-invest">{investmentLabel}</span> <b>{price}</b>{" "}
{fill(investmentNote, { guarantee, limit: max })}
</p>
</div>
</div>
<div className="dor4-order">
<div className="dor4-product">
{productImage ? (
<img
className="dor4-pimg"
src={productImage}
alt={productImageAlt}
width={176}
height={176}
loading="lazy"
decoding="async"
/>
) : null}
<div className="dor4-pcopy">
<h3 className="dor4-name">{productName}</h3>
{unitNote ? <p className="dor4-unit">{fill(unitNote, { price })}</p> : null}
</div>
</div>
<div className="dor4-qtyrow">
<div>
<p id={qtyLabelId} className="dor4-qlabel">
{quantityLabel}
</p>
{limitNote ? <p className="dor4-limit">{fill(limitNote, { limit: max })}</p> : null}
</div>
<div className="dor4-stepper" role="group" aria-labelledby={qtyLabelId}>
<button
type="button"
className="dor4-step"
aria-label={decreaseLabel}
aria-disabled={atMin ? true : undefined}
disabled={blocked}
onClick={() => change(qty - 1)}
>
<Minus size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
<span className="dor4-qty">{qty}</span>
<button
type="button"
className="dor4-step"
aria-label={increaseLabel}
aria-disabled={atMax ? true : undefined}
disabled={blocked}
onClick={() => change(qty + 1)}
>
<Plus size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
</div>
<div className="dor4-totalrow">
<span className="dor4-tlabel">{totalLine}</span>
{totalFigure}
</div>
</div>
<div className="dor4-action">
{actionControl}
{status === "error" ? (
<p id={errorId} className="dor4-error" role="alert">
<AlertCircle className="dor4-inline" size={16} strokeWidth={2.5} aria-hidden="true" />
{errorText}
</p>
) : null}
</div>
{guarantee || reassurance ? (
<p className="dor4-assure">
{guarantee ? (
<span className="dor4-assure-part">
<ShieldCheck className="dor4-inline dor4-shield" size={16} strokeWidth={2.5} aria-hidden="true" />
{guarantee}
</span>
) : null}
{reassurance ? (
<span className="dor4-assure-part">
<LockKeyhole className="dor4-inline" size={16} strokeWidth={2.5} aria-hidden="true" />
{reassurance}
</span>
) : null}
</p>
) : null}
</div>
)}
</div>
<span className="dor4-sr" aria-live="polite">
{announcement}
</span>
<span className="dor4-sr" aria-live="polite">
{liveTotal}
</span>
</section>
)
}
export default DelayedOfferReveal4
function fill(template: string, values: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in values ? String(values[key]) : match))
}
function formatTotal(price: string, quantity: number) {
const match = price.trim().match(/^(\D*?)(\d[\d,]*(?:\.\d+)?)(.*)$/)
if (!match) return quantity === 1 ? price : `${quantity} × ${price}`
const amount = Number(match[2].replace(/,/g, ""))
if (!Number.isFinite(amount)) return price
const decimals = match[2].includes(".") ? match[2].split(".")[1].length : 0
const value = (amount * quantity).toLocaleString("en-US", {
minimumFractionDigits: decimals,
maximumFractionDigits: decimals,
})
return `${match[1]}${value}${match[3]}`
}
const CSS = `
.cf-delayed-offer-reveal-4{
--dor4-gutter:clamp(16px,5vw,48px);
--dor4-btn:var(--button-bg,var(--cta,#d63b2f));
--dor4-btn-2:var(--button-bg-2,var(--cta-2,#b8302a));
--dor4-shadow:var(--shadow,oklch(0.22 0.03 256));
position:relative;isolation:isolate;overflow-x:clip;
background:var(--band,#1c2c4c);color:var(--band-ink,#ffffff);
padding:clamp(56px,8vw,112px) var(--dor4-gutter) clamp(64px,8.5vw,120px);
font-family:var(--font-body,system-ui,sans-serif);
}
.cf-delayed-offer-reveal-4 *,.cf-delayed-offer-reveal-4 *::before,.cf-delayed-offer-reveal-4 *::after{box-sizing:border-box}
.cf-delayed-offer-reveal-4 .dor4-wrap{max-width:1120px;margin-inline:auto}
.cf-delayed-offer-reveal-4 .dor4-photo{position:relative;margin:0}
.cf-delayed-offer-reveal-4 .dor4-photo img{display:block;width:100%;height:auto;aspect-ratio:21/10;object-fit:cover;border-radius:12px;background:color-mix(in oklch,var(--band-ink,#ffffff) 8%,var(--band,#1c2c4c))}
.cf-delayed-offer-reveal-4 .dor4-inline{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;flex:none}
.cf-delayed-offer-reveal-4 .dor4-wait{margin:24px auto 0;max-width:46rem;text-align:center;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:600;line-height:1.5;text-wrap:pretty;color:var(--band-ink,#ffffff)}
.cf-delayed-offer-reveal-4 .dor4-wait.is-flat{margin-top:0}
.cf-delayed-offer-reveal-4 .dor4-card{
position:relative;z-index:1;
width:min(100%,960px);margin:calc(-1 * clamp(96px,14vw,200px)) auto 0;
display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
grid-template-areas:'copy order' 'copy action' 'copy assure';
grid-template-rows:auto auto 1fr;
column-gap:clamp(32px,4vw,56px);row-gap:16px;
padding:clamp(20px,3vw,32px);
background:var(--card,#ffffff);color:var(--ink,#172033);
border:1px solid var(--card-border,oklch(from var(--ink,#172033) l c h / .12));
border-radius:var(--card-radius,var(--radius,14px));
box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 256 / .22),0 12px 24px -8px oklch(0.22 0.03 256 / .32)));
}
.cf-delayed-offer-reveal-4 .dor4-card.is-flat{margin-top:0}
.cf-delayed-offer-reveal-4 .dor4-card.is-rising{animation:dor4-rise .62s cubic-bezier(.2,.7,.2,1) both}
.cf-delayed-offer-reveal-4 .dor4-copy{grid-area:copy;min-width:0}
.cf-delayed-offer-reveal-4 .dor4-h{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink,#172033)}
.cf-delayed-offer-reveal-4 .dor4-paras{margin-top:16px}
.cf-delayed-offer-reveal-4 .dor4-p{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty;color:var(--ink,#172033)}
.cf-delayed-offer-reveal-4 .dor4-p + .dor4-p{margin-top:12px}
.cf-delayed-offer-reveal-4 .dor4-p b{font-weight:800}
.cf-delayed-offer-reveal-4 .dor4-invest{font-variant-caps:all-small-caps;letter-spacing:.06em;font-weight:800;color:var(--accent,#2f5fd0)}
.cf-delayed-offer-reveal-4 .dor4-order{grid-area:order;min-width:0;display:grid;gap:20px;padding:20px;border-radius:10px;background:color-mix(in oklch,var(--ink,#172033) 4%,var(--card,#ffffff))}
.cf-delayed-offer-reveal-4 .dor4-product{display:flex;align-items:center;gap:16px;min-width:0}
.cf-delayed-offer-reveal-4 .dor4-pimg{flex:none;width:96px;height:96px;object-fit:contain;border-radius:0;filter:drop-shadow(0 2px 3px oklch(from var(--dor4-shadow) l c h / .3)) drop-shadow(0 10px 12px oklch(from var(--dor4-shadow) l c h / .2))}
.cf-delayed-offer-reveal-4 .dor4-pcopy{min-width:0}
.cf-delayed-offer-reveal-4 .dor4-name{margin:0;font-family:var(--font-display,inherit);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-wrap:balance;color:var(--ink,#172033)}
.cf-delayed-offer-reveal-4 .dor4-unit{margin:4px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted,#4a5568)}
.cf-delayed-offer-reveal-4 .dor4-qtyrow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px}
.cf-delayed-offer-reveal-4 .dor4-qlabel{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3;color:var(--ink,#172033)}
.cf-delayed-offer-reveal-4 .dor4-limit{margin:2px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted,#4a5568)}
.cf-delayed-offer-reveal-4 .dor4-stepper{flex:none;display:inline-flex;align-items:center;gap:4px;padding:4px;background:var(--field,#ffffff);color:var(--field-ink,#172033);border:1px solid var(--field-border,color-mix(in oklch,var(--ink,#172033) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px))}
.cf-delayed-offer-reveal-4 .dor4-step{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:max(0px,calc(var(--field-radius,var(--radius,12px)) - 4px));background:transparent;color:inherit;cursor:pointer;transition:background .16s ease}
.cf-delayed-offer-reveal-4 .dor4-step:hover:not(:disabled):not([aria-disabled=true]){background:color-mix(in oklch,var(--field-ink,#172033) 8%,var(--field,#ffffff))}
.cf-delayed-offer-reveal-4 .dor4-step:active:not(:disabled):not([aria-disabled=true]){background:color-mix(in oklch,var(--field-ink,#172033) 14%,var(--field,#ffffff))}
.cf-delayed-offer-reveal-4 .dor4-step:disabled,.cf-delayed-offer-reveal-4 .dor4-step[aria-disabled=true]{color:color-mix(in oklch,var(--field-ink,#172033) 38%,var(--field,#ffffff));cursor:not-allowed}
.cf-delayed-offer-reveal-4 .dor4-step:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2f5fd0));outline-offset:2px}
.cf-delayed-offer-reveal-4 .dor4-qty{min-width:2.5ch;text-align:center;font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;font-variant-numeric:lining-nums tabular-nums;color:var(--field-ink,#172033)}
.cf-delayed-offer-reveal-4 .dor4-totalrow{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px}
.cf-delayed-offer-reveal-4 .dor4-tlabel{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3;color:var(--ink,#172033)}
.cf-delayed-offer-reveal-4 .dor4-total{display:inline-block;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:lining-nums tabular-nums;color:var(--ink,#172033)}
.cf-delayed-offer-reveal-4 .dor4-tick{animation:dor4-tick .3s cubic-bezier(.2,.7,.2,1) both}
.cf-delayed-offer-reveal-4 .dor4-action{grid-area:action;min-width:0;margin-top:4px}
.cf-delayed-offer-reveal-4 .dor4-btn{
display:flex;width:100%;min-height:64px;padding:10px 28px;align-items:center;justify-content:center;gap:10px;
border:0;border-radius:var(--button-radius,var(--radius,12px));
background:linear-gradient(oklch(from var(--dor4-btn) calc(l + .04) c h),oklch(from var(--dor4-btn-2) calc(l - .02) c h));
color:var(--button-ink,var(--cta-ink,#ffffff));
font-family:var(--button-font,var(--font-display,inherit));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-wrap:balance;text-decoration:none;
text-shadow:var(--button-text-shadow,none);
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--dor4-btn) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--dor4-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--dor4-shadow) l c h / .35),0 8px 16px -6px oklch(from var(--dor4-shadow) l c h / .45));
cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-delayed-offer-reveal-4 .dor4-btn:not(:disabled):hover,.cf-delayed-offer-reveal-4 .dor4-btn.is-hover{
background:linear-gradient(oklch(from var(--dor4-btn) calc(l - .01) c h),oklch(from var(--dor4-btn-2) calc(l - .07) c h));
transform:translateY(-1px);
box-shadow:inset 0 1px 0 oklch(from var(--dor4-btn) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--dor4-btn) calc(l - .18) c h),0 1px 2px oklch(from var(--dor4-shadow) l c h / .38),0 12px 20px -8px oklch(from var(--dor4-shadow) l c h / .5);
}
.cf-delayed-offer-reveal-4 .dor4-btn:not(:disabled):active,.cf-delayed-offer-reveal-4 .dor4-btn.is-active{
background:linear-gradient(oklch(from var(--dor4-btn) calc(l - .06) c h),oklch(from var(--dor4-btn-2) calc(l - .08) c h));
transform:translateY(1px);
box-shadow:inset 0 2px 4px oklch(from var(--dor4-btn) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--dor4-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--dor4-shadow) l c h / .3);
}
.cf-delayed-offer-reveal-4 .dor4-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2f5fd0));outline-offset:3px}
.cf-delayed-offer-reveal-4 .dor4-btn.is-loading{cursor:progress}
.cf-delayed-offer-reveal-4 .dor4-btn:disabled{background:var(--button-2-bg,var(--secondary,#e6e9ef));color:var(--button-2-ink,var(--secondary-ink,#172033));box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 1px oklch(0.22 0.03 256 / .18),0 1px 3px oklch(0.22 0.03 256 / .14)));text-shadow:none;transform:none;cursor:not-allowed}
.cf-delayed-offer-reveal-4 .dor4-spin{flex:none;animation:dor4-spin .8s linear infinite}
.cf-delayed-offer-reveal-4 .dor4-error{margin:12px 0 0;padding:8px 12px;border-radius:10px;background:var(--danger-soft,color-mix(in oklch,var(--danger,#b42318) 14%,var(--card,#ffffff)));color:var(--danger,#b42318);font-size:.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
.cf-delayed-offer-reveal-4 .dor4-assure{grid-area:assure;align-self:start;margin:-2px 0 0;text-align:center;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted,#4a5568)}
.cf-delayed-offer-reveal-4 .dor4-assure-part{display:inline-block;white-space:nowrap;margin:2px 10px}
.cf-delayed-offer-reveal-4 .dor4-shield{color:var(--success,#1f7a45)}
.cf-delayed-offer-reveal-4 .dor4-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
@keyframes dor4-rise{from{opacity:.82;transform:translateY(72px)}to{opacity:1;transform:none}}
@keyframes dor4-tick{from{opacity:.82;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes dor4-spin{to{transform:rotate(360deg)}}
@media (max-width:860px){
.cf-delayed-offer-reveal-4 .dor4-card{grid-template-columns:minmax(0,1fr);grid-template-areas:'copy' 'order' 'action' 'assure';grid-template-rows:none;row-gap:20px}
}
@media (max-width:640px){
.cf-delayed-offer-reveal-4 .dor4-photo{margin-inline:calc(-1 * var(--dor4-gutter))}
.cf-delayed-offer-reveal-4 .dor4-photo img{aspect-ratio:auto;height:clamp(180px,52vw,240px);border-radius:0}
.cf-delayed-offer-reveal-4 .dor4-card{width:auto;margin:-32px calc(8px - var(--dor4-gutter)) 0;padding:24px 16px 20px;row-gap:20px}
.cf-delayed-offer-reveal-4 .dor4-card.is-flat{margin-top:0}
.cf-delayed-offer-reveal-4 .dor4-order{padding:16px;gap:16px}
.cf-delayed-offer-reveal-4 .dor4-pimg{width:80px;height:80px}
.cf-delayed-offer-reveal-4 .dor4-stepper{flex:1 1 100%;justify-content:space-between}
.cf-delayed-offer-reveal-4 .dor4-totalrow{align-items:center}
.cf-delayed-offer-reveal-4 .dor4-action{margin-top:0}
.cf-delayed-offer-reveal-4 .dor4-btn{min-height:60px;padding:10px 14px}
}
@media (max-width:400px){
.cf-delayed-offer-reveal-4 .dor4-btn{font-size:1.0625rem}
}
@media (prefers-reduced-motion:reduce){
.cf-delayed-offer-reveal-4 .dor4-card.is-rising,.cf-delayed-offer-reveal-4 .dor4-tick,.cf-delayed-offer-reveal-4 .dor4-spin{animation:none}
.cf-delayed-offer-reveal-4 .dor4-btn,.cf-delayed-offer-reveal-4 .dor4-step{transition:none}
.cf-delayed-offer-reveal-4 .dor4-btn:not(:disabled):hover,.cf-delayed-offer-reveal-4 .dor4-btn.is-hover,.cf-delayed-offer-reveal-4 .dor4-btn:not(:disabled):active,.cf-delayed-offer-reveal-4 .dor4-btn.is-active{transform:none}
}
`
pieces/offer/delayed-offer-reveal-4/specimen.tsx 41 lines
import __studioImage6478e3d7 from "../assets/a70e6ca2bfd66aab.webp";
import __studioImage2a054c15 from "../assets/36650c158048f088.webp";
import { DelayedOfferReveal4, type DelayedOfferReveal4State } from "../delayed-offer-reveal-4"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "before", "hover", "active", "disabled", "error"]
export default function DelayedOfferReveal4Specimen({ state = "default" }: { state?: DelayedOfferReveal4State }) {
const sample = defaults.sample
return (
<DelayedOfferReveal4
state={state}
revealAt={540}
currentTime={state === "before" ? 312 : 548}
sceneImage={slot(
"scene",
__studioImage6478e3d7,
)}
sceneImageAlt="An Ember cast iron skillet searing steak in butter and thyme on a gas stove"
scenePosition="center 45%"
productImage={slot(
"product",
__studioImage2a054c15,
)}
productImageAlt="The Ember Cast Iron Skillet Set, three nested skillets"
productName="Ember Cast Iron Skillet Set"
headline="Bring home the skillet you just watched."
paragraphs={[
{ lead: "You saw the crust form.", text: "Now get that same sear on your own stove tonight." },
{ lead: "It moves from stove to oven.", text: "Brown it on the burner, finish it in the oven, serve it at the table." },
]}
price={sample.price}
limit={3}
guarantee={sample.guarantee}
reassurance="Secure checkout"
label="Yes! I want my Ember set"
href="#checkout"
/>
)
}
| Name | Type | Details |
|---|---|---|
revealed OptionalDelayedOfferReveal4 |
boolean |
|
revealAt OptionalDelayedOfferReveal4 |
number |
|
currentTime OptionalDelayedOfferReveal4 |
number |
|
videoId OptionalDelayedOfferReveal4 |
string |
|
onReveal OptionalDelayedOfferReveal4 |
() => void |
|
sceneImage OptionalDelayedOfferReveal4 |
string |
|
sceneImageAlt OptionalDelayedOfferReveal4 |
string |
Default "An Ember cast iron skillet searing on a home stove"
|
scenePosition OptionalDelayedOfferReveal4 |
string |
Default "center 55%"
|
productImage OptionalDelayedOfferReveal4 |
string |
|
productImageAlt OptionalDelayedOfferReveal4 |
string |
Default "The Ember Cast Iron Skillet Set"
|
waitingText OptionalDelayedOfferReveal4 |
string |
Default "Keep watching. Your order opens right here."
|
availableAnnouncement OptionalDelayedOfferReveal4 |
string |
Default "The offer is now open below the presentation."
|
headline OptionalDelayedOfferReveal4 |
React.ReactNode |
Default "Bring home the skillet you just watched."
|
paragraphs OptionalDelayedOfferReveal4 |
DelayedOfferReveal4Paragraph[] |
Default [
{ lead: "You saw the crust form.", text: "Now get that same sear on your own stove tonight." },
{ lead: "It moves from stove to oven.", text: "Brown it on the burner, finish it in the oven, serve it at the table." },
]
|
investmentLabel OptionalDelayedOfferReveal4 |
string |
Default "Your investment:"
|
investmentNote OptionalDelayedOfferReveal4 |
string |
Default "per set, backed by our {guarantee}."
|
productName OptionalDelayedOfferReveal4 |
string |
Default "Ember Cast Iron Skillet Set"
|
unitNote OptionalDelayedOfferReveal4 |
string |
Default "{price} each"
|
price OptionalDelayedOfferReveal4 |
string |
Default "$47"
|
limit OptionalDelayedOfferReveal4 |
number |
Default 3
|
defaultQuantity OptionalDelayedOfferReveal4 |
number |
Default 1
|
quantity OptionalDelayedOfferReveal4 |
number |
|
onQuantityChange OptionalDelayedOfferReveal4 |
(quantity: number) => void |
|
quantityLabel OptionalDelayedOfferReveal4 |
string |
Default "How many sets?"
|
unitSingular OptionalDelayedOfferReveal4 |
string |
Default "set"
|
unitPlural OptionalDelayedOfferReveal4 |
string |
Default "sets"
|
limitNote OptionalDelayedOfferReveal4 |
string |
Default "Up to {limit} per order"
|
decreaseLabel OptionalDelayedOfferReveal4 |
string |
Default "Decrease quantity"
|
increaseLabel OptionalDelayedOfferReveal4 |
string |
Default "Increase quantity"
|
totalLabel OptionalDelayedOfferReveal4 |
string |
Default "Total for {quantity} {unit}"
|
totalAnnouncement OptionalDelayedOfferReveal4 |
string |
Default "{quantity} {unit} selected. Total {total}."
|
label OptionalDelayedOfferReveal4 |
string |
Default "Yes! I want my Ember set"
|
href OptionalDelayedOfferReveal4 |
string |
Default "#checkout"
|
onAction OptionalDelayedOfferReveal4 |
(order: DelayedOfferReveal4Order) => void | Promise<void> |
|
loadingText OptionalDelayedOfferReveal4 |
string |
Default "Opening secure checkout…"
|
errorText OptionalDelayedOfferReveal4 |
string |
Default "Checkout didn’t open. Please tap the button again."
|
guarantee OptionalDelayedOfferReveal4 |
string |
Default "30-day money-back guarantee"
|
reassurance OptionalDelayedOfferReveal4 |
string |
Default "Secure checkout"
|
disabled OptionalDelayedOfferReveal4 |
boolean |
Default false
|
state OptionalDelayedOfferReveal4 |
DelayedOfferReveal4State |
Default "default"
|
className OptionalDelayedOfferReveal4 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
scene- A wide atmosphere photo behind or beside the copy.
-
36650c158048f088.webp
image/webp · 56.4 KB
-
a70e6ca2bfd66aab.webp
image/webp · 83.8 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB