Problem List Crosses 1
The problem beat over a full-bleed natural-colour scene photo: the usual fixes stack big down the centre one by one, each stamped with a solid red cross, then the payoff lands under them with one marker swipe; mid-video in a sales video, VSL or webinar trailer.
Use it in a prompt
Use the video/problem-list-crosses 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/problem-list-crosses.tsx. - Import it and pass your copy and images (Props tab):
import { ProblemListCrosses } from "@/components/funneldna/video/problem-list-crosses"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/video/problem-list-crosses/component.tsx 304 lines
// When to use: The problem beat over a full-bleed natural-colour scene photo: the usual fixes stack big down the centre one by one, each stamped with a solid red cross, then the payoff lands under them with one marker swipe; mid-video in a sales video, VSL or webinar trailer.
import * as React from "react"
import { X } from "lucide-react"
import { continueRender, delayRender, useVideoConfig } from "remotion"
import concrete from "../fx/textures/concrete"
import office from "../fx/backdrops/office"
import { Scrim } from "../fx/fx"
import {
HOLD, IN_OUT, MarkerSwipe, SafeArea, StageField, StagePhoto, TONES, VideoStage, countText, display, progress, springAt, swipePart,
useFitText, useHeld, useStage, useWords,
type SpringConfig, type StageTone, type TimedWord, type VideoFormat, type VideoMeta, type Word,
} from "../fx/video-kit"
export const video = { fps: 30, durationInFrames: 210, formats: ["landscape", "vertical"], poster: 205 } satisfies VideoMeta
export type ProblemListCrossesProps = {
format?: VideoFormat
durationInFrames?: number
/** What has not worked, one short phrase each (two or three words; three rows read best, up to five). Describe common approaches, never a named competitor. A number in a row counts up as it lands. */
rows?: string[]
/** The payoff that turns toward the answer, fitted under the crossed-out rows. */
close?: string
/** The phrase inside `close` that gets the one marker swipe. */
highlight?: string
/** Voice timings for the scene: each row and the close land on their first spoken word; without them the scene paces itself evenly. */
words?: Word[]
/** The field and scrim tone: band (dark end of the palette, default) or surface (the bright end). */
tone?: Exclude<StageTone, "card">
/** Scene photo behind the whole frame (pass slot("scene", …)); full bleed in its natural colour with a slow push and an even scrim behind the centred list. Empty falls back to the lit stage field. */
scene?: string
/** Photo focal point (CSS object-position). */
focus?: string
}
/** The cross stamps in: a quick spring that lands with one small dip. */
const STAMP: SpringConfig = { damping: 14, stiffness: 300, mass: 0.6 }
/** The cross badge's diameter and its gap to the words, as a share of the row's type size. */
const BADGE = 0.8, BADGE_GAP = 0.28
/** Row and payoff line heights. */
const ROW_LH = 1.06, CLOSE_LH = 1.04
/** The block fit simulates the payoff's wrap on a slightly narrower column and fits the block to 94% of the text-safe height, so wide faces (and their descenders) always end clear of the caption band. */
const FIT_SLACK = 0.95, FIT_BUDGET = 0.94
/** Problem: each usual fix lands big down the centre over the photo and gets a solid cross (the rows stay in the full field ink over the scrim, so they hold contrast); the list eases up 4% and the payoff lands under it with one marker swipe. */
export function ProblemListCrosses({
format = "landscape",
durationInFrames = video.durationInFrames,
rows = ["More hours", "More effort", "Same result"],
close = "There is a simpler way.",
highlight = "simpler way.",
words,
tone = "band",
scene = office,
focus = "50% 50%",
}: ProblemListCrossesProps) {
const f = useHeld(durationInFrames)
const { fps } = useVideoConfig()
const { text, u, width, height, portrait } = useStage()
const colors = TONES[tone]
const scrimTone = tone === "band" ? "band" : "surface"
const list = rows.map((r) => r.trim()).filter(Boolean).slice(0, 5)
const n = list.length
const timed = useWords(words?.map((w) => w.w).join(" ") ?? "", words, durationInFrames)
const { rowAt, crossAt, closeAt, swipeAt } = schedule(durationInFrames, words?.length ? timed : null, list, close)
// One centred column across the text-safe area; the photo runs full bleed behind it in both formats.
const colW = width - text.left - text.right
const avail = height - text.top - text.bottom
const rowGap = portrait ? 0.18 : 0.14
const rowsFactor = n ? n * ROW_LH + rowGap * (n - 1) : 0
// Rows sit near 130px in 16:9 and 110px in 9:16; they only give way so the payoff keeps its reserved room.
const rowMax = (portrait ? 112 : 132) * u
const rowMin = (portrait ? 64 : 84) * u
const gapClose = close && n ? (portrait ? 44 : 48) * u : 0
const closeMin = (portrait ? 84 : 96) * u
const closeMax = (portrait ? 140 : 156) * u
const reserve = close ? (portrait ? 2 : 1) * closeMin * 1.08 : 0
const rowCap = Math.max(rowMin, Math.min(rowMax, (avail * FIT_BUDGET - gapClose - reserve) / Math.max(ROW_LH, rowsFactor)))
const longest = list.reduce((a, r, i) => (r.length > list[a].length ? i : a), 0)
// Measured in the theme's own face: every row shares the size the longest one allows on one line beside its badge.
const rowRef = React.useRef<HTMLDivElement>(null)
const rowSize = useFitText(rowRef, list[longest] ?? "", {
boxW: colW - (BADGE + BADGE_GAP) * rowCap, boxH: rowCap * 1.1, guess: rowCap, max: rowCap, min: rowMin, lines: [1],
})
const rowsH = n ? rowSize * rowsFactor : 0
const closeBox = Math.max(closeMin * 1.08, avail * FIT_BUDGET - rowsH - gapClose)
const closeRef = React.useRef<HTMLHeadingElement>(null)
const closeSize = useFitText(closeRef, close, {
boxW: colW, boxH: closeBox, guess: Math.min(closeMax, closeBox / 2.2), max: closeMax, min: closeMin, lines: portrait ? [1, 2, 3] : [1, 2],
})
// The whole list + payoff block, measured in the theme's face, scales together to the safe height, so nothing reaches the band.
const fit = useBlockFit(closeRef, close, colW, rowsH + gapClose, closeSize, avail)
const rs = rowSize * fit, cs = closeSize * fit, gs = gapClose * fit
const squeeze = close ? progress(f, closeAt - 4, closeAt + 12, IN_OUT) : 0
const swipe = progress(f, swipeAt, swipeAt + 8, (t) => t)
const closeWords = close.split(/\s+/).filter(Boolean)
const hl = matchRange(closeWords, highlight)
const closeK = progress(f, closeAt, closeAt + 12)
return (
<VideoStage format={format} tone={tone}>
{scene ? (
<>
{/* The photo stays a photo: natural colour, full bleed, a slow push, an even scrim behind the centred list. */}
<StagePhoto src={scene} frame={f} dur={durationInFrames - HOLD} push={[1.04, 1.12]} treatment="natural" tone={scrimTone} side="center" position={focus} />
<div aria-hidden style={{ position: "absolute", inset: 0, zIndex: 1, isolation: "isolate", pointerEvents: "none" }}>
<Scrim side="full" tone={scrimTone} strength={0.18} />
</div>
</>
) : (
<StageField tone={tone} texture={concrete} opacity={tone === "band" ? 0.16 : 0.12} frame={f} />
)}
<SafeArea style={{ zIndex: 2, justifyContent: "center", alignItems: "center" }}>
<div style={{ width: colW, display: "flex", flexDirection: "column", alignItems: "center" }}>
{n > 0 && (
<div style={{ transform: `scale(${1 - 0.04 * squeeze})`, transformOrigin: "50% 0%" }}>
{list.map((r, i) => {
const slide = progress(f, rowAt[i], rowAt[i] + 12)
const stamp = springAt(f, crossAt[i], fps, STAMP)
const b = rs * BADGE
return (
<Grow key={i} k={progress(f, rowAt[i] - 4, rowAt[i] + 8, IN_OUT)}>
<div style={{ display: "flex", alignItems: "flex-start", gap: rs * BADGE_GAP, paddingTop: i ? rs * rowGap : 0 }}>
<div aria-hidden style={{ flex: "none", width: b, height: b, marginTop: (rs * ROW_LH - b) / 2 }}>
{stamp > 0 && <Cross size={b} k={stamp} u={u} />}
</div>
{/* Crossed rows keep the full field ink: the cross badge marks them as done, and the muted ink would drop under 4.5:1 over the photo scrim. */}
<div ref={i === longest ? rowRef : undefined} style={{
...display(rs, { lineHeight: ROW_LH }), minWidth: 0, whiteSpace: "nowrap", color: colors.ink,
opacity: Math.min(1, slide * 1.6), transform: `translateX(${-(1 - slide) * 90 * u}px)`,
}}>
{countText(r, progress(f, rowAt[i], rowAt[i] + 24, IN_OUT))}
</div>
</div>
</Grow>
)
})}
</div>
)}
{close && (
<Grow k={progress(f, closeAt - 4, closeAt + 10, IN_OUT)}>
<div style={{ paddingTop: gs, width: colW }}>
<h2 ref={closeRef} style={{
...display(cs, { lineHeight: CLOSE_LH }), margin: "0 auto", color: colors.ink, maxWidth: colW, textAlign: "center",
opacity: closeK, transform: `translateY(${(1 - closeK) * 36 * u}px) scale(${1.05 - 0.05 * closeK})`, transformOrigin: "50% 100%",
}}>
{closeWords.map((w, i) => {
const k = hl && i >= hl[0] && i < hl[1] ? i - hl[0] : -1
return (
<React.Fragment key={i}>
{i ? " " : null}
{k < 0 ? <span>{w}</span> : <MarkerSwipe p={swipePart(swipe, k, hl![1] - hl![0])}>{w}</MarkerSwipe>}
</React.Fragment>
)
})}
</h2>
</div>
</Grow>
)}
</div>
</SafeArea>
</VideoStage>
)
}
export default ProblemListCrosses
/** The canvas font string for an element's computed face (style, weight, family) at 100px. */
function faceOf(st: CSSStyleDeclaration) {
return `${st.fontStyle} ${st.fontWeight} 100px ${st.fontFamily}`
}
/**
* One scale for the whole list + payoff block. The payoff's wrap is simulated in the theme's own face (read from the
* heading's computed font, as useFitText does) on a slightly narrower column, so the estimate never has fewer rows than
* the drawn heading; when rows + gap + payoff rows exceed 94% of the safe height, everything shrinks together.
* The theme's face is loaded before the final measure and the render is held until the block has been re-measured in
* it, so no frame is captured at a scale measured in the wrong face. Frame-independent: fixed for the whole scene.
*/
function useBlockFit(ref: React.RefObject<HTMLElement | null>, close: string, colW: number, fixed: number, closeSize: number, avail: number) {
const [fit, setFit] = React.useState(1)
const [ready, setReady] = React.useState(false)
const [handle] = React.useState(() => (typeof document !== "undefined" ? delayRender("problem-list-crosses block fit") : null))
const released = React.useRef(false)
const release = React.useCallback(() => { if (handle !== null && !released.current) { released.current = true; continueRender(handle) } }, [handle])
const measure = React.useCallback(() => {
if (typeof document === "undefined") return
const words = close.split(/\s+/).filter(Boolean)
let lines = 0
if (words.length) {
const el = ref.current
const ctx = el ? document.createElement("canvas").getContext("2d") : null
if (!el || !ctx) return
const st = getComputedStyle(el)
ctx.font = faceOf(st)
const caps = st.textTransform === "uppercase" ? (w: string) => w.toUpperCase() : (w: string) => w
const track = parseFloat(st.letterSpacing) / parseFloat(st.fontSize) || 0
const k = closeSize / 100, room = colW * FIT_SLACK, space = ctx.measureText(" ").width * k
let x = 0
lines = 1
for (const w of words) {
const wide = (ctx.measureText(caps(w)).width + track * 100 * w.length) * k
if (x && x + space + wide > room) { lines++; x = wide } else x += (x ? space : 0) + wide
}
}
const h = fixed + lines * closeSize * CLOSE_LH
const budget = avail * FIT_BUDGET
const next = h > budget && h > 0 ? budget / h : 1
setFit((s) => (Math.abs(s - next) > 0.001 ? next : s))
}, [ref, close, colW, fixed, closeSize, avail])
React.useLayoutEffect(measure)
React.useEffect(() => {
if (typeof document === "undefined" || !document.fonts) { setReady(true); return }
let live = true
const done = () => { if (live) { measure(); setReady(true) } }
const el = ref.current
const face = el ? faceOf(getComputedStyle(el)) : ""
const loaded = face && close.trim() ? document.fonts.load(face, close).then(() => document.fonts.ready) : document.fonts.ready
loaded.then(done, done)
document.fonts.addEventListener?.("loadingdone", measure)
return () => { live = false; document.fonts.removeEventListener?.("loadingdone", measure) }
}, [measure, ref, close])
// Released after the render that carries the re-measured scale has committed.
React.useEffect(() => { if (ready) release() }, [ready, fit, release])
React.useEffect(() => release, [release])
return fit
}
/** Opens its own height from 0 at progress k (grid 0fr → 1fr), clipped only top and bottom so a row can slide in from the left. */
function Grow({ k, children }: { k: number; children: React.ReactNode }) {
const open = Math.min(1, Math.max(0, k))
return (
<div style={{ display: "grid", gridTemplateRows: `${open.toFixed(4)}fr` }}>
<div style={{ minHeight: 0, clipPath: open < 1 ? "inset(0 -60% 0 -60%)" : undefined }}>{children}</div>
</div>
)
}
/**
* The solid status badge: --danger fill, white cross, stamped in with a quick scale spring. The fill's lightness is
* capped (≤ 0.56) so the white glyph holds 3:1 on dark themes, where hosts lift --danger for text on the band.
*/
function Cross({ size, k, u }: { size: number; k: number; u: number }) {
return (
<div style={{
width: size, height: size, borderRadius: "50%", display: "grid", placeItems: "center", color: "var(--status-glyph, #fff)",
background: "linear-gradient(oklch(from var(--danger) min(calc(l + 0.04), 0.56) c h), oklch(from var(--danger) min(calc(l - 0.05), 0.47) c h))",
boxShadow: `inset 0 ${2 * u}px 0 oklch(from var(--danger) min(calc(l + 0.12), 0.66) c h / 0.6), inset 0 ${-4 * u}px 0 oklch(from var(--danger) min(calc(l - 0.14), 0.38) c h)`,
filter: `drop-shadow(0 ${2 * u}px ${3 * u}px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.45)) drop-shadow(0 ${8 * u}px ${10 * u}px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.3))`,
opacity: Math.min(1, k * 4), transform: `scale(${1.55 - 0.55 * k})`,
}}>
<X size={size * 0.56} strokeWidth={3} />
</div>
)
}
const norm = (s: string) => s.toLowerCase().replace(/[^a-z0-9$%']/g, "")
/** Index range [start, end) of `phrase` inside the words of a line, or null. */
function matchRange(ws: string[], phrase?: string): [number, number] | null {
const p = (phrase ?? "").split(/\s+/).map(norm).filter(Boolean)
if (!p.length) return null
for (let i = 0; i + p.length <= ws.length; i++) if (p.every((x, j) => norm(ws[i + j]) === x)) return [i, i + p.length]
return null
}
/** Where a phrase is spoken, searching from `from` so rows that start alike ("More posts", "More keywords") each find their own words. */
function locate(timed: TimedWord[], phrase: string, from: number): { i: number; len: number } | null {
const p = phrase.split(/\s+/).map(norm).filter(Boolean)
if (!p.length) return null
for (let i = from; i + p.length <= timed.length; i++) if (p.every((x, j) => norm(timed[i + j].w) === x)) return { i, len: p.length }
for (let i = from; i < timed.length; i++) if (norm(timed[i].w) === p[0]) return { i, len: 1 }
return null
}
/** The scene's beats: even pacing scaled to the scene's length, or the spoken frames; the first row is readable at once and the swipe always lands before the final hold. */
function schedule(dur: number, timed: TimedWord[] | null, list: string[], close: string) {
const end = dur - HOLD
const k = Math.min(1.35, Math.max(0.6, end / 198))
const n = list.length
const closeMax = end - 40, rowMax = closeMax - 24
let cursor = 0
const spoken = (phrase: string, fallback: number) => {
if (!timed?.length || !phrase) return fallback
const hit = locate(timed, phrase, cursor)
if (!hit) return fallback
cursor = hit.i + hit.len
return timed[hit.i].at
}
// The rows spread over about two and a half seconds; the first lands at once (picture leads voice), readable by frame 12.
const step = n > 1 ? Math.round((80 * k) / (n - 1)) : 0
const rowAt: number[] = []
list.forEach((r, i) => {
const said = spoken(r, 4 + i * step)
const at = i ? Math.max(rowAt[i - 1] + 8, said) : Math.min(6, said)
rowAt.push(Math.min(rowMax - (n - 1 - i) * 8, at))
})
// Each cross stamps 10 frames after its row lands.
const crossAt = rowAt.map((a) => a + 10)
const lastCross = crossAt[n - 1] ?? 4
const closeAt = Math.min(closeMax, Math.max(lastCross + 8, spoken(close, lastCross + Math.round(16 * k))))
return { rowAt, crossAt, closeAt, swipeAt: closeAt + 16 }
}
pieces/video/problem-list-crosses/specimen.tsx 26 lines
import * as React from "react"
import office from "../../fx/backdrops/office"
import { slot } from "../../slots"
import { VideoPreview, type VideoFormat } from "../../fx/video-kit"
import { ProblemListCrosses, video, type ProblemListCrossesProps } from "../problem-list-crosses"
export const states = ["landscape", "vertical"]
/** First row readable, first cross landed, second cross, third cross, the payoff swiped, final hold. */
export const keyframes = [12, 22, 62, 102, 138, 205]
// Fictional sample: Hollis Reed, an SEO trainer, in the trailer for her free training. Common approaches only, no named competitor.
export const sample: ProblemListCrossesProps = {
rows: ["More posts", "More keywords", "No change"],
close: "There is a simpler way.",
highlight: "simpler way.",
// The designed scene (fx "Office"), full bleed in its natural colour; the brand's scene slot replaces it at render time.
scene: office,
focus: "50% 45%",
}
/** The sample business in its own colours and type (sample-palettes.md: deep-ocean · expressive); Original and every preset stay one click away. */
export const sampleBrand = { name: "Hollis Reed SEO", theme: "dark", background: "#0d2730", colors: ["#2ec4b6", "#ffb703"], fonts: ["Bricolage Grotesque", "Figtree"] }
export default function ProblemListCrossesSpecimen({ state = "landscape" }: { state?: string }) {
return <VideoPreview component={ProblemListCrosses} props={{ ...sample, scene: slot("scene", office) }} format={state as VideoFormat} meta={video} />
}
| Name | Type | Details |
|---|---|---|
format OptionalProblemListCrosses |
VideoFormat |
Default "landscape"
|
durationInFrames OptionalProblemListCrosses |
number |
Default video.durationInFrames
|
rows OptionalProblemListCrosses |
string[] |
Default ["More hours", "More effort", "Same result"]
|
close OptionalProblemListCrosses |
string |
Default "There is a simpler way."
|
highlight OptionalProblemListCrosses |
string |
Default "simpler way."
|
words OptionalProblemListCrosses |
Word[] |
|
tone OptionalProblemListCrosses |
Exclude<StageTone, "card"> |
Default "band"
|
scene OptionalProblemListCrosses |
string |
Default office
|
focus OptionalProblemListCrosses |
string |
Default "50% 50%"
|
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.
None listed in this pack.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
981ec216ca653287.webp
image/webp · 32.2 KB
-
f211b3080387e46d.webp
image/webp · 105 KB