Hook Photo Push 1
The hook over a full-bleed scene photo or supplied clip that pushes in slowly while a frame-filling headline rises line by line on the text-side scrim and its key phrase gets the marker; the cold opening beat of a VSL, sales video or video ad, in 16:9, 9:16 and 1:1.
Use it in a prompt
Use the video/hook-photo-push video frame from the FunnelDNA library in my brand (landscape and vertical and square). 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/hook-photo-push.tsx. - Import it and pass your copy and images (Props tab):
import { HookPhotoPush } from "@/components/funneldna/video/hook-photo-push"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/video/hook-photo-push/component.tsx 189 lines
// When to use: The hook over a full-bleed scene photo or supplied clip that pushes in slowly while a frame-filling headline rises line by line on the text-side scrim and its key phrase gets the marker; the cold opening beat of a VSL, sales video or video ad, in 16:9, 9:16 and 1:1.
import * as React from "react"
import { Img, OffthreadVideo, Sequence, useCurrentFrame } from "remotion"
import noise from "../fx/textures/noise"
import { Scrim } from "../fx/fx"
import {
HOLD, IN_OUT, MarkerSwipe, SafeArea, StageField, TONES, VideoStage, display, ok, phraseRange, progress, swipePart,
useFitText, useHeld, useStage, useWords,
type VideoFormat, type VideoMeta, type Word,
} from "../fx/video-kit"
export const video = { fps: 30, durationInFrames: 150, formats: ["landscape", "vertical", "square"], poster: 130 } satisfies VideoMeta
/** The meta under another name: the `video` prop (a supplied clip) would shadow it inside the component. */
const META = video
export type HookPhotoPushProps = {
format?: VideoFormat
/** Default 150 (5 s); a clip sets it from the storyboard or timeline. */
durationInFrames?: number
/** The hook, one sentence: a situation or the big promise, never the viewer's health, body or money. */
headline?: string
/** The key phrase inside `headline` that gets the marker; once the headline has landed the other words step back to the muted ink. */
highlight?: string
/** Voice timings for `headline`; with them each word rises on its spoken frame, without them the lines rise in turn. */
words?: Word[]
/** The scene photo (pass slot("scene", …)). An illustration of the situation, not a customer's home unless supplied as one. */
image?: string
/** A supplied clip played instead of the still (muted, at least as long as the scene); `image` shows beneath it while it loads. */
video?: string
/** The photo's subject (CSS object-position, e.g. "68% 46%"): the push drifts toward it and zooms into it. */
focus?: string
}
/** Frame the first line starts: fully opaque by 11, settled by 18, while the scrim finishes at 12. */
const FIRST_LINE = 6
/** Frames between lines when there are no voice timings. */
const LINE_STEP = 6
/** Square: the share of the text-safe height the headline may use (top-anchored); the rest keeps the subject clear above the captions. */
const SQUARE_TEXT = 0.7
/** Hook: the scene pushes in, the scrim settles on the text side, the headline rises line by line, then the key phrase is marked while the rest steps back. */
export function HookPhotoPush({
format = "landscape",
durationInFrames = META.durationInFrames,
headline = "",
highlight,
words,
image,
video: clip,
focus = "50% 50%",
}: HookPhotoPushProps) {
const frame = useCurrentFrame()
const f = useHeld(durationInFrames)
const end = durationInFrames - HOLD
const { text, u, width, height, portrait, format: stageFormat } = useStage()
const square = stageFormat === "square"
// Theme: every colour here is a token. Text is the band's ink / muted ink (TONES.band → --band-ink and its muted
// partner), the veil and scrims are --band in OKLCH, the marker is --marker via MarkerSwipe, and the face is
// --font-display via display(). The photo stays natural (a `scene` slot, never washed into the theme).
const { ink, muted } = TONES.band
const timed = useWords(headline, words, durationInFrames, { from: FIRST_LINE, span: 0.4 })
const voiced = !!words?.length
const range = phraseRange(timed, highlight)
// Re-composed per format. Landscape: the line fills the left two thirds over a left scrim. Vertical: the line fills
// the safe area edge to edge and sits centred between the platform UI (top 250) and the caption band (bottom 640).
// Square: the line spans the safe width, anchored to the top over a top scrim, so the subject reads clear in the
// lower third above the caption band (bottom 190).
const right = portrait || square ? text.right : width * 0.34
const boxW = width - text.left - right
const safeH = height - text.top - text.bottom
const boxH = square ? safeH * SQUARE_TEXT : safeH
// Measured in the theme's own face, inside the real box it is drawn in: 2–3 rows on 16:9, 3–5 on 9:16, 3–4 on 1:1.
const head = React.useRef<HTMLHeadingElement>(null)
const size = useFitText(head, headline, {
boxW, boxH,
guess: (portrait ? 132 : square ? 124 : 150) * u,
max: (portrait ? 160 : square ? 150 : 196) * u,
min: (square ? 80 : 84) * u,
lines: portrait ? [3, 4, 5] : square ? [3, 4] : [2, 3],
})
// Which wrapped row each word sits on, read from the laid-out headline, so the lines rise as lines in any face.
const [rows, setRows] = React.useState<number[]>([])
React.useLayoutEffect(() => {
const el = head.current
if (!el) return
const tops: number[] = []
const next = Array.from(el.querySelectorAll<HTMLElement>("[data-w]")).map((s) => {
const t = s.offsetTop
let row = tops.findIndex((x) => Math.abs(x - t) < s.offsetHeight * 0.5)
if (row < 0) { tops.push(t); row = tops.length - 1 }
return row
})
if (next.join() !== rows.join()) setRows(next)
})
const atOf = (i: number) => (voiced ? timed[i].at : FIRST_LINE + (rows[i] ?? 0) * LINE_STEP)
const lastAt = timed.reduce((m, _x, i) => Math.max(m, atOf(i)), FIRST_LINE)
// The beat starts only once the whole headline (key phrase included) has risen and settled, never before frame 24,
// and the swipe always finishes before the final hold.
const swipeAt = Math.min(Math.max(24, lastAt + 14), end - 22)
const swipe = progress(f, swipeAt, swipeAt + 10, (t) => t)
// dim-others: the rest steps back for the beat and returns, all before the hold; skipped when the voice lands too late.
const dim = range && swipeAt + 50 <= end
? progress(f, swipeAt, swipeAt + 8) * (1 - progress(f, swipeAt + 36, swipeAt + 48, IN_OUT))
: 0
// Camera: a slow push 1.02 → 1.10 into the subject, the framing drifting toward `focus` (never past it). In 1:1 the
// crop is already tight, so the framing starts nearer the subject and the push grows from the lower, clear part of
// the frame, keeping the subject out from under the headline.
const [fx, fy] = parseFocus(focus)
const k = progress(f, 0, end, (t) => t)
const drift = square ? 0.6 + 0.4 * k : 0.35 + 0.65 * k
const originY = square ? Math.max(fy, 64) : fy
const media: React.CSSProperties = {
position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover",
objectPosition: `${(50 + (fx - 50) * drift).toFixed(2)}% ${(50 + (fy - 50) * drift).toFixed(2)}%`,
transform: `scale(${(1.02 + 0.08 * k).toFixed(4)})`, transformOrigin: `${fx}% ${originY}%`,
}
const hasMedia = !!(clip || image)
const scrimIn = progress(f, 0, 12, IN_OUT)
const parts: React.ReactNode[] = []
timed.forEach((x, i) => {
const at = atOf(i)
const rise = progress(f, at, at + 12)
const shown = progress(f, at, at + 5, (t) => t)
const inPhrase = !!range && i >= range[0] && i < range[1]
// Stepping back is a colour move, never opacity: the other words go no further than the band's muted ink (4.5:1),
// while the photo drops back under a band veil, so the marked phrase is the brightest thing in the frame.
const color = inPhrase || dim === 0 ? ink : `color-mix(in oklch, ${ink} ${(100 - 100 * dim).toFixed(1)}%, ${muted})`
parts.push(
<span key={i} data-w={i} style={{ display: "inline-block", color, opacity: shown, transform: `translateY(${((1 - rise) * 38 * u).toFixed(2)}px)` }}>
{inPhrase ? <MarkerSwipe p={swipePart(swipe, i - range![0], range![1] - range![0])}>{x.w}</MarkerSwipe> : x.w}
</span>,
)
if (i < timed.length - 1) parts.push(" ")
})
// The text-side scrim per format: the left of the frame in 16:9; from the top down past the centred block in 9:16;
// from the top down past the top-anchored block in 1:1, opening onto the subject below.
const scrimBox: React.CSSProperties = portrait
? { left: 0, right: 0, top: 0, bottom: "12%" }
: square
? { left: 0, right: 0, top: 0, bottom: "10%" }
: { left: 0, top: 0, bottom: 0, width: "82%" }
const veil = portrait ? 0.26 : square ? 0.24 : 0.2
const safeInset = portrait ? undefined : square ? { bottom: height - text.top - boxH } : { right }
return (
<VideoStage format={format} tone="band">
<div aria-hidden style={{ position: "absolute", inset: 0, zIndex: 0, overflow: "hidden" }}>
{image ? <Img src={image} alt="" style={media} /> : null}
{clip
// The clip follows the held frame, so it freezes with everything else for the final hold.
? <Sequence from={frame - f} layout="none"><OffthreadVideo src={clip} muted style={media} /></Sequence>
: null}
{!hasMedia ? <StageField tone="band" texture={noise} opacity={0.14} frame={f} /> : null}
<div style={{ position: "absolute", inset: 0, background: ok("--band", 0, Number((0.42 * dim).toFixed(3))) }} />
</div>
{hasMedia ? (
<>
<div aria-hidden style={{ position: "absolute", zIndex: 0, isolation: "isolate", pointerEvents: "none", opacity: scrimIn, ...scrimBox }}>
<Scrim side={portrait || square ? "top" : "left"} tone="band" strength={0.94} />
</div>
<div aria-hidden style={{ position: "absolute", inset: 0, zIndex: 0, isolation: "isolate", pointerEvents: "none", opacity: scrimIn }}>
<Scrim side="full" tone="band" strength={veil} />
</div>
</>
) : null}
<SafeArea inset={safeInset} style={{ zIndex: 1, justifyContent: square ? "flex-start" : "center", alignItems: "flex-start", textAlign: "left" }}>
<h2 ref={head} style={{ ...display(size, { lineHeight: 1.06 }), position: "relative", margin: 0, width: boxW, color: ink }}>
{parts}
</h2>
</SafeArea>
</VideoStage>
)
}
/** "68% 46%" (or keywords) → [x, y] in percent, clamped to the image. */
function parseFocus(focus: string): [number, number] {
const kw: Record<string, number> = { left: 0, top: 0, center: 50, right: 100, bottom: 100 }
const v = focus.trim().split(/\s+/).map((p) => (p.endsWith("%") ? parseFloat(p) : kw[p] ?? NaN))
const clamp = (n: number | undefined) => (n !== undefined && Number.isFinite(n) ? Math.min(100, Math.max(0, n)) : 50)
return [clamp(v[0]), clamp(v[1])]
}
export default HookPhotoPush
pieces/video/hook-photo-push/specimen.tsx 32 lines
import __studioImagefd44cd11 from "../assets/79ce3baaea1be6a6.webp";
import * as React from "react"
import { slot } from "../../slots"
import { VideoPreview, type VideoFormat } from "../../fx/video-kit"
import { HookPhotoPush, video, type HookPhotoPushProps } from "../hook-photo-push"
export const states = ["landscape", "vertical", "square"]
/** Scrim in with the first line fully readable, the marked beat with the rest stepped back to the muted ink, headline complete and returned, final hold. */
export const keyframes = [18, 50, 100, 149]
// Fictional sample business (forest-night palette, display-serif pair).
export const sampleBrand = {
name: "Hartline Builders",
theme: "dark",
background: "#0f1f19",
colors: ["#3ddc97", "#f4b860"],
fonts: ["DM Serif Display", "DM Sans"],
button: "soft-caps",
}
// Fictional sample: Hartline Builders, a kitchen and bath remodeler. The photo illustrates a remodel, not a customer's home.
export const sample: HookPhotoPushProps = {
headline: "Most bids change once the walls come down.",
highlight: "once the walls come down.",
focus: "68% 46%",
}
const kitchen = __studioImagefd44cd11
export default function HookPhotoPushSpecimen({ state = "landscape" }: { state?: string }) {
return <VideoPreview component={HookPhotoPush} props={{ ...sample, image: slot("scene", kitchen) }} format={state as VideoFormat} meta={video} />
}
| Name | Type | Details |
|---|---|---|
format OptionalHookPhotoPush |
VideoFormat |
Default "landscape"
|
durationInFrames OptionalHookPhotoPush |
number |
Default META.durationInFrames
|
headline OptionalHookPhotoPush |
string |
Default ""
|
highlight OptionalHookPhotoPush |
string |
|
words OptionalHookPhotoPush |
Word[] |
|
image OptionalHookPhotoPush |
string |
|
video OptionalHookPhotoPush |
string |
|
focus OptionalHookPhotoPush |
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.
-
79ce3baaea1be6a6.webp
image/webp · 95.5 KB
-
bec2a41897a3364d.webp
image/webp · 51.2 KB