Offer Stack Reveal 1
The stack. A white --card ledger rises into frame; item rows tick in one by one with dotted leaders drawing from name to value (each on its words cue), then a rule draws, the total value counts up from zero, holds 12 frames, is struck by one straight line, and today's price lands large in the action colour with a single firm spring and one terms line under it: offer beat.
Use it in a prompt
Use the video/offer-stack-reveal video frame from the FunnelDNA library in my brand (landscape and vertical). Follow the video skill. Ask me for the script facts, voice and images 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/video/offer-stack-reveal.tsx. - Import it and pass your copy and images (Props tab):
import { OfferStackReveal } from "@/components/funneldna/video/offer-stack-reveal"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/video/offer-stack-reveal/component.tsx 196 lines
import * as React from "react"
import { useVideoConfig } from "remotion"
import noise from "../fx/textures/noise"
import {
CountUp, ProductShot, Rise, SafeArea, StageField, StageLight, StagePhoto, T, VideoStage, cue, display, progress, springAt, SPRINGS, useHeld, useStage, useWords, IN_OUT,
type VideoFormat, type VideoMeta, type Word,
} from "../fx/video-kit"
export const video = { fps: 30, durationInFrames: 300, formats: ["landscape", "vertical"], poster: 280 } satisfies VideoMeta
export type OfferStackItem = { name: string; value?: string }
export type OfferStackRevealProps = {
format?: VideoFormat
durationInFrames?: number
/** The offer's name, set as the ledger's headline. */
name?: string
/** What is in the stack, with each item's stated value. Empty rows do not render. */
items?: OfferStackItem[]
/** The stated total value (struck once it has counted up). */
total?: string
/** Label beside the total. */
totalLabel?: string
/** Today's price, as on the page. */
price?: string
/** Short line before the price ("Get the complete kit for"). */
priceLabel?: string
/** One terms line under the price (the guarantee, the billing). */
terms?: string
/** Product shot, transparent background (pass slot("product", …)). */
product?: string
/** Optional scene photo behind the stage (pass slot("scene", …)), kept in natural colour; the ledger card carries its own surface. */
scene?: string
/** Voice timings; rows land on the first word of their name, the price on its first word. */
words?: Word[]
}
/** Opens its own height from 0 at progress k (grid 0fr → 1fr), so the card grows with what it holds. */
const Grow = ({ k, children }: { k: number; children: React.ReactNode }) => (
<div style={{ display: "grid", gridTemplateRows: `${Math.min(1, Math.max(0, k)).toFixed(4)}fr` }}>
<div style={{ minHeight: 0, overflow: "hidden" }}>{children}</div>
</div>
)
/** Offer: the ledger rises, rows tick in with dotted leaders, the total counts up and is struck, today's price lands. */
export function OfferStackReveal({
format = "landscape",
durationInFrames = video.durationInFrames,
name = "",
items = [],
total = "",
totalLabel = "Total value",
price = "",
priceLabel = "",
terms = "",
product = "",
scene = "",
words,
}: OfferStackRevealProps) {
const f = useHeld(durationInFrames)
const { fps } = useVideoConfig()
const { text, u, width, height, format: fmt } = useStage()
const stacked = fmt !== "landscape"
const square = fmt === "square"
const rows = items.filter((x) => x.name?.trim())
const timed = useWords(words?.map((w) => w.w).join(" ") ?? "", words, durationInFrames)
// The default schedule fits 10 s; shorter scenes compress it, and a voiced price compresses it further so the rows,
// the count and the strike all land before the price is said.
const plan = (k: number) => {
const at = (n: number) => Math.round(n * k)
const rowAt = rows.map((r, i) => cue(timed, words ? r.name : undefined, at(26 + i * 24)))
const ruleAt = (rowAt[rowAt.length - 1] ?? at(10)) + at(22)
const countAt = ruleAt + 8, countDur = Math.max(10, Math.round(30 * k))
const strikeAt = total ? countAt + countDur + Math.max(6, at(12)) : ruleAt
return { at, rowAt, ruleAt, countAt, countDur, strikeAt, natural: strikeAt + at(16) }
}
let k = Math.min(1, Math.max(0.5, (durationInFrames - 30) / 190))
const said = words ? cue(timed, price, -1) : -1
if (said > 0 && plan(k).natural > said) k = Math.max(0.3, (k * said) / plan(k).natural)
const { at, rowAt, ruleAt, countAt, countDur, strikeAt, natural } = plan(k)
const priceAt = said > 0 ? Math.max(said, strikeAt + 8) : natural
const footAt = priceAt - 6
const card = springAt(f, 0, fps, SPRINGS.soft)
const strike = progress(f, strikeAt, strikeAt + 8, IN_OUT)
const landed = springAt(f, priceAt, fps, SPRINGS.firm)
// Base sizes (px at 1080) scaled down only as far as the ledger needs to fit the text area.
const est = 70 + (name ? 112 : 0) + rows.length * 86 + (total ? 112 : 0) + 34 + (price ? 250 + (terms ? 82 : 0) : 0)
const top = square ? (product ? 300 : 84) : product ? 500 : 280
const avail = stacked ? height / u - top - text.bottom / u : 1080 - 96 - 180
const fit = Math.min(1, avail / est)
const s = (n: number) => n * u * fit
// Small text never drops under the 28px floor, however far the column scales.
const t = (n: number) => Math.max(28 * u, s(n))
const rowSize = s(54)
const cardW = stacked ? width - text.left - text.right : Math.min(1010 * u, width - (product ? 820 * u : text.left) - text.right)
const pad = s(56)
const ledger = (
<div style={{
width: cardW, background: T.card, color: T.ink, borderRadius: `calc(${T.cardRadius} * ${2 * u})`, boxShadow: T.cardShadow,
border: `${s(1.5)}px solid ${T.cardBorder}`, borderTop: `${s(10)}px solid ${T.accentFill}`, overflow: "hidden", opacity: Math.min(1, card * 1.4),
transform: `translateY(${(1 - card) * s(90)}px)`,
}}>
<div style={{ padding: `${pad}px ${pad}px ${s(36)}px` }}>
{name && (
<Rise at={3} dur={12}>
<h2 style={{ ...display(s(80), { lineHeight: 1.04 }), margin: `0 0 ${s(26)}px` }}>{name}</h2>
</Rise>
)}
{rows.map((r, i) => {
const lead = progress(f, rowAt[i] + 4, rowAt[i] + 18, IN_OUT)
return (
<Grow key={i} k={progress(f, rowAt[i] - 4, rowAt[i] + 8, IN_OUT)}><Rise at={rowAt[i]} y={18} dur={12}>
<div style={{ display: "flex", alignItems: "baseline", gap: s(16), padding: `${s(10)}px 0`, borderTop: i ? `${s(1.5)}px solid color-mix(in oklch, ${T.ink} 10%, transparent)` : undefined }}>
<span style={{ fontSize: rowSize, fontWeight: 600, lineHeight: 1.2 }}>{r.name}</span>
{r.value && <>
<span aria-hidden style={{
flex: 1, minWidth: s(40), height: s(6), alignSelf: "center", marginTop: s(10), color: T.muted, opacity: 0.55,
backgroundImage: `radial-gradient(circle, currentColor ${s(2.6)}px, transparent ${s(3.1)}px)`, backgroundSize: `${s(16)}px 100%`,
clipPath: `inset(0 ${(1 - lead) * 100}% 0 0)`,
}} />
<span style={{ ...display(rowSize, { lineHeight: 1.2 }), fontVariantNumeric: "tabular-nums", opacity: progress(f, rowAt[i] + 12, rowAt[i] + 20) }}>{r.value}</span>
</>}
</div>
</Rise></Grow>
)
})}
{total && (
<Grow k={progress(f, ruleAt - 4, ruleAt + 8, IN_OUT)}>
<div style={{ height: s(3), margin: `${s(10)}px 0 ${s(16)}px`, background: `color-mix(in oklch, ${T.ink} 22%, transparent)`, clipPath: `inset(0 ${(1 - progress(f, ruleAt, ruleAt + 14, IN_OUT)) * 100}% 0 0)` }} />
<Rise at={ruleAt + 4} y={14} dur={12}>
<div style={{ display: "flex", alignItems: "baseline", justifyContent: "space-between", gap: s(24) }}>
<span style={{ fontSize: t(44), fontWeight: 600, color: T.muted }}>{totalLabel}</span>
<span style={{ position: "relative", ...display(s(80), { lineHeight: 1 }), color: strike >= 1 ? T.muted : T.ink }}>
<CountUp value={total} at={countAt} dur={countDur} />
<span aria-hidden style={{
position: "absolute", left: s(-8), right: s(-8), top: "52%", height: s(7), borderRadius: s(4), background: T.danger,
transform: "rotate(-4deg)", clipPath: `inset(0 ${(1 - strike) * 100}% 0 0)`,
}} />
</span>
</div>
</Rise>
</Grow>
)}
</div>
{price && (
<Grow k={progress(f, footAt - 4, footAt + 8, IN_OUT)}><div style={{
background: "var(--button-bg, var(--cta))", color: "var(--button-ink, var(--cta-ink))", padding: `${s(28)}px ${pad}px ${s(34)}px`,
}}>
<div style={{ display: "flex", alignItems: "baseline", flexWrap: "wrap", columnGap: s(22) }}>
{priceLabel && <span style={{ fontSize: t(46), fontWeight: 700, opacity: progress(f, priceAt - 2, priceAt + 8) }}>{priceLabel}</span>}
<span style={{
...display(s(176), { lineHeight: 1 }), display: "inline-block", fontVariantNumeric: "tabular-nums",
textShadow: "var(--button-text-shadow, none)", opacity: Math.min(1, landed * 3), transform: `scale(${1.45 - 0.45 * landed})`, transformOrigin: "0% 80%",
}}>{price}</span>
</div>
{terms && (
<Rise at={priceAt + 14} y={10} dur={12}>
<div style={{ marginTop: s(40), fontSize: t(38), fontWeight: 600, lineHeight: 1.25 }}>{terms}</div>
</Rise>
)}
</div></Grow>
)}
</div>
)
// The product stands lit on the stage: big, beside the ledger in landscape, above it on phones.
const box = square ? { size: 330, top: 0 } : stacked ? { size: 540, top: 10 } : { size: 780, top: 120 }
const shot = product && (
<ProductShot src={product} frame={f} at={at(6)} size={box.size * u} top={box.top * u}
left={stacked ? (width - box.size * u) / 2 : 40 * u} />
)
return (
<VideoStage format={format} tone="band">
{scene
? <StagePhoto src={scene} frame={f} dur={durationInFrames - 12} push={[1.02, 1.08]} treatment="natural" tone="band" side="none" />
: <StageField tone="band" texture={noise} opacity={0.14} frame={f} />}
{product && <StageLight x={stacked ? "50%" : "22%"} strength={0.26} floor={!stacked} />}
{stacked ? (
<>
<SafeArea inset={{ top: top * u }} style={{ justifyContent: "flex-start", alignItems: "center" }}>{ledger}</SafeArea>
{shot}
</>
) : (
<>
{shot}
<SafeArea inset={{ top: 96 * u, left: product ? 820 * u : text.left }} style={{ justifyContent: "flex-start", alignItems: product ? "flex-start" : "center" }}>{ledger}</SafeArea>
</>
)}
</VideoStage>
)
}
export default OfferStackReveal
pieces/video/offer-stack-reveal/specimen.tsx 32 lines
import __studioImage5bd9daf0 from "../assets/5bd9daf0a5fe2f5f.webp";
import * as React from "react"
import { slot } from "../../slots"
import { VideoPreview, type VideoFormat } from "../../fx/video-kit"
import { OfferStackReveal, video, type OfferStackRevealProps } from "../offer-stack-reveal"
export const states = ["landscape", "vertical"]
/** Headline readable, two rows in, the total counted, the total struck, the price landed and held. */
export const keyframes = [18, 54, 128, 152, 299]
// Fictional sample offer (the studio's sample brand): values, price and terms stand in for the page's own.
export const sample: OfferStackRevealProps = {
name: "The Funnel Starter Kit",
items: [
{ name: "Funnel Planning Guide", value: "$97" },
{ name: "Page Copy Workbook", value: "$147" },
{ name: "Launch Checklist", value: "$47" },
],
total: "$291",
price: "$47",
priceLabel: "Get the complete kit for",
terms: "One payment · 30-day money-back guarantee",
// The designed shot; the specimen swaps in the brand's product slot at render time.
product: __studioImage5bd9daf0,
}
/** The sample business in its own colours and type (sample-palettes.md: coral-cobalt · grotesk-clean); Original and every preset stay one click away. */
export const sampleBrand = { name: "The Funnel Starter Kit", theme: "light", background: "#f7f5ff", colors: ["#6a3df0", "#1fbf8f"], fonts: ["Space Grotesk", "Manrope"] }
export default function OfferStackRevealSpecimen({ state = "landscape" }: { state?: string }) {
return <VideoPreview component={OfferStackReveal} props={{ ...sample, product: slot("product", __studioImage5bd9daf0) }} format={state as VideoFormat} meta={video} />
}
| Name | Type | Details |
|---|---|---|
format OptionalOfferStackReveal |
VideoFormat |
Default "landscape"
|
durationInFrames OptionalOfferStackReveal |
number |
Default video.durationInFrames
|
name OptionalOfferStackReveal |
string |
Default ""
|
items OptionalOfferStackReveal |
OfferStackItem[] |
Default []
|
total OptionalOfferStackReveal |
string |
Default ""
|
totalLabel OptionalOfferStackReveal |
string |
Default "Total value"
|
price OptionalOfferStackReveal |
string |
Default ""
|
priceLabel OptionalOfferStackReveal |
string |
Default ""
|
terms OptionalOfferStackReveal |
string |
Default ""
|
product OptionalOfferStackReveal |
string |
Default ""
|
scene OptionalOfferStackReveal |
string |
Default ""
|
words OptionalOfferStackReveal |
Word[] |
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-ink--button-text-shadow- Main CTA button: background, ink, font, weight, case, radius and shadow.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
5bd9daf0a5fe2f5f.webp
image/webp · 158 KB
-
bec2a41897a3364d.webp
image/webp · 51.2 KB