Days Left Rail Clay 1
A retargeting deadline ad for people who looked at a course and stalled. It lays out the last seven real days before enrolment closes, with past days muted and the closing day filled, and drives the enrolment page.
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 169 characters
- You had a look at the spring wheel course. Enrolment closes this Sunday, 14 March. Eight Thursday evenings at the wheel for $320. Save your place before the list closes.
- Headline 31 characters
- Spring wheel course: 8 evenings
- Description 23 characters
- Enrolment closes Sunday
- Button 7 characters
- Sign Up
What it is for
- Angle
- deadline
- Temperature
- retargeting
- Archetype
- days left rail
- Sends people to
- enrolment page
- Words on the image
- At most 36
Use it in a prompt
Make the ads/days-left-rail-clay 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/days-left-rail-clay.tsx. - Import it and pass your copy and images (Props tab):
import { DaysLeftRailClay } from "@/components/funneldna/ads/days-left-rail-clay"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/ads/days-left-rail-clay/component.tsx 222 lines
// archetype: days-left-rail
// When to use: A retargeting deadline ad for people who looked at a course and stalled. It lays out the last seven real days before enrolment closes, with past days muted and the closing day filled, and drives the enrolment page.
import * as React from "react"
import { AdFrame, AdHeadline, Cue, LogoMark, type AdFormat } from "../fx/ad-kit"
import { Texture } from "../fx/fx"
import concrete from "../fx/textures/concrete"
/**
* Days left, from a real date. The band is cut on a strong diagonal over the page surface, with an accent-fill sliver
* along the cut and a faint stoneware texture (fx concrete, toned from --band-ink) clipped to the band so it reads as
* a clay studio, not a flat box. The headline sits in the band. A rail of seven day tiles sits on
* the surface and ends on the real closing day, which is filled in the accent with "Closes" above it. Days before
* `today` sit in a quiet grey well.
* Square and landscape keep one row. Portrait sets the rail larger in two rows, with the closing day spanning two
* columns. Story runs the rail down the right side (y 420-1420) with the closing day largest.
* Truth: `deadline` is the real enrolment close and `today` is supplied when the ad is served. If either is missing
* or invalid, or the close has passed, no rail and no urgency label renders and `openHeadline` replaces `headline`.
* This is a still: no ticking digits, seconds or flip-clock shapes.
*/
export type DaysLeftRailClayProps = {
format?: AdFormat
/** The real enrolment close as an ISO date (YYYY-MM-DD). A full ISO timestamp is read by its date part. */
deadline: string
/** The serving date as an ISO date, supplied when the ad is rendered. Never hard-code it. */
today: string
/** Headline shown with the rail, 12 words or fewer. Authored line breaks are honoured. */
headline?: string
/** The phrase in `headline` that gets the marker tint. */
highlight?: string
/** Headline shown when there is no valid deadline. It carries no urgency. */
openHeadline?: string
/** The course terms on one line (sessions, price). Empty: none. */
terms?: string
cue?: string
/** One short line under the cue. Empty: none. */
cueNote?: string
/** Seven weekday initials, Sunday first. */
weekdayInitials?: string[]
/** Seven weekday names, Sunday first. Used on the closing tile in portrait and story. */
weekdayNames?: string[]
closesLabel?: string
/** Label used when the close is today. */
closesTodayLabel?: string
todayLabel?: string
logo?: string
brand?: string
className?: string
}
export const formats: AdFormat[] = ["square", "portrait", "story", "landscape"]
export const lead = "portrait" satisfies AdFormat
/** Raised from 20 because the brief requires the rail's seven weekday initials and seven dates. They are figures, not copy. */
export const wordCap = 36
const DAY = 86400000
const INITIALS = ["S", "M", "T", "W", "T", "F", "S"]
const NAMES = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
type DayState = "past" | "today" | "open" | "close"
type RailDay = { key: number; initial: string; name: string; date: number; state: DayState; label: string }
type RailLabels = { closes: string; closesToday: string; today: string }
export function DaysLeftRailClay({
format = "portrait",
deadline,
today,
headline = "Still thinking about the course? Enrolment closes soon.",
highlight = "",
openHeadline = "Still thinking about the course? Places are open.",
terms = "",
cue = "Save my place",
cueNote = "",
weekdayInitials = INITIALS,
weekdayNames = NAMES,
closesLabel = "Closes",
closesTodayLabel = "Closes today",
todayLabel = "Today",
logo = "",
brand = "",
className = "",
}: DaysLeftRailClayProps) {
const days = buildRail(deadline, today, weekdayInitials, weekdayNames, {
closes: closesLabel,
closesToday: closesTodayLabel,
today: todayLabel,
})
const named = format === "portrait" || format === "story"
return (
<AdFrame format={format} className={`fd-dlr ${className}`.trim()}>
<style href="fd-dlr" precedence="default">{CSS}</style>
<div className="fd-dlr__sliver" aria-hidden />
<div className="fd-dlr__band" aria-hidden>
<Texture src={concrete} tone="band-ink" opacity={0.09} />
</div>
<LogoMark src={logo} brand={brand} className="fd-dlr__logo" />
<AdHeadline
as="h1"
text={days ? headline : openHeadline}
highlight={days ? highlight : ""}
mark="ink"
className="fd-dlr__head"
/>
{days ? (
<ol className="fd-dlr__rail">
{days.map((d) => (
<li key={d.key} className="fd-dlr__cell" data-state={d.state}>
<span className="fd-dlr__label" aria-hidden={d.label ? undefined : true}>{d.label}</span>
<span className="fd-dlr__tile">
<span className="fd-dlr__wd">{named && d.state === "close" ? d.name : d.initial}</span>
<span className="fd-dlr__num">{d.date}</span>
</span>
</li>
))}
</ol>
) : null}
<div className="fd-dlr__foot">
{terms ? <p className="fd-dlr__terms">{terms}</p> : null}
<Cue note={cueNote} className="fd-dlr__cue">{cue}</Cue>
</div>
</AdFrame>
)
}
/** Reads the date part of an ISO string as a UTC day number. Returns null when the value is missing or not a real date. */
function dayNumber(iso: string | undefined): number | null {
if (!iso) return null
const parts = iso.trim().slice(0, 10).split("-")
if (parts.length !== 3 || parts[0].length !== 4 || parts[1].length !== 2 || parts[2].length !== 2) return null
const [y, m, d] = parts.map(Number)
if (!Number.isInteger(y) || !Number.isInteger(m) || !Number.isInteger(d)) return null
const t = Date.UTC(y, m - 1, d)
const check = new Date(t)
if (check.getUTCFullYear() !== y || check.getUTCMonth() !== m - 1 || check.getUTCDate() !== d) return null
return Math.round(t / DAY)
}
/** The seven days ending on the close. Returns null (no rail, no urgency) when either date is unusable or the close has passed. */
function buildRail(
deadline: string | undefined,
today: string | undefined,
initials: string[],
names: string[],
labels: RailLabels,
): RailDay[] | null {
const end = dayNumber(deadline)
const now = dayNumber(today)
if (end === null || now === null || now > end) return null
return Array.from({ length: 7 }, (_, i) => {
const n = end - 6 + i
const at = new Date(n * DAY)
const wd = at.getUTCDay()
const state: DayState = n === end ? "close" : n < now ? "past" : n === now ? "today" : "open"
const label = state === "close" ? (n === now ? labels.closesToday : labels.closes) : state === "today" ? labels.today : ""
return { key: n, initial: initials[wd] ?? "", name: names[wd] ?? "", date: at.getUTCDate(), state, label }
})
}
const CSS = `
.fd-dlr{background:var(--surface);color:var(--ink)}
.fd-dlr__band,.fd-dlr__sliver{position:absolute;inset:0;pointer-events:none}
.fd-dlr__sliver{background:var(--accent-fill,var(--accent));clip-path:polygon(0 0,100% 0,100% calc(var(--cut-r) + var(--sliver)),0 calc(var(--cut-l) + var(--sliver)))}
.fd-dlr__band{background:var(--band);clip-path:polygon(0 0,100% 0,100% var(--cut-r),0 var(--cut-l))}
.fd-dlr__logo{position:absolute;z-index:2;top:var(--ad-m);right:var(--ad-m);color:var(--band-ink)}
.fd-dlr__head{position:absolute;z-index:1;left:var(--ad-m);color:var(--band-ink);line-height:1.12;overflow-wrap:break-word}
.fd-dlr__rail{position:absolute;z-index:1;left:var(--ad-m);right:var(--ad-m);margin:0;padding:0;list-style:none;display:grid}
.fd-dlr__cell{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0}
.fd-dlr__label{display:flex;align-items:flex-end;justify-content:center;flex:none;height:var(--lab-h);padding-bottom:var(--lab-gap);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:var(--lab-fs);line-height:1;letter-spacing:-0.01em;white-space:nowrap;color:var(--ink)}
.fd-dlr__cell[data-state="today"] .fd-dlr__label{color:var(--accent)}
.fd-dlr__cell[data-state="close"] .fd-dlr__label{justify-content:flex-end}
.fd-dlr__tile{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:max(12px,calc(var(--num-fs) * 0.16));background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.25))}
.fd-dlr__wd{font-family:var(--font-body);font-weight:700;font-size:var(--wd-fs);line-height:1;white-space:nowrap;color:var(--muted)}
.fd-dlr__num{display:block;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:var(--num-fs);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums}
.fd-dlr__wd{display:block}
.fd-dlr__cell[data-state="past"] .fd-dlr__tile{background:color-mix(in oklch,var(--ink) 4%,var(--surface));color:color-mix(in oklch,var(--ink) 64%,var(--surface));border-color:oklch(from var(--ink) l c h / 0.1);box-shadow:none}
.fd-dlr__cell[data-state="past"] .fd-dlr__wd{color:inherit}
.fd-dlr__cell[data-state="today"] .fd-dlr__tile{border:3px solid var(--accent)}
.fd-dlr__cell[data-state="close"] .fd-dlr__tile{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));border-color:transparent;box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.3),0 6px 14px -4px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.35))}
.fd-dlr__cell[data-state="close"] .fd-dlr__wd{color:inherit;font-weight:800}
.fd-dlr__foot{position:absolute;z-index:1;left:var(--ad-m);right:var(--ad-m);bottom:var(--ad-m);display:flex;align-items:center;gap:32px}
.fd-dlr__terms{margin:0;flex:1 1 auto;min-width:0;font-family:var(--font-body);font-weight:700;line-height:1.25;color:var(--ink);font-variant-numeric:tabular-nums;text-wrap:pretty}
.fd-dlr__cue{flex:none;margin-left:auto;padding-inline:.9em}
.fd-dlr[data-format="square"]{--cut-l:600px;--cut-r:520px;--sliver:22px;--lab-h:44px;--lab-gap:10px;--lab-fs:28px;--wd-fs:30px;--num-fs:60px}
.fd-dlr[data-format="square"] .fd-dlr__head{top:150px;right:var(--ad-m);font-size:76px}
.fd-dlr[data-format="square"] .fd-dlr__rail{top:660px;height:184px;grid-template-columns:repeat(7,minmax(0,1fr));column-gap:14px}
.fd-dlr[data-format="square"] .fd-dlr__terms{font-size:32px}
.fd-dlr[data-format="square"] .fd-dlr__cue{--cue-fs:40px}
.fd-dlr[data-format="portrait"]{--cut-l:640px;--cut-r:560px;--sliver:24px;--lab-h:48px;--lab-gap:12px;--lab-fs:30px;--wd-fs:36px;--num-fs:88px}
.fd-dlr[data-format="portrait"] .fd-dlr__head{top:150px;right:var(--ad-m);font-size:84px}
.fd-dlr[data-format="portrait"] .fd-dlr__rail{top:690px;height:452px;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:16px}
.fd-dlr[data-format="portrait"] .fd-dlr__cell[data-state="close"]{grid-column:span 2}
.fd-dlr[data-format="portrait"] .fd-dlr__cell[data-state="close"] .fd-dlr__wd{font-size:40px}
.fd-dlr[data-format="portrait"] .fd-dlr__cell[data-state="close"] .fd-dlr__tile{gap:14px}
.fd-dlr[data-format="portrait"] .fd-dlr__cell[data-state="close"] .fd-dlr__num{font-size:100px}
.fd-dlr[data-format="portrait"] .fd-dlr__terms{font-size:34px}
.fd-dlr[data-format="portrait"] .fd-dlr__cue{--cue-fs:42px}
.fd-dlr[data-format="story"]{--lab-h:60px;--lab-gap:12px;--lab-fs:34px;--wd-fs:30px;--num-fs:60px}
.fd-dlr[data-format="story"] .fd-dlr__band{clip-path:polygon(0 0,62% 0,58% 100%,0 100%)}
.fd-dlr[data-format="story"] .fd-dlr__sliver{clip-path:polygon(0 0,calc(62% + 26px) 0,calc(58% + 26px) 100%,0 100%)}
.fd-dlr[data-format="story"] .fd-dlr__logo{top:calc(var(--safe-top) + 22px);color:var(--ink)}
.fd-dlr[data-format="story"] .fd-dlr__head{top:290px;width:548px;font-size:92px}
.fd-dlr[data-format="story"] .fd-dlr__rail{left:716px;top:420px;height:1000px;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(6,96px) minmax(0,1fr);row-gap:12px}
.fd-dlr[data-format="story"] .fd-dlr__cell:not([data-state="close"]) .fd-dlr__label{position:absolute;z-index:1;top:0;bottom:0;right:24px;height:auto;padding:0;align-items:center;font-size:30px}
.fd-dlr[data-format="story"] .fd-dlr__cell:not([data-state="close"]) .fd-dlr__tile{flex-direction:row;justify-content:flex-start;gap:20px;padding-inline:24px}
.fd-dlr[data-format="story"] .fd-dlr__cell:not([data-state="close"]) .fd-dlr__wd{min-width:1.1em}
.fd-dlr[data-format="story"] .fd-dlr__cell[data-state="close"] .fd-dlr__tile{align-items:flex-start;justify-content:space-between;gap:24px;padding:28px 28px 24px}
.fd-dlr[data-format="story"] .fd-dlr__cell[data-state="close"] .fd-dlr__wd{font-size:44px}
.fd-dlr[data-format="story"] .fd-dlr__cell[data-state="close"] .fd-dlr__num{font-size:168px}
.fd-dlr[data-format="story"] .fd-dlr__foot{right:auto;width:548px;bottom:calc(var(--ad-h) - 1560px);flex-direction:column;align-items:flex-start;gap:28px}
.fd-dlr[data-format="story"] .fd-dlr__terms{flex:none;font-size:40px;color:var(--band-ink);text-wrap:balance}
.fd-dlr[data-format="story"] .fd-dlr__cue{--cue-fs:46px;margin-left:0}
.fd-dlr[data-format="landscape"]{--cut-l:332px;--cut-r:304px;--sliver:14px;--lab-h:30px;--lab-gap:6px;--lab-fs:22px;--wd-fs:22px;--num-fs:42px}
.fd-dlr[data-format="landscape"] .fd-dlr__head{top:48px;width:740px;font-size:56px}
.fd-dlr[data-format="landscape"] .fd-dlr__rail{top:356px;height:132px;grid-template-columns:repeat(7,minmax(0,1fr));column-gap:12px}
.fd-dlr[data-format="landscape"] .fd-dlr__terms{font-size:26px}
.fd-dlr[data-format="landscape"] .fd-dlr__cue{--cue-fs:30px}
`
export default DaysLeftRailClay
pieces/ads/days-left-rail-clay/specimen.tsx 48 lines
import * as React from "react"
import { slot } from "../../slots"
import { DaysLeftRailClay, formats } from "../days-left-rail-clay"
import type { AdFormat } from "../../fx/ad-kit"
// Sample brand (fictional): Wickenden Clay School, an evening pottery studio. Enrolment for its spring wheel course
// closes on Sunday 14 March 2027. The sample serves the ad on Thursday 11 March, so three days are past and three remain.
const wickendenLogo = "data:image/svg+xml," + encodeURIComponent(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 292 56"><path d="M16 7h18v5c0 3 10 7 10 20 0 11-8 20-19 20S6 43 6 32c0-13 10-17 10-20z" fill="currentColor"/><text x="54" y="38" font-family="Helvetica, Arial, sans-serif" font-size="29" font-weight="700" letter-spacing="-.4">wickenden clay</text></svg>`,
)
export const states = ["square", "portrait", "story", "landscape"]
export const copy = {
platform: "meta",
primary_text: "You had a look at the spring wheel course. Enrolment closes this Sunday, 14 March. Eight Thursday evenings at the wheel for $320. Save your place before the list closes.",
headline: "Spring wheel course: 8 evenings",
description: "Enrolment closes Sunday",
cta: "Sign Up",
}
// Sample brand (olive-ochre palette, friendly fonts, invented): previews, the pack and the site show this ad in it by default.
export const sampleBrand = {
name: "Wickenden Clay School",
theme: "light",
background: "#f7f8f2",
colors: ["#556b1f", "#c7922c"],
fonts: ["Lexend", "Public Sans"],
button: "square",
}
export default function DaysLeftRailClaySpecimen({ state = "portrait" }: { state?: string }) {
return (
<DaysLeftRailClay
format={(formats.includes(state as AdFormat) ? state : "portrait") as AdFormat}
deadline="2027-03-14"
today="2027-03-11"
headline="Wanted to try the wheel this spring? Enrolment closes Sunday."
highlight="closes Sunday."
openHeadline="Wanted to try the wheel this spring? Book your evenings."
terms="8 Thursday evenings · $320"
cue="Save my place"
logo={slot("logo", wickendenLogo)}
brand="Wickenden Clay School"
/>
)
}
| Name | Type | Details |
|---|---|---|
format OptionalDaysLeftRailClay |
AdFormat |
Default "portrait"
|
deadline RequiredDaysLeftRailClay |
string |
|
today RequiredDaysLeftRailClay |
string |
|
headline OptionalDaysLeftRailClay |
string |
Default "Still thinking about the course? Enrolment closes soon."
|
highlight OptionalDaysLeftRailClay |
string |
Default ""
|
openHeadline OptionalDaysLeftRailClay |
string |
Default "Still thinking about the course? Places are open."
|
terms OptionalDaysLeftRailClay |
string |
Default ""
|
cue OptionalDaysLeftRailClay |
string |
Default "Save my place"
|
cueNote OptionalDaysLeftRailClay |
string |
Default ""
|
weekdayInitials OptionalDaysLeftRailClay |
string[] |
Default INITIALS
|
weekdayNames OptionalDaysLeftRailClay |
string[] |
Default NAMES
|
closesLabel OptionalDaysLeftRailClay |
string |
Default "Closes"
|
closesTodayLabel OptionalDaysLeftRailClay |
string |
Default "Closes today"
|
todayLabel OptionalDaysLeftRailClay |
string |
Default "Today"
|
logo OptionalDaysLeftRailClay |
string |
Default ""
|
brand OptionalDaysLeftRailClay |
string |
Default ""
|
className OptionalDaysLeftRailClay |
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-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.
-
f211b3080387e46d.webp
image/webp · 105 KB