Before After Split 1
Same place, two states: a straight-seamed before/after split of one scene from one camera position, with a solid band that carries the promise and the page's own button, so a cold local-service prospect sees the result before any pitch.
The sample's post copy
Sample brand, fictional copy: the pattern to follow, written for the person's real offer.
- Platform 4 characters
- meta
- Primary text 275 characters
- This yard took eleven days, first dig to last plant.
Calder Yard walks your yard with you, sketches the plan on site and gives you one written price before anything is dug.
No surprise change orders once the crew arrives.
Book your free 45-minute design visit. No obligation. - Headline 25 characters
- Free on-site design visit
- Description 26 characters
- No obligation · 45 minutes
- Button 8 characters
- Book Now
What it is for
- Angle
- us versus them
- Temperature
- cold
- Archetype
- before after
- Sends people to
- local service estimate
- Words on the image
- At most 20
Use it in a prompt
Make the ads/before-after-split ad from the FunnelDNA library in my brand, at every size (square, portrait, story, landscape), with post copy written the way the sample's is. Follow the ads skill. Ask me for the offer, images and facts 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/ads/before-after-split.tsx. - Import it and pass your copy and images (Props tab):
import { BeforeAfterSplit } from "@/components/funneldna/ads/before-after-split"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/ads/before-after-split/component.tsx 173 lines
// archetype: before-after
// Same place, two states: a straight-seamed before/after split of one scene from one camera position, with a solid band that carries the promise and the page's own button, so a cold local-service prospect sees the result before any pitch.
import * as React from "react";
import { AdFrame, AdHeadline, Cue, LogoMark, type AdFormat } from "../fx/ad-kit";
import { Backdrop, FX_HOST } from "../fx/fx";
import nature from "../fx/backdrops/nature";
/**
* Truth: both photos are real, or clearly illustrative, of the same place from the same camera position. Never for
* bodies, health or money. Any timeframe in the headline is a supplied fact.
*/
export type BeforeAfterSplitProps = {
format?: AdFormat;
/** Headline, 12 words or fewer; "\n" sets an authored line break. */
headline?: string;
/** Phrase inside the headline set in the light marker tint (empty = none). */
highlight?: string;
/** One optional support line under the headline; it counts toward wordCap. Empty = not drawn. */
support?: string;
/** The landing page button's exact words. */
cue?: string;
/** One short offer-terms line under the cue label (free, no obligation, area served). Empty = not drawn. */
cueNote?: string;
/** Legacy alias for cueNote, used only when cueNote is undefined. */
note?: string;
beforeLabel?: string;
afterLabel?: string;
/** item-1 slot: the place before. */
beforeImage?: string;
/** item-2 slot: the same place, from the same camera position, after. */
afterImage?: string;
beforeAlt?: string;
afterAlt?: string;
/** CSS object-position for each photo; keep both equal so the same subject lines up. */
beforePosition?: string;
afterPosition?: string;
/** Share of the split given to the before photo, 20 to 80 (percent). */
seam?: number;
/** logo slot: a wordmark, filled with the band's text colour. */
logo?: string;
/** Brand name: the logo's alt text, or the wordmark itself when no logo is supplied. */
brand?: string;
/** Legacy alias for brand, used only when brand is undefined. */
logoAlt?: string;
/** Imported fx backdrop module behind the band; a theme's scene slot replaces it. */
backdrop?: string;
className?: string;
};
export const formats: AdFormat[] = ["square", "portrait", "story", "landscape"];
export const lead = "portrait" satisfies AdFormat;
export const wordCap = 20;
export function BeforeAfterSplit(props: BeforeAfterSplitProps) {
const {
format = "portrait",
headline = "Same place.\nA whole new look.",
highlight = "",
support = "",
cue = "Get my free estimate",
cueNote,
note,
beforeLabel = "Before",
afterLabel = "After",
beforeImage = "",
afterImage = "",
beforeAlt = "The space before the work",
afterAlt = "The same space after the work",
beforePosition = "center",
afterPosition = "center",
seam = 50,
logo = "",
brand,
logoAlt,
backdrop = nature,
className = "",
} = props;
const noteText = cueNote ?? note ?? "";
const brandName = brand ?? logoAlt ?? "";
const a = Math.min(80, Math.max(20, Number.isFinite(seam) ? seam : 50));
const splitVars = {
"--seam-a": `minmax(0, ${a}fr)`,
"--seam-b": `minmax(0, ${100 - a}fr)`,
} as React.CSSProperties;
return (
<AdFrame format={format} className={`cf-bas ${className}`.trim()}>
<style href="cf-bas" precedence="default">{CSS}</style>
<div className="cf-bas__split" style={splitVars}>
<figure className="cf-bas__half cf-bas__before">
{beforeImage ? <img src={beforeImage} alt={beforeAlt} style={{ objectPosition: beforePosition }} /> : null}
{beforeLabel ? <span className="cf-bas__chip">{beforeLabel}</span> : null}
</figure>
<figure className="cf-bas__half cf-bas__after">
{afterImage ? <img src={afterImage} alt={afterAlt} style={{ objectPosition: afterPosition }} /> : null}
{afterLabel ? <span className="cf-bas__chip">{afterLabel}</span> : null}
</figure>
</div>
<div className="cf-bas__band" style={FX_HOST}>
<Backdrop src={backdrop} treatment="scrim-dark" side="left" position="center" />
<div className="cf-bas__veil" aria-hidden="true" />
<div className="cf-bas__copy">
<LogoMark src={logo} brand={brandName} className="cf-bas__logo" />
<AdHeadline as="h1" text={headline} highlight={highlight} mark="ink" className="cf-bas__head" />
{support ? <p className="cf-bas__support">{support}</p> : null}
<div className="cf-bas__cue">
<Cue note={noteText}>{cue}</Cue>
</div>
</div>
</div>
</AdFrame>
);
}
export default BeforeAfterSplit;
// Sizes are stage units (--px = frame width / 1080 px, from AdFrame's --u). Landscape: u = 1.111, so 52u = 58px
// headline, 22u = 24px chips, 44u = 49px margins. The photo split takes whatever the band does not need (band rows
// are auto), so a longer headline under a wider theme face shortens the photos instead of clipping the type.
// Highlight: the phrase is set in the kit's "ink" mark (a light marker tint on the dark band), so nothing is painted
// behind the letters and no fill can reach the descenders of the line above in any display face. The headline keeps
// line-height 1.12; the mark carries no padding, negative margin or background.
// Story (1080x1920): the band is pinned to the bottom of the frame and its copy is bottom-aligned, so the cue's lower
// edge always lands 8px above the 340px safe line (y = 1572) and nothing below it is dead band: 44 top padding, two
// 108px headline lines (242), 36 gap, cue + note (~138) = band from ~y 1112; the two photos share the rest equally
// (~0-552 and ~560-1112), the Before chip at y 282 below the top safe line, the logo floated beside headline line one.
const CSS = `
.cf-bas{--px:calc(var(--u, 1) * 1px);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;background:var(--band);color:var(--band-ink);}
.cf-bas[data-format="landscape"]{grid-template-columns:minmax(0,1fr) calc(540 * var(--px));grid-template-rows:minmax(0,1fr);}
.cf-bas__split{display:grid;gap:calc(8 * var(--px));background:var(--card);min-width:0;min-height:0;}
.cf-bas[data-format="square"] .cf-bas__split,.cf-bas[data-format="landscape"] .cf-bas__split{grid-template-columns:var(--seam-a) var(--seam-b);}
.cf-bas[data-format="portrait"] .cf-bas__split,.cf-bas[data-format="story"] .cf-bas__split{grid-template-rows:var(--seam-a) var(--seam-b);}
.cf-bas__half{position:relative;margin:0;min-width:0;min-height:0;overflow:hidden;background:color-mix(in oklch, var(--ink) 8%, var(--card));}
.cf-bas__half img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;}
.cf-bas__chip{position:absolute;top:calc(56 * var(--px));z-index:1;display:inline-flex;align-items:center;padding:calc(10 * var(--px)) calc(24 * var(--px));border-radius:999px;font-family:var(--font-body);font-weight:800;font-size:calc(30 * var(--px));line-height:1.1;letter-spacing:0.01em;white-space:nowrap;box-shadow:var(--shadow-sm, 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.25));}
.cf-bas__before .cf-bas__chip{left:calc(64 * var(--px));background:var(--card);color:var(--ink);}
.cf-bas__after .cf-bas__chip{right:calc(64 * var(--px));background:var(--accent-fill, var(--accent));color:var(--accent-fill-ink, var(--card));}
.cf-bas[data-format="story"] .cf-bas__before .cf-bas__chip{top:calc(var(--safe-top) + 32px);}
.cf-bas[data-format="landscape"] .cf-bas__chip{top:calc(44 * var(--px));font-size:calc(22 * var(--px));padding:calc(8 * var(--px)) calc(18 * var(--px));}
.cf-bas[data-format="landscape"] .cf-bas__before .cf-bas__chip{left:calc(44 * var(--px));}
.cf-bas[data-format="landscape"] .cf-bas__after .cf-bas__chip{right:calc(32 * var(--px));}
.cf-bas__band{position:relative;isolation:isolate;overflow:hidden;min-width:0;min-height:0;background:var(--band);}
.cf-bas__veil{position:absolute;inset:0;z-index:0;background:oklch(from var(--band) l c h / 0.8);pointer-events:none;}
.cf-bas__copy{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"head head" "support support" "cue logo";align-items:end;column-gap:calc(32 * var(--px));row-gap:0;padding:calc(52 * var(--px)) calc(64 * var(--px)) calc(64 * var(--px));}
.cf-bas .cf-bas__head{grid-area:head;margin:0;color:var(--band-ink);line-height:1.12;font-size:calc(82 * var(--px));}
.cf-bas .cf-bas__head .fd-ad-mark{padding:0;margin:0;background:none;border-radius:0;}
.cf-bas__support{grid-area:support;margin:calc(20 * var(--px)) 0 0;font-family:var(--font-body);font-weight:500;font-size:calc(32 * var(--px));line-height:1.3;color:color-mix(in oklch, var(--band-ink) 88%, var(--band));text-wrap:pretty;}
.cf-bas__cue{grid-area:cue;min-width:0;margin-top:calc(40 * var(--px));--cue-fs:calc(40 * var(--px));}
.cf-bas .cf-bas__logo{grid-area:logo;justify-self:end;--logo-h:calc(var(--ad-w) * 0.05);color:var(--band-ink);}
.cf-bas[data-format="portrait"] .cf-bas__copy{padding:calc(60 * var(--px)) calc(64 * var(--px)) calc(64 * var(--px));}
.cf-bas[data-format="portrait"] .cf-bas__head{font-size:calc(88 * var(--px));}
.cf-bas[data-format="portrait"] .cf-bas__cue{--cue-fs:calc(42 * var(--px));}
.cf-bas[data-format="story"] .cf-bas__band{display:flex;flex-direction:column;justify-content:flex-end;}
.cf-bas[data-format="story"] .cf-bas__copy{display:flow-root;padding:calc(44 * var(--px)) calc(64 * var(--px)) calc(var(--safe-bottom) + 8px);}
.cf-bas[data-format="story"] .cf-bas__logo{float:right;margin:calc(34 * var(--px)) 0 calc(12 * var(--px)) calc(32 * var(--px));}
.cf-bas[data-format="story"] .cf-bas__head{font-size:calc(108 * var(--px));}
.cf-bas[data-format="story"] .cf-bas__support{margin-top:calc(20 * var(--px));font-size:calc(34 * var(--px));}
.cf-bas[data-format="story"] .cf-bas__cue{display:flex;clear:both;margin-top:calc(36 * var(--px));--cue-fs:calc(44 * var(--px));}
.cf-bas[data-format="landscape"] .cf-bas__copy{height:100%;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto auto;grid-template-areas:"logo" "." "head" "support" "cue";align-items:start;padding:calc(44 * var(--px));}
.cf-bas[data-format="landscape"] .cf-bas__logo{justify-self:start;}
.cf-bas[data-format="landscape"] .cf-bas__head{font-size:calc(52 * var(--px));}
.cf-bas[data-format="landscape"] .cf-bas__support{margin-top:calc(14 * var(--px));font-size:calc(24 * var(--px));}
.cf-bas[data-format="landscape"] .cf-bas__cue{margin-top:calc(24 * var(--px));--cue-fs:calc(26 * var(--px));}
`;
pieces/ads/before-after-split/specimen.tsx 60 lines
import __studioImage2072199b from "../assets/aec5878c6bb6f7cf.webp";
import __studioImage415038d5 from "../assets/e479b49c9b36d80f.webp";
import * as React from "react";
import BeforeAfterSplit, { formats } from "../before-after-split";
import type { AdFormat } from "../../fx/ad-kit";
import { slot } from "../../slots";
// Sample brand (fictional): Calder Yard, a small landscaping crew. Both photos are generated illustrations of one
// yard from one camera position; only the state of the yard changes.
const calderLogo = "data:image/svg+xml," + encodeURIComponent(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 236 56"><path fill="currentColor" fill-rule="evenodd" d="M6 50C6 23 22 7 50 6c1 28-15 44-44 44zM12 45l29-29 2.5 2.5-29 29z"/><text x="62" y="39" fill="currentColor" font-family="Helvetica, Arial, sans-serif" font-size="30" font-weight="700" letter-spacing="-0.4">Calder Yard</text></svg>`,
);
export const states = ["square", "portrait", "story", "landscape"];
export const copy = {
platform: "meta",
primary_text:
"This yard took eleven days, first dig to last plant.\nCalder Yard walks your yard with you, sketches the plan on site and gives you one written price before anything is dug.\nNo surprise change orders once the crew arrives.\nBook your free 45-minute design visit. No obligation.",
headline: "Free on-site design visit",
description: "No obligation · 45 minutes",
cta: "Book Now",
};
// Sample brand (plum-night palette, invented): previews, the pack and the site show this ad in it by default.
export const sampleBrand = {
name: "Calder Yard",
theme: "light",
background: "#f4f8f5",
colors: ["#1f7a4d", "#d9822b"],
fonts: ["Lexend", "Public Sans"],
button: "pill-caps",
band: "#dcefe3",
}
export default function Demo({ state = "portrait" }: { state?: string }) {
return (
<BeforeAfterSplit
format={(formats.includes(state as AdFormat) ? state : "portrait") as AdFormat}
headline={"Same yard.\nEleven days apart."}
highlight="Eleven days apart."
cue="Get my free design visit"
cueNote="Free 45-minute visit, no obligation"
beforeImage={slot(
"item-1",
__studioImage2072199b
)}
afterImage={slot(
"item-2",
__studioImage415038d5
)}
beforeAlt="The backyard before: patchy lawn, cracked path and overgrown shrubs"
afterAlt="The same backyard after: new lawn, flagstone path and a planted border"
beforePosition="50% 58%"
afterPosition="50% 58%"
logo={slot("logo", calderLogo)}
brand="Calder Yard"
/>
);
}
| Name | Type | Details |
|---|---|---|
format OptionalBeforeAfterSplit |
AdFormat |
|
headline OptionalBeforeAfterSplit |
string |
|
highlight OptionalBeforeAfterSplit |
string |
|
support OptionalBeforeAfterSplit |
string |
|
cue OptionalBeforeAfterSplit |
string |
|
cueNote OptionalBeforeAfterSplit |
string |
|
note OptionalBeforeAfterSplit |
string |
|
beforeLabel OptionalBeforeAfterSplit |
string |
|
afterLabel OptionalBeforeAfterSplit |
string |
|
beforeImage OptionalBeforeAfterSplit |
string |
|
afterImage OptionalBeforeAfterSplit |
string |
|
beforeAlt OptionalBeforeAfterSplit |
string |
|
afterAlt OptionalBeforeAfterSplit |
string |
|
beforePosition OptionalBeforeAfterSplit |
string |
|
afterPosition OptionalBeforeAfterSplit |
string |
|
seam OptionalBeforeAfterSplit |
number |
|
logo OptionalBeforeAfterSplit |
string |
|
brand OptionalBeforeAfterSplit |
string |
|
logoAlt OptionalBeforeAfterSplit |
string |
|
backdrop OptionalBeforeAfterSplit |
string |
|
className OptionalBeforeAfterSplit |
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.
None listed in this pack.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
logo- The brand’s logo mark.
-
8276864f4b8e6ac1.webp
image/webp · 47 KB
-
aec5878c6bb6f7cf.webp
image/webp · 332 KB
-
e479b49c9b36d80f.webp
image/webp · 241 KB