Banner Equation Meals 1
A display banner set that turns a monthly gift into one plain equation in type (the gift = what it buys); a warm, offer-led nonprofit ad that sends past visitors to the monthly giving page.
The sample's post copy
Sample brand, fictional copy: the pattern to follow, written for the person's real offer.
- Platform 6 characters
- Primary text 87 characters
- Packing your kid's lunch tonight? $8 a month from you feeds 20 more children at school.
- Headline 30 characters
- $8 a month = 20 school lunches
- Description 55 characters
- Give monthly to Marlstone Meals Trust. Cancel any time.
- Button 10 characters
- Donate now
What it is for
- Angle
- offer led
- Temperature
- warm
- Archetype
- banner equation
- Sends people to
- monthly giving
- Words on the image
- At most 20
Use it in a prompt
Make the ads/banner-equation-meals ad from the FunnelDNA library in my brand, at every size (landscape, medium-rectangle, leaderboard, skyscraper, mobile-banner), 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/banner-equation-meals.tsx. - Import it and pass your copy and images (Props tab):
import { BannerEquationMeals } from "@/components/funneldna/ads/banner-equation-meals"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/ads/banner-equation-meals/component.tsx 183 lines
// archetype: banner-equation
// When to use: A display banner set that turns a monthly gift into one plain equation in type (the gift = what it buys); a warm, offer-led nonprofit ad that sends past visitors to the monthly giving page.
import * as React from "react"
import { AdFrame, AdHeadline, Cue, LogoMark, AD_FORMATS, type AdFormat } from "../fx/ad-kit"
import { Spot } from "../fx/fx"
/**
* Banner equation: the gift and what it buys set as one plain sum ("$8 a month = 20 school lunches"). The amount is in
* the action colour and nothing else competes with it: no icons, no arrows, no price burst. One clay lunch-tray Spot
* stands on a dark contact shadow beside the sum on 1200x628 and under it on 160x600. The small IAB sizes stay type-only.
* Size names and floors match ads/display-banner-set, so every banner set in the library uses the same keys and spec:
* landscape 1200x628: the hook and the sum across the left with the cue under them, the tray on the right;
* medium-rectangle 300x250: the sum stacked over three lines, the cue below;
* leaderboard 728x90: logo, sum and cue in one row;
* skyscraper 160x600: one part of the sum per row, the amount set large, then the tray and the cue;
* mobile-banner 320x50: the short sum and the cue. This size has no logo (`logo: 0`): logo, sum and cue cannot
* share its usable width at readable sizes.
* Re-composed per size, never scaled.
* Floors come from `sizes` (the media gate reads headlineMin and logo height per size): headlines 76 / 34 / 32 / 24
* (58px amount) / 17px against minimums of 56 / 20 / 30 / 20 / 17; logos 56 / 18 / 34 / 20px tall; nothing under 16px
* on the IAB sizes. Every box sits inside its frame, including the 320x50.
* The hook asks about the reader's moment and the cue answers it. The giving terms sit under the cue label as its note.
* Truth: `amount` and `gets` come from the charity's real cost per meal and are required props. The note is the real
* giving terms. The tray is a generated clay illustration, never a photo of a real school or child.
* Colour: the amount is the action colour mixed half-way toward --band-ink (color-mix in oklch with a neutral), so it
* moves light on dark bands and dark on light bands and holds 4.5:1 on both (66% left a mid clay at 4.0:1 on Warm coach).
*/
export type DisplayBannerFormat = "landscape" | "medium-rectangle" | "leaderboard" | "skyscraper" | "mobile-banner"
/** Legacy alias kept for existing callers. */
export type BannerFormat = DisplayBannerFormat
export type DisplayBannerSpec = {
width: number
height: number
label: string
/** Outer margin for text and marks. */
margin: number
/** Bands text stays out of (none on banners). */
safe: { top: number; bottom: number }
/** Smallest text allowed on this canvas. */
min: number
/** Smallest headline size on this canvas (px); the media gate reads it. */
headlineMin: number
/** Logo height (px); 0 means this size carries no logo. */
logo: number
}
const FLAT = { top: 0, bottom: 0 }
/** Every size this piece renders. 1200x628 is the kit's landscape, and the IAB sizes are defined here. */
export const sizes: Record<DisplayBannerFormat, DisplayBannerSpec> = {
landscape: { ...AD_FORMATS.landscape, headlineMin: 56, logo: 56 },
"medium-rectangle": { width: 300, height: 250, label: "Medium rectangle 300×250", margin: 16, safe: FLAT, min: 16, headlineMin: 20, logo: 18 },
leaderboard: { width: 728, height: 90, label: "Leaderboard 728×90", margin: 20, safe: FLAT, min: 16, headlineMin: 30, logo: 34 },
skyscraper: { width: 160, height: 600, label: "Wide skyscraper 160×600", margin: 10, safe: FLAT, min: 16, headlineMin: 20, logo: 20 },
"mobile-banner": { width: 320, height: 50, label: "Mobile banner 320×50", margin: 8, safe: FLAT, min: 16, headlineMin: 17, logo: 0 },
}
export type BannerEquationMealsProps = {
format?: DisplayBannerFormat
/** The gift, e.g. "$8". It is an offer fact, so it is required, and it is set in the action colour. */
amount: string
/** How often, e.g. "a month". Empty: a one-off gift. */
per?: string
/** What the gift buys, taken from the charity's real costs, e.g. "20 school lunches". Required. */
gets: string
/** A shorter `gets` for the 320x50 banner, e.g. "20 lunches". Empty: `gets`. */
getsShort?: string
/** One line naming the reader's moment, shown on 1200x628 and 160x600. Empty: none. */
hook?: string
cue?: string
/** The giving terms under the cue label, e.g. "Cancel any time". Empty: none. Not shown on 320x50. */
note?: string
/** Greyscale clay cut-out (a lunch tray) drawn through Spot and tinted by the theme. Empty: none. */
tray?: string
logo?: string
brand?: string
}
export const formats: DisplayBannerFormat[] = ["landscape", "medium-rectangle", "leaderboard", "skyscraper", "mobile-banner"]
export const lead = "landscape" satisfies AdFormat
export const wordCap = 20
/** The tray Spot appears only where the brief places it, at these sizes (px). */
const TRAY: Partial<Record<DisplayBannerFormat, number>> = { landscape: 320, skyscraper: 124 }
/** Sizes with room for the hook line. */
const HOOK: DisplayBannerFormat[] = ["landscape", "skyscraper"]
export function BannerEquationMeals({
format = "landscape",
amount,
per = "a month",
gets,
getsShort = "",
hook = "",
cue = "Give monthly",
note = "",
tray = "",
logo = "",
brand = "",
}: BannerEquationMealsProps) {
const f: DisplayBannerFormat = sizes[format] ? format : "landscape"
const s = sizes[f]
const vars = {
"--ad-w": `${s.width}px`, "--ad-h": `${s.height}px`, "--u": s.width / 1080, "--ad-m": `${s.margin}px`,
"--safe-top": `${s.safe.top}px`, "--safe-bottom": `${s.safe.bottom}px`, "--ad-min": `${s.min}px`,
"--logo-h": `${s.logo}px`,
} as React.CSSProperties
const traySize = tray ? TRAY[f] : undefined
const showLogo = s.logo > 0
const isMobile = f === "mobile-banner"
return (
<AdFrame format={f as AdFormat} className="fd-beq" style={vars}>
<style href="fd-beq" precedence="default">{CSS}</style>
<div className="fd-beq__grid" data-tray={traySize ? "" : undefined}>
{showLogo ? <LogoMark src={logo} brand={brand} className="fd-beq__logo" /> : null}
{hook && HOOK.includes(f) ? <p className="fd-beq__hook">{hook}</p> : null}
<AdHeadline as="h1" text={equation(f, amount, per, gets, getsShort)} highlight={amount} mark="ink" className="fd-beq__eq" />
{traySize ? (
<div className="fd-beq__tray" aria-hidden>
<div className="fd-beq__traybox">
<span className="fd-beq__floor" />
<Spot src={tray} size={traySize} />
</div>
</div>
) : null}
<Cue note={isMobile ? "" : note} className="fd-beq__cue">{cue}</Cue>
</div>
</AdFrame>
)
}
/** The sum, broken for each canvas. "\n" is an authored line break, and each line is still balanced. */
function equation(f: DisplayBannerFormat, amount: string, per: string, gets: string, short: string) {
const give = per ? `${amount} ${per}` : amount
if (f === "medium-rectangle") return `${give}\n= ${gets}`
if (f === "skyscraper") return per ? `${amount}\n${per}\n=\n${gets}` : `${amount}\n=\n${gets}`
if (f === "mobile-banner") return `${give} =\n${short || gets}`
return `${give} =\n${gets}`
}
const CSS = `
.fd-beq{--beq-amount:color-mix(in oklch,var(--cta) 50%,var(--band-ink));--beq-soft:color-mix(in oklch,var(--band-ink) 84%,var(--band))}
.fd-beq .fd-beq__grid{position:absolute;inset:var(--ad-m);display:grid;min-width:0;min-height:0}
.fd-beq .fd-beq__logo{grid-area:logo;justify-self:start;align-self:start;min-width:0;color:var(--band-ink)}
.fd-beq .fd-beq__logo>span{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.fd-beq .fd-beq__hook{grid-area:hook;margin:0;font-family:var(--font-body);font-weight:600;line-height:1.25;color:var(--beq-soft);text-wrap:pretty}
.fd-beq .fd-beq__eq{grid-area:eq;min-width:0;color:var(--band-ink);line-height:1.12}
.fd-beq .fd-beq__eq .fd-ad-mark{color:var(--beq-amount)}
.fd-beq .fd-beq__tray{grid-area:tray;display:grid;place-items:center;min-width:0;min-height:0}
.fd-beq .fd-beq__traybox{position:relative;isolation:isolate;display:grid;place-items:center}
.fd-beq .fd-beq__floor{position:absolute;z-index:-1;left:12%;right:12%;bottom:3%;height:11%;border-radius:50%;background:radial-gradient(closest-side,oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.34),oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0) 100%)}
.fd-beq .fd-beq__cue{grid-area:cue;justify-self:start;align-self:end;line-height:1.1;row-gap:.32em}
.fd-beq[data-format="landscape"] .fd-beq__grid{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1.2fr) auto auto auto minmax(0,1fr);grid-template-areas:"logo" "." "hook" "eq" "cue" "."}
.fd-beq[data-format="landscape"] .fd-beq__grid[data-tray]{grid-template-columns:minmax(0,1fr) 330px;grid-template-areas:"logo tray" ". tray" "hook tray" "eq tray" "cue tray" ". tray";column-gap:24px}
.fd-beq[data-format="landscape"] .fd-beq__hook{font-size:30px;margin-bottom:20px}
.fd-beq[data-format="landscape"] .fd-beq__eq{font-size:76px;line-height:1.04;margin-bottom:36px}
.fd-beq[data-format="landscape"] .fd-beq__cue{--cue-fs:30px;padding:.55em 1.1em;row-gap:12px}
.fd-beq[data-format="medium-rectangle"] .fd-beq__grid{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"logo" "eq" "cue";row-gap:10px}
.fd-beq[data-format="medium-rectangle"] .fd-beq__eq{font-size:34px;line-height:1.04;align-self:center}
.fd-beq[data-format="medium-rectangle"] .fd-beq__cue{--cue-fs:18px;padding:.5em 1em;row-gap:5px}
.fd-beq[data-format="leaderboard"] .fd-beq__grid{inset:10px var(--ad-m);grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr);grid-template-areas:"logo eq cue";column-gap:28px;align-items:center}
.fd-beq[data-format="leaderboard"] .fd-beq__logo{align-self:center}
.fd-beq[data-format="leaderboard"] .fd-beq__eq{font-size:32px;line-height:1.04}
.fd-beq[data-format="leaderboard"] .fd-beq__cue{--cue-fs:18px;padding:.45em 1em;row-gap:3px;align-self:center}
.fd-beq[data-format="skyscraper"] .fd-beq__grid{inset:14px 12px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto;grid-template-areas:"logo" "hook" "eq" "tray" "cue";row-gap:14px}
.fd-beq[data-format="skyscraper"] .fd-beq__logo{max-width:100%}
.fd-beq[data-format="skyscraper"] .fd-beq__hook{font-size:16px;margin-bottom:6px}
.fd-beq[data-format="skyscraper"] .fd-beq__eq{font-size:24px;line-height:1.08}
.fd-beq[data-format="skyscraper"] .fd-beq__eq .fd-ad-mark{display:inline-block;font-size:2.4em;line-height:.95;margin-bottom:.06em}
.fd-beq[data-format="skyscraper"] .fd-beq__cue{--cue-fs:16px;width:100%;justify-self:stretch;padding:.55em .4em;row-gap:4px}
.fd-beq[data-format="mobile-banner"] .fd-beq__grid{inset:var(--ad-m) 12px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr);grid-template-areas:"eq cue";column-gap:10px;align-items:center}
.fd-beq[data-format="mobile-banner"] .fd-beq__eq{font-size:17px;line-height:1;letter-spacing:-0.01em}
.fd-beq[data-format="mobile-banner"] .fd-beq__cue{--cue-fs:16px;padding:.42em .7em;align-self:center}
`
export default BannerEquationMeals
pieces/ads/banner-equation-meals/specimen.tsx 51 lines
import __studioImageff8e720d from "../assets/adb22b8ff2b1f750.webp";
import * as React from "react"
import { slot } from "../../slots"
import { BannerEquationMeals, formats, type DisplayBannerFormat } from "../banner-equation-meals"
// Sample brand (fictional): Marlstone Meals Trust, a school-lunch charity. The sum uses the trust's stated cost of
// 40c per lunch ($8 a month = 20 lunches). The tray is a generated clay illustration.
const marlstoneLogo = "data:image/svg+xml," + encodeURIComponent(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 232 60"><path d="M26 3c7 4 7 11 0 16c-7-5-7-12 0-16z" fill="currentColor"/><rect x="2" y="23" width="48" height="6" rx="3" fill="currentColor"/><path d="M6 32h40a20 20 0 0 1-40 0z" fill="currentColor"/><text x="62" y="42" font-family="Helvetica, Arial, sans-serif" font-size="31" font-weight="700" letter-spacing="-.5" fill="currentColor">marlstone</text></svg>`,
)
export const states = ["landscape", "medium-rectangle", "leaderboard", "skyscraper", "mobile-banner"]
export const copy = {
platform: "google",
primary_text: "Packing your kid's lunch tonight? $8 a month from you feeds 20 more children at school.",
headline: "$8 a month = 20 school lunches",
description: "Give monthly to Marlstone Meals Trust. Cancel any time.",
cta: "Donate now",
}
// Sample brand (tide-teal palette, epilogue fonts, square button; invented): previews, the pack and the site show this ad in it by default.
export const sampleBrand = {
name: "Marlstone Meals Trust",
theme: "light",
background: "#f1f8f8",
colors: ["#0e7c7b", "#f2a541"],
fonts: ["Epilogue", "Hanken Grotesk"],
band: "#d2eeee",
button: "square",
}
export default function BannerEquationMealsSpecimen({ state = "landscape" }: { state?: string }) {
const format = (formats.includes(state as DisplayBannerFormat) ? state : "landscape") as DisplayBannerFormat
return (
<BannerEquationMeals
format={format}
hook="Packing your kid's lunch tonight?"
amount="$8"
per="a month"
gets="20 school lunches"
getsShort="20 lunches"
cue="Give monthly"
note="Cancel any time"
tray={__studioImageff8e720d}
logo={slot("logo", marlstoneLogo)}
brand="Marlstone Meals Trust"
/>
)
}
| Name | Type | Details |
|---|---|---|
format OptionalBannerEquationMeals |
DisplayBannerFormat |
Default "landscape"
|
amount RequiredBannerEquationMeals |
string |
|
per OptionalBannerEquationMeals |
string |
Default "a month"
|
gets RequiredBannerEquationMeals |
string |
|
getsShort OptionalBannerEquationMeals |
string |
Default ""
|
hook OptionalBannerEquationMeals |
string |
Default ""
|
cue OptionalBannerEquationMeals |
string |
Default "Give monthly"
|
note OptionalBannerEquationMeals |
string |
Default ""
|
tray OptionalBannerEquationMeals |
string |
Default ""
|
logo OptionalBannerEquationMeals |
string |
Default ""
|
brand OptionalBannerEquationMeals |
string |
Default ""
|
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.
logo- The brand’s logo mark.
-
adb22b8ff2b1f750.webp
image/webp · 51.6 KB