Sunrise Day Track 1
Sunrise day track: the schedule drawn as a sun coming up over the days, so the visitor feels the momentum toward day one and joins.
Use it in a prompt
Use content/sunrise-day-track from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details 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/content/sunrise-day-track.tsx. - Import it and pass your copy and images (Props tab):
import { SunriseDayTrack } from "@/components/funneldna/content/sunrise-day-track"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/sunrise-day-track/component.tsx 366 lines
// layout: advertorial-front
// Sunrise day track: the schedule drawn as a sun coming up over the days, so the visitor feels the momentum toward day one and joins.
import React, { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
import { CalendarDays, Clock, MapPin, Users, Video } from "lucide-react";
import type { LucideIcon } from "lucide-react";
import { Divider, FX_HOST, Texture } from "../fx/fx";
import leak from "../fx/textures/leak";
type DividerTone = React.ComponentProps<typeof Divider> extends { tone?: infer T } ? T : string;
export type SunriseDay = {
/** Overrides the generated "Day {n}" label. */
label?: string;
/** Weekday and date line, e.g. "Mon · Jan 4". */
date: string;
/** One line on what this day delivers. */
promise: string;
};
export type SunriseFact = {
icon?: "clock" | "video" | "calendar" | "place" | "people";
text: string;
};
export type SunriseDayTrackProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
/** Short paragraphs, each opening with a bold lead-in. */
points?: { leadIn: string; text: string }[];
/** Small line above the kick-off date in the dark card. */
kickoffLabel?: string;
kickoffDate?: string;
kickoffTime?: string;
/** Inline-icon facts in the kick-off card (session length, where it happens). */
facts?: SunriseFact[];
/** Template for each day's label; {n} is the day number. */
dayLabel?: string;
days?: SunriseDay[];
/** Accessible name for the day list. */
daysLabel?: string;
actionLabel?: string;
href?: string;
onAction?: () => void;
disabled?: boolean;
/** Optional promo code shown beside the button. */
promoCode?: string;
/** Promo line template; {code} is replaced by the code chip. */
promoText?: string;
/** One quiet line under the button. */
note?: string;
noteHref?: string;
/** Tone of the angled bottom edge (the next section's token); null for a straight edge. */
edgeTone?: DividerTone | null;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_POINTS = [
{ leadIn: "Live every day.", text: "Show up, do the work alongside everyone else, then get on with your day." },
{ leadIn: "One step at a time.", text: "Each day builds on the last, so the final day feels easy." },
];
const DEFAULT_FACTS: SunriseFact[] = [
{ icon: "clock", text: "Short live session each day" },
{ icon: "video", text: "Online, join from anywhere" },
];
const DEFAULT_DAYS: SunriseDay[] = [
{ date: "Monday", promise: "See exactly where you are starting from." },
{ date: "Tuesday", promise: "Fix the one thing holding you back." },
{ date: "Wednesday", promise: "Build the piece that does the heavy lifting." },
{ date: "Thursday", promise: "Put it to work and test it." },
{ date: "Friday", promise: "Leave with your plan for what comes next." },
];
const ICONS: Record<NonNullable<SunriseFact["icon"]>, LucideIcon> = {
clock: Clock,
video: Video,
calendar: CalendarDays,
place: MapPin,
people: Users,
};
const useIsoLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
export function SunriseDayTrack(props: SunriseDayTrackProps) {
const {
headline = "Five days to your strongest start yet",
highlight = "strongest start",
points = DEFAULT_POINTS,
kickoffLabel = "Kicks off",
kickoffDate = "Monday",
kickoffTime = "Same time every day",
facts = DEFAULT_FACTS,
dayLabel = "Day {n}",
days = DEFAULT_DAYS,
daysLabel = "Day-by-day plan",
actionLabel = "Save My Spot",
href,
onAction,
disabled = false,
promoCode = "",
promoText = "Use code {code} for free access",
note = "or keep scrolling to see the full plan",
noteHref,
edgeTone = "band" as DividerTone,
state = "default",
className,
} = props;
const uid = useId().replace(/[^a-zA-Z0-9]/g, "");
const rootRef = useRef<HTMLElement>(null);
const [motion, setMotion] = useState<"idle" | "armed" | "risen">("idle");
useIsoLayoutEffect(() => {
const el = rootRef.current;
if (!el || typeof IntersectionObserver === "undefined") return;
if (window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
setMotion("armed");
const io = new IntersectionObserver(
(entries) => {
if (entries.some((e) => e.isIntersecting)) {
setMotion("risen");
io.disconnect();
}
},
{ threshold: 0.25 },
);
io.observe(el.querySelector(".cf-sdt__days") ?? el);
return () => io.disconnect();
}, []);
const n = days.length;
const isDisabled = disabled || state === "disabled";
const btnClass = `cf-sdt__btn${state === "hover" ? " is-hover" : ""}${state === "active" ? " is-active" : ""}`;
const promoParts = promoText.split("{code}");
const action =
href && !isDisabled ? (
<a className={btnClass} href={href} onClick={onAction ? () => onAction() : undefined}>
{actionLabel}
</a>
) : (
<button type="button" className={btnClass} disabled={isDisabled} onClick={() => onAction?.()}>
{actionLabel}
</button>
);
return (
<section
ref={rootRef}
className={`cf-sdt${edgeTone ? " cf-sdt--edge" : ""}${className ? ` ${className}` : ""}`}
style={FX_HOST}
data-motion={motion}
>
<style>{CSS}</style>
<Texture src={leak} tone="accent-fill" position="top right" />
<div className="cf-sdt__wrap">
<div className="cf-sdt__head">
<div className="cf-sdt__intro">
<h2 className="cf-sdt__headline">{marked(headline, highlight)}</h2>
{points.length > 0 ? (
<div className="cf-sdt__points">
{points.map((p, i) => (
<p key={i} className="cf-sdt__point">
<strong>{p.leadIn}</strong> {p.text}
</p>
))}
</div>
) : null}
</div>
<div className="cf-sdt__kick">
{kickoffLabel ? <p className="cf-sdt__kick-label">{kickoffLabel}</p> : null}
<p className="cf-sdt__kick-date">{kickoffDate}</p>
{kickoffTime ? <p className="cf-sdt__kick-time">{kickoffTime}</p> : null}
{facts.length > 0 ? (
<ul className="cf-sdt__facts">
{facts.map((f, i) => {
const Icon = ICONS[f.icon ?? "clock"];
return (
<li key={i}>
<Icon className="cf-sdt__fact-icon" size={18} strokeWidth={2.5} aria-hidden="true" />
{f.text}
</li>
);
})}
</ul>
) : null}
</div>
</div>
<ol className="cf-sdt__days" aria-label={daysLabel} style={{ ["--n" as string]: n } as React.CSSProperties}>
{days.map((d, i) => {
const g = sunGeometry(i, n);
const label = d.label ?? dayLabel.replace("{n}", String(i + 1));
return (
<li
key={i}
className="cf-sdt__day"
style={
{
["--sun" as string]: `color-mix(in oklab, var(--accent-fill, var(--accent)) ${g.tone}%, var(--ink))`,
["--i" as string]: i,
} as React.CSSProperties
}
>
<Sun g={g} clipId={`${uid}s${i}`} />
<div className="cf-sdt__copy">
<h3 className="cf-sdt__daynum">{label}</h3>
<p className="cf-sdt__date">{d.date}</p>
<p className="cf-sdt__promise">{d.promise}</p>
</div>
</li>
);
})}
</ol>
<div className="cf-sdt__close">
<div className="cf-sdt__cta-row">
{action}
{promoCode ? (
<p className="cf-sdt__promo">
{promoParts[0]}
<span className="cf-sdt__code">{promoCode}</span>
{promoParts.slice(1).join("")}
</p>
) : null}
</div>
{note ? (
noteHref ? (
<a className="cf-sdt__note cf-sdt__note--link" href={noteHref}>
{note}
</a>
) : (
<p className="cf-sdt__note">{note}</p>
)
) : null}
</div>
</div>
{edgeTone ? (
<div className="cf-sdt__edge" aria-hidden="true">
<Divider shape="angle" tone={edgeTone} height={56} />
</div>
) : null}
</section>
);
}
export default SunriseDayTrack;
// Sun geometry: every day is the same solid sun, clipped at the horizon (y = HY) and climbing a little higher each
// day, from a clear cap on day one to fully clear of the horizon on the last day.
const R = 28;
const HY = 70;
const SW = 64;
const SH = 74;
type SunGeom = { rise: number; tone: number };
function sunGeometry(i: number, n: number): SunGeom {
const p = n > 1 ? i / (n - 1) : 1;
return {
rise: 22 + p * (2 * R + 8 - 22),
tone: Math.round(28 + 72 * p),
};
}
function Sun({ g, clipId }: { g: SunGeom; clipId: string }) {
const cx = SW / 2;
const cy = HY + R - g.rise;
return (
<svg className="cf-sdt__sun" width={SW} height={SH} viewBox={`0 0 ${SW} ${SH}`} aria-hidden="true" focusable="false">
<defs>
<clipPath id={clipId}>
<rect x="0" y="0" width={SW} height={HY} />
</clipPath>
</defs>
<g clipPath={`url(#${clipId})`}>
<g className="cf-sdt__rise">
<circle cx={cx} cy={cy} r={R} fill="currentColor" />
<circle className="cf-sdt__core" cx={cx} cy={cy} r={R * 0.62} />
</g>
</g>
<rect className="cf-sdt__horizon" x="0" y={HY} width={SW} height="3" rx="1.5" />
</svg>
);
}
function marked(text: string, phrase: string) {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="cf-sdt__mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
const CSS = `
.cf-sdt{position:relative;overflow:hidden;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-sdt--edge{padding-bottom:calc(clamp(64px,8.5vw,120px) + 56px)}
.cf-sdt__wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-sdt__head{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:clamp(32px,5vw,72px);align-items:start}
.cf-sdt__headline{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.04;color:var(--ink);text-wrap:balance}
.cf-sdt__mark{background-image:linear-gradient(transparent 42%,var(--marker,#fae37c) 42%,var(--marker,#fae37c) 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .08em}
.cf-sdt__points{margin-top:24px;max-width:60ch}
.cf-sdt__point{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:400;color:var(--ink);text-wrap:pretty}
.cf-sdt__point+.cf-sdt__point{margin-top:12px}
.cf-sdt__point strong{font-weight:800}
.cf-sdt__kick{margin-top:8px;background:var(--band);color:var(--band-ink);border-radius:var(--card-radius,var(--radius,14px));padding:clamp(20px,3vw,32px);box-shadow:inset 0 1px 0 oklch(from var(--band) calc(l + .1) c h / .9),var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32))}
.cf-sdt__kick-label{margin:0;font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--band-ink)}
.cf-sdt__kick-date{margin:12px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--band-ink);text-wrap:balance}
.cf-sdt__kick-time{margin:12px 0 0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--band-ink);text-wrap:pretty}
.cf-sdt__facts{list-style:none;margin:20px 0 0;padding:16px 0 0;border-top:1px solid oklch(from var(--band-ink) l c h / .2);display:grid;gap:8px}
.cf-sdt__facts li{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:500;color:var(--band-ink);text-wrap:pretty}
.cf-sdt__fact-icon{display:inline-block;vertical-align:-.15em;margin-inline-end:.5em}
.cf-sdt__days{--gap:24px;position:relative;list-style:none;margin:clamp(48px,6vw,80px) 0 0;padding:0;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:var(--gap)}
.cf-sdt__days::before{content:"";position:absolute;left:0;top:70px;height:3px;border-radius:2px;background:var(--ink);right:calc((100% - (var(--n) - 1) * var(--gap)) / var(--n) - 64px)}
.cf-sdt__day{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.cf-sdt__sun{display:block;flex:none;color:var(--sun);overflow:visible}
.cf-sdt__core{fill:oklch(from var(--sun) calc(l + .1) c h)}
.cf-sdt__horizon{fill:var(--ink);visibility:hidden}
.cf-sdt__rise{transition:transform .9s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--i) * .1s)}
.cf-sdt[data-motion="armed"] .cf-sdt__rise{transition:none;transform:translateY(80px)}
.cf-sdt__copy{margin-top:20px;min-width:0}
.cf-sdt__daynum{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--ink)}
.cf-sdt__date{margin:12px 0 0;font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-sdt__promise{margin:8px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:500;color:var(--ink);text-wrap:pretty}
.cf-sdt__close{margin-top:clamp(48px,6vw,64px)}
.cf-sdt__cta-row{display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px}
.cf-sdt__btn{--b:var(--button-bg,var(--cta));--b2:var(--button-bg-2,var(--cta-2));--sh:var(--shadow,oklch(0.22 0.03 260));appearance:none;display:inline-flex;align-items:center;justify-content:center;min-height:64px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--b) calc(l + .04) c h),oklch(from var(--b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .16) c h),0 1px 2px oklch(from var(--sh) l c h / .3),0 8px 16px -6px oklch(from var(--sh) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-sdt__btn:hover:not(:disabled),.cf-sdt__btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--b) calc(l - .01) c h),oklch(from var(--b2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .16) c h),0 1px 2px oklch(from var(--sh) l c h / .32),0 10px 20px -6px oklch(from var(--sh) l c h / .52))}
.cf-sdt__btn:active:not(:disabled),.cf-sdt__btn.is-active:not(:disabled){background:linear-gradient(oklch(from var(--b) calc(l - .04) c h),oklch(from var(--b2) calc(l - .08) c h));transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--sh) l c h / .3),inset 0 -2px 0 oklch(from var(--b) calc(l - .16) c h),0 1px 2px oklch(from var(--sh) l c h / .3)}
.cf-sdt__btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-sdt__btn:disabled{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / .2));cursor:not-allowed;transform:none}
.cf-sdt__promo{margin:0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--ink);text-wrap:pretty}
.cf-sdt__code{display:inline-block;margin:0 .15em;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 7%,var(--card));border:1px solid oklch(from var(--ink) l c h / .14);color:var(--ink);font-weight:800;letter-spacing:.06em;user-select:all}
.cf-sdt__note{display:inline-block;margin:16px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-sdt__note--link{color:var(--link,var(--accent));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em}
.cf-sdt__note--link:hover{color:oklch(from var(--link,var(--accent)) calc(l - .08) c h);text-decoration-color:currentColor}
.cf-sdt__note--link:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px;border-radius:4px}
.cf-sdt__edge{position:absolute;left:0;right:0;bottom:0;height:56px;z-index:1;line-height:0;pointer-events:none}
@media (max-width:860px){
.cf-sdt__head{grid-template-columns:minmax(0,1fr)}
.cf-sdt__kick{margin-top:0;max-width:560px}
.cf-sdt__days{grid-template-columns:minmax(0,1fr);gap:32px}
.cf-sdt__days::before{display:none}
.cf-sdt__day{display:grid;grid-template-columns:64px minmax(0,1fr);column-gap:20px;align-items:start}
.cf-sdt__horizon{visibility:visible}
.cf-sdt__copy{margin-top:4px}
}
@media (max-width:560px){
.cf-sdt__cta-row{flex-direction:column;align-items:stretch}
.cf-sdt__btn{width:100%}
.cf-sdt__promo{text-align:center}
.cf-sdt__close{text-align:center}
}
@media (prefers-reduced-motion:reduce){
.cf-sdt__rise,.cf-sdt__btn{transition:none}
.cf-sdt[data-motion="armed"] .cf-sdt__rise{transform:none}
}
`;
pieces/content/sunrise-day-track/specimen.tsx 41 lines
import React from "react";
import SunriseDayTrack from "../sunrise-day-track";
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = "default" | "hover" | "active" | "disabled";
export default function SunriseDayTrackSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<SunriseDayTrack
headline="Rise early. Own the whole day."
highlight="Own the whole day"
points={[
{ leadIn: "Live at 6:30 am.", text: "Do the morning drill with everyone else, then start your day ahead." },
{ leadIn: "One habit a morning.", text: "Each day stacks on the last, so by Friday it feels easy." },
]}
kickoffLabel="Early Riser kicks off"
kickoffDate="Monday, January 4"
kickoffTime="6:30 am ET, live each weekday"
facts={[
{ icon: "clock", text: "20-minute live morning drills" },
{ icon: "video", text: "Live video room, camera optional" },
]}
days={[
{ date: "Mon · Jan 4, 2027", promise: "Set one wake-up time and keep it all week." },
{ date: "Tue · Jan 5, 2027", promise: "Swap the phone scroll for a 10-minute first win." },
{ date: "Wed · Jan 6, 2027", promise: "Move your body before you open your inbox." },
{ date: "Thu · Jan 7, 2027", promise: "Plan tomorrow tonight in three short lines." },
{ date: "Fri · Jan 8, 2027", promise: "Lock in the routine you keep after Friday." },
]}
daysLabel="The Early Riser five-day plan"
actionLabel="Count Me In For Monday"
promoCode="RISE5"
promoText="Use code {code} for free access"
note="or keep scrolling to see the full morning plan"
state={state}
disabled={state === "disabled"}
onAction={() => {}}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalSunriseDayTrack |
string |
|
highlight OptionalSunriseDayTrack |
string |
|
points OptionalSunriseDayTrack |
{ leadIn: string; text: string }[] |
|
kickoffLabel OptionalSunriseDayTrack |
string |
|
kickoffDate OptionalSunriseDayTrack |
string |
|
kickoffTime OptionalSunriseDayTrack |
string |
|
facts OptionalSunriseDayTrack |
SunriseFact[] |
|
dayLabel OptionalSunriseDayTrack |
string |
|
days OptionalSunriseDayTrack |
SunriseDay[] |
|
daysLabel OptionalSunriseDayTrack |
string |
|
actionLabel OptionalSunriseDayTrack |
string |
|
href OptionalSunriseDayTrack |
string |
|
onAction OptionalSunriseDayTrack |
() => void |
|
disabled OptionalSunriseDayTrack |
boolean |
|
promoCode OptionalSunriseDayTrack |
string |
|
promoText OptionalSunriseDayTrack |
string |
|
note OptionalSunriseDayTrack |
string |
|
noteHref OptionalSunriseDayTrack |
string |
|
edgeTone OptionalSunriseDayTrack |
DividerTone | null |
|
state OptionalSunriseDayTrack |
"default" | "hover" | "active" | "disabled" |
|
className OptionalSunriseDayTrack |
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.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--card-radius- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
986367d82c360c9a.webp
image/webp · 102 KB