Swatch Grid Tees 1
A warm, offer-led ecom fashion ad: the garment's real dye colours set as a swatch grid with one swatch swapped for the folded product photo, the bundle price and the cue beneath; it sends people who already know the brand to the product page to pick their colours.
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 178 characters
- Wearing the same grey tee again this week? Plainsong comes in nine colours, from Rust and Pine to Sky and Plum. Pick any three for $60. If a colour isn't you, exchanges are free.
- Headline 28 characters
- 3 tees for $60, nine colours
- Description 14 characters
- Free exchanges
- Button 8 characters
- Shop Now
What it is for
- Angle
- offer led
- Temperature
- warm
- Archetype
- swatch grid
- Sends people to
- product page
- Words on the image
- At most 28
Use it in a prompt
Make the ads/swatch-grid-tees 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/swatch-grid-tees.tsx. - Import it and pass your copy and images (Props tab):
import { SwatchGridTees } from "@/components/funneldna/ads/swatch-grid-tees"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/ads/swatch-grid-tees/component.tsx 185 lines
// archetype: swatch-grid
// When to use: A warm, offer-led ecom fashion ad: the garment's real dye colours set as a swatch grid with one swatch swapped for the folded product photo, the bundle price and the cue beneath; it sends people who already know the brand to the product page to pick their colours.
import * as React from "react"
import { AdFrame, AdHeadline, Cue, LogoMark, type AdFormat } from "../fx/ad-kit"
import { Texture } from "../fx/fx"
import weave from "../fx/textures/weave"
/**
* Swatch grid: the dye colours are the hero. Each swatch is a small colour chip (a woven-texture fill with its name in
* plain bold type beneath), and one chip carries the folded product photo in that colour, so the grid reads as fabric.
* The canvas is colour-blocked: a dark --band block holds the logo and headline, a strong diagonal edge runs behind the
* grid with an --accent-fill slab along it, and the --surface below carries the price, terms and cue.
* Square / portrait: headline above, 3x3 grid, price and cue in one row beneath (portrait gives the extra height to the
* grid). Story: 3x4 grid with the product photo spanning 2x2 as the hero, cue bottom edge at y 1560. Landscape: copy
* on the band at left, grid at right.
* Colour exception: swatch colours are product data (the garment's real dyes from the product page), so they are not
* theme tokens; callers pass each as a named variable with the dye's hex as its fallback (var(--swatch-rust, #9a4b2e)).
* Everything around them reads the theme. The defaults are token-derived hues.
* Landscape paints the band on the frame itself (the surface is the shaped layer), so the copy column's measured
* background is the band it visibly sits on.
* Truth: colours, price and terms come from the product page; no fade-proof, wash or durability claims.
*/
export type Swatch = {
name: string
/** Any CSS colour: the dye exactly as the product page shows it (hex). */
color: string
}
export type SwatchGridTeesProps = {
format?: AdFormat
/** 12 words or fewer. A "\n" forces a break. */
headline?: string
/** The phrase in `headline` set in the marker tint. */
highlight?: string
/** Up to nine colours, in grid order. */
swatches?: Swatch[]
/** Folded product photo (slot "product"); replaces the swatch at `productIndex`. Empty: every chip is a colour. */
product?: string
/** Which swatch the photo replaces (0-based). */
productIndex?: number
/** Alt text for the product photo. Empty: the swatch name. */
productAlt?: string
/** The bundle price as the product page says it ("3 for $60"). Empty: not shown. */
price?: string
/** One offer term from the page ("Free exchanges"). Empty: not shown. */
terms?: string
cue?: string
/** One short line under the cue. Empty: none. */
cueNote?: string
logo?: string
brand?: string
}
export const formats: AdFormat[] = ["square", "portrait", "story", "landscape"]
export const lead = "portrait" satisfies AdFormat
// Nine colour names sit on the image as product facts, so the cap is 28 instead of 20.
export const wordCap = 28
const DEFAULT_NAMES = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"]
const DEFAULT_L = [0.52, 0.64, 0.42, 0.72, 0.5, 0.6, 0.38, 0.68, 0.46]
/** Generic defaults: nine hues turned from the theme's action colour (no fixed colours in the piece). */
const DEFAULT_SWATCHES: Swatch[] = DEFAULT_NAMES.map((name, i) => ({
name,
color: `oklch(from var(--cta) ${DEFAULT_L[i]} max(c, 0.09) calc(h + ${i * 40}))`,
}))
export function SwatchGridTees({
format = "portrait",
headline = "The tee you live in, in every colour it comes in.",
highlight = "",
swatches = DEFAULT_SWATCHES,
product = "",
productIndex = 4,
productAlt = "",
price = "",
terms = "",
cue = "Pick my colours",
cueNote = "",
logo = "",
brand = "",
}: SwatchGridTeesProps) {
const list = swatches.slice(0, 9)
const photoAt = product && productIndex >= 0 && productIndex < list.length ? productIndex : -1
// Story: the photo spans 2x2, so nine colours fill a 3x4 grid.
const cells = list.length + (photoAt >= 0 && format === "story" ? 3 : 0)
const rows = Math.max(1, Math.ceil(cells / 3))
return (
<AdFrame format={format} className="fd-swatch">
<style href="fd-swatch" precedence="default">{CSS}</style>
<div className="fd-swatch__band" aria-hidden />
<div className="fd-swatch__stripe" aria-hidden />
<div className="fd-swatch__stage">
<LogoMark src={logo} brand={brand} className="fd-swatch__logo" />
<AdHeadline as="h1" text={headline} highlight={highlight} mark="ink" className="fd-swatch__h" />
<ul className="fd-swatch__grid" style={{ "--rows": rows } as React.CSSProperties}>
{list.map((s, i) => {
const isPhoto = i === photoAt
return (
<li
key={`${s.name}-${i}`}
className={`fd-swatch__tile${isPhoto ? " fd-swatch__tile--photo" : ""}`}
style={{ "--sw": s.color } as React.CSSProperties}
>
<span className="fd-swatch__swatch" aria-hidden={isPhoto ? undefined : true}>
{isPhoto ? (
<img src={product} alt={productAlt || s.name} decoding="async" />
) : (
<Texture src={weave} tone="ink" opacity={0.12} />
)}
</span>
<span className="fd-swatch__name">{s.name}</span>
</li>
)
})}
</ul>
<div className="fd-swatch__foot">
{price || terms ? (
<p className="fd-swatch__offer">
{price ? <b>{price}</b> : null}
{terms ? <span>{terms}</span> : null}
</p>
) : null}
<Cue note={cueNote} className="fd-swatch__cue">{cue}</Cue>
</div>
</div>
</AdFrame>
)
}
const CSS = `
.fd-swatch{--tile-r:calc(var(--card-radius,var(--radius,14px)) * 1.15);--tile-pad:10px;--tile-gap:8px;--grid-gap:14px;--name-fs:28px;--tile-shadow:0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.3),0 10px 18px -8px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.45);background:var(--surface);color:var(--ink)}
.fd-swatch__band,.fd-swatch__stripe{position:absolute;inset:0;z-index:0;pointer-events:none}
.fd-swatch__band{background:var(--band)}
.fd-swatch__stripe{background:var(--accent-fill,var(--accent))}
.fd-swatch__stage{position:absolute;z-index:1;display:flex;flex-direction:column;align-items:stretch}
.fd-swatch__logo{align-self:flex-start;justify-self:start;color:var(--band-ink)}
.fd-swatch__h{flex:none;color:var(--band-ink);line-height:1.12}
.fd-swatch__grid{list-style:none;margin:0;padding:0;flex:1 1 0;min-height:0;min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(var(--rows,3),minmax(0,1fr));grid-auto-flow:row dense;gap:var(--grid-gap)}
.fd-swatch__tile{position:relative;display:flex;flex-direction:column;gap:var(--tile-gap);min-width:0;min-height:0;padding:var(--tile-pad);background:var(--card);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--tile-r);box-shadow:var(--tile-shadow)}
.fd-swatch__tile--photo{border-color:color-mix(in oklch,var(--accent) 40%,var(--card));box-shadow:var(--shadow-lg,var(--tile-shadow))}
.fd-swatch__swatch{position:relative;isolation:isolate;display:block;flex:1 1 0;min-height:0;overflow:hidden;border-radius:max(0px,calc(var(--tile-r) - var(--tile-pad) * 0.6));background:linear-gradient(165deg,oklch(from var(--sw) calc(l + 0.035) c h),oklch(from var(--sw) calc(l - 0.045) c h));box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / 0.12),inset 0 0 0 2px oklch(from var(--sw) calc(l - 0.12) c h / 0.4),inset 0 1px 0 oklch(from var(--sw) calc(l + 0.1) c h / 0.5)}
.fd-swatch__swatch img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 34%}
.fd-swatch__name{display:block;flex:none;padding:0 4px 2px;font-family:var(--font-body);font-weight:800;font-size:var(--name-fs);line-height:1.15;letter-spacing:-0.005em;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fd-swatch__foot{display:flex;align-items:center;gap:32px;flex:none;min-width:0}
.fd-swatch__offer{margin:0;display:flex;flex-direction:column;gap:max(14px,calc(var(--price-fs,48px) * 0.32));min-width:0}
.fd-swatch__offer b{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-variant-numeric:tabular-nums;font-size:var(--price-fs,48px);line-height:1.05;color:var(--offer-ink,var(--ink));text-wrap:balance}
.fd-swatch__offer span{font-family:var(--font-body);font-weight:600;font-size:var(--terms-fs,28px);line-height:1.2;color:var(--offer-muted,var(--muted));text-wrap:pretty}
.fd-swatch__cue{margin-left:auto;flex:none}
.fd-swatch[data-format="square"] .fd-swatch__band{clip-path:polygon(0 0,100% 0,100% 47%,0 63%)}
.fd-swatch[data-format="square"] .fd-swatch__stripe{clip-path:polygon(0 63%,100% 47%,100% 55%,0 71%)}
.fd-swatch[data-format="square"] .fd-swatch__stage{inset:64px;gap:26px}
.fd-swatch[data-format="square"] .fd-swatch__h{font-size:72px}
.fd-swatch[data-format="square"] .fd-swatch__foot{--price-fs:48px;--terms-fs:28px}
.fd-swatch[data-format="square"] .fd-swatch__cue{--cue-fs:38px}
.fd-swatch[data-format="portrait"]{--tile-pad:12px;--grid-gap:16px;--name-fs:30px}
.fd-swatch[data-format="portrait"] .fd-swatch__band{clip-path:polygon(0 0,100% 0,100% 42%,0 58%)}
.fd-swatch[data-format="portrait"] .fd-swatch__stripe{clip-path:polygon(0 58%,100% 42%,100% 50%,0 66%)}
.fd-swatch[data-format="portrait"] .fd-swatch__stage{inset:64px;gap:30px}
.fd-swatch[data-format="portrait"] .fd-swatch__h{font-size:84px}
.fd-swatch[data-format="portrait"] .fd-swatch__foot{--price-fs:52px;--terms-fs:30px}
.fd-swatch[data-format="portrait"] .fd-swatch__cue{--cue-fs:42px}
.fd-swatch[data-format="story"]{--name-fs:30px}
.fd-swatch[data-format="story"] .fd-swatch__band{clip-path:polygon(0 0,100% 0,100% 40%,0 52%)}
.fd-swatch[data-format="story"] .fd-swatch__stripe{clip-path:polygon(0 52%,100% 40%,100% 46%,0 58%)}
.fd-swatch[data-format="story"] .fd-swatch__stage{top:258px;right:64px;bottom:360px;left:64px;gap:30px}
.fd-swatch[data-format="story"] .fd-swatch__h{font-size:88px}
.fd-swatch[data-format="story"] .fd-swatch__tile--photo{grid-column:span 2;grid-row:span 2}
.fd-swatch[data-format="story"] .fd-swatch__foot{--price-fs:56px;--terms-fs:32px}
.fd-swatch[data-format="story"] .fd-swatch__cue{--cue-fs:46px}
.fd-swatch[data-format="landscape"]{--tile-pad:7px;--tile-gap:5px;--grid-gap:12px;--name-fs:22px;background:var(--band);color:var(--band-ink)}
.fd-swatch[data-format="landscape"] .fd-swatch__band{background:var(--surface);clip-path:polygon(60% 0,100% 0,100% 100%,47% 100%)}
.fd-swatch[data-format="landscape"] .fd-swatch__stripe{clip-path:polygon(60% 0,67% 0,54% 100%,47% 100%)}
.fd-swatch[data-format="landscape"] .fd-swatch__stage{inset:48px;display:grid;grid-template-columns:504px 560px;grid-template-rows:auto minmax(0,1fr) auto;column-gap:40px;row-gap:20px}
.fd-swatch[data-format="landscape"] .fd-swatch__logo{grid-column:1;grid-row:1}
.fd-swatch[data-format="landscape"] .fd-swatch__h{grid-column:1;grid-row:2;align-self:center;font-size:56px}
.fd-swatch[data-format="landscape"] .fd-swatch__grid{grid-column:2;grid-row:1 / span 3}
.fd-swatch[data-format="landscape"] .fd-swatch__foot{grid-column:1;grid-row:3;gap:24px;--price-fs:34px;--terms-fs:22px;--offer-ink:var(--band-ink);--offer-muted:color-mix(in oklch,var(--band-ink) 86%,var(--band))}
.fd-swatch[data-format="landscape"] .fd-swatch__cue{--cue-fs:28px}
`
export default SwatchGridTees
pieces/ads/swatch-grid-tees/specimen.tsx 66 lines
import __studioImage28841858 from "../assets/1a9dcc34445550a6.webp";
import * as React from "react"
import { slot } from "../../slots"
import { SwatchGridTees, formats } from "../swatch-grid-tees"
import type { AdFormat } from "../../fx/ad-kit"
// Sample brand (fictional): Plainsong Tees, plain cotton tees in nine dye colours, 3 for $60 with free exchanges.
// The swatch colours are the sample product's dye colours (product data, not theme colours). Each is a named
// per-dye variable with the dye's hex as its fallback, so a brand host can supply its own dye values. The folded
// tee is a generated photo.
const plainsongLogo = "data:image/svg+xml," + encodeURIComponent(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 236 56"><rect x="4" y="9" width="40" height="10" rx="5" fill="currentColor"/><rect x="4" y="23" width="40" height="10" rx="5" fill="currentColor"/><rect x="4" y="37" width="40" height="10" rx="5" fill="currentColor"/><text x="56" y="40" font-family="Helvetica, Arial, sans-serif" font-size="32" font-weight="700" letter-spacing="-.6" fill="currentColor">plainsong</text></svg>`,
)
const SWATCHES = [
{ name: "Rust", color: "var(--swatch-rust, #9a4b2e)" },
{ name: "Pine", color: "var(--swatch-pine, #2e5544)" },
{ name: "Slate", color: "var(--swatch-slate, #5c6977)" },
{ name: "Ink", color: "var(--swatch-ink, #262b3d)" },
{ name: "Marigold", color: "var(--swatch-marigold, #dca12b)" },
{ name: "Clay", color: "var(--swatch-clay, #b9775c)" },
{ name: "Sky", color: "var(--swatch-sky, #8db3d1)" },
{ name: "Moss", color: "var(--swatch-moss, #6e7944)" },
{ name: "Plum", color: "var(--swatch-plum, #5a3450)" },
]
export const states = ["square", "portrait", "story", "landscape"]
export const copy = {
platform: "meta",
primary_text: "Wearing the same grey tee again this week? Plainsong comes in nine colours, from Rust and Pine to Sky and Plum. Pick any three for $60. If a colour isn't you, exchanges are free.",
headline: "3 tees for $60, nine colours",
description: "Free exchanges",
cta: "Shop Now",
}
// Sample brand (rose-ink palette, invented): previews, the pack and the site show this ad in it by default.
export const sampleBrand = {
name: "Plainsong Tees",
theme: "light",
background: "#fff6f7",
colors: ["#d6335f", "#3d3a8c"],
fonts: ["Montserrat", "Source Sans 3"],
button: "pill-bold",
band: "#ffdde4",
}
export default function SwatchGridTeesSpecimen({ state = "portrait" }: { state?: string }) {
return (
<SwatchGridTees
format={(formats.includes(state as AdFormat) ? state : "portrait") as AdFormat}
headline={"Wearing the same grey tee again this week?\nNine colours."}
highlight="Nine colours."
swatches={SWATCHES}
product={slot("product", __studioImage28841858)}
productIndex={4}
productAlt="Marigold tee, folded"
price="3 for $60"
terms="Free exchanges"
cue="Pick my three"
logo={slot("logo", plainsongLogo)}
brand="Plainsong Tees"
/>
)
}
| Name | Type | Details |
|---|---|---|
format OptionalSwatchGridTees |
AdFormat |
Default "portrait"
|
headline OptionalSwatchGridTees |
string |
Default "The tee you live in, in every colour it comes in."
|
highlight OptionalSwatchGridTees |
string |
Default ""
|
swatches OptionalSwatchGridTees |
Swatch[] |
Default DEFAULT_SWATCHES
|
product OptionalSwatchGridTees |
string |
Default ""
|
productIndex OptionalSwatchGridTees |
number |
Default 4
|
productAlt OptionalSwatchGridTees |
string |
Default ""
|
price OptionalSwatchGridTees |
string |
Default ""
|
terms OptionalSwatchGridTees |
string |
Default ""
|
cue OptionalSwatchGridTees |
string |
Default "Pick my colours"
|
cueNote OptionalSwatchGridTees |
string |
Default ""
|
logo OptionalSwatchGridTees |
string |
Default ""
|
brand OptionalSwatchGridTees |
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.
--card-border--card-radius- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
logo- The brand’s logo mark.
product- The main product shot or cover (ebook, kit, bottle).
-
1a9dcc34445550a6.webp
image/webp · 130 KB
-
4137412454b17370.webp
image/webp · 94.8 KB