Email Course Inbox 1
Email course inbox preview: lessons land one by one in a neutral inbox on a lit stage, any day opens its three key points, and one sign-up form sits under the list.
Use it in a prompt
Use content/email-course-inbox 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/email-course-inbox.tsx. - Import it and pass your copy and images (Props tab):
import { EmailCourseInbox } from "@/components/funneldna/content/email-course-inbox"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/email-course-inbox/component.tsx 514 lines
// layout: product-stage
// Email course inbox preview: lessons land one by one in a neutral inbox on a lit stage, any day opens its three key points, and one sign-up form sits under the list.
import React, { useEffect, useId, useRef, useState } from "react";
import { motion, useReducedMotion, type Variants } from "motion/react";
import { AlertCircle, CalendarDays, Inbox, ListChecks, Lock, MailCheck } from "lucide-react";
import { Divider, FX_HOST, Spot, Spotlight } from "../fx/fx";
import calendar from "../fx/spots/calendar";
type DividerTone = React.ComponentProps<typeof Divider>["tone"];
export type EmailCourseInboxPoint = {
/** Bold lead-in phrase that opens the point */
lead?: string;
text: string;
};
export type EmailCourseInboxItem = {
/** Day number or value, rendered through copy.dayLabel ("Day {n}") */
day: number | string;
subject: string;
/** One-line preview under the subject */
preview?: string;
/** Overrides the block-level sender for this email */
sender?: string;
/** The lesson's key points, shown in the preview pane (three is the design) */
points?: EmailCourseInboxPoint[];
};
export type EmailCourseInboxCopy = {
inbox: string;
/** "{count}" is replaced with the number of unopened emails */
unread: string;
allRead: string;
/** "{n}" is replaced with the item's day */
dayLabel: string;
/** "{sender}" is replaced with the sender name */
from: string;
rowUnread: string;
/** "{n}" is replaced with the next email's day */
upNext: string;
listLabel: string;
previewLabel: string;
emailLabel: string;
emailPlaceholder: string;
errorEmail: string;
empty: string;
};
export type EmailCourseInboxProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke */
headlineEmphasis?: string;
/** Bold lead-in that opens the lead paragraph */
leadIn?: string;
lead?: string;
/** Short feature notes shown above the stage */
notes?: string[];
/** Sender name shown on every row unless an item sets its own */
sender?: string;
items?: EmailCourseInboxItem[];
/** Index of the email open on first view */
initialIndex?: number;
/** Line above the key points in the preview pane */
pointsIntro?: string;
buttonLabel?: string;
/** Reassurance line under the form */
note?: string;
copy?: Partial<EmailCourseInboxCopy>;
/** Receives the validated email; the builder wires what happens next */
onSubmit?: (values: { email: string }) => void;
/** Used only when onSubmit is not supplied */
onAction?: () => void;
state?: "default" | "hover" | "active" | "disabled" | "error";
/** Token name of the section below, for the wave edge */
edgeTone?: DividerTone;
className?: string;
};
const DEFAULT_COPY: EmailCourseInboxCopy = {
inbox: "Inbox",
unread: "{count} unread",
allRead: "All caught up",
dayLabel: "Day {n}",
from: "From {sender}",
rowUnread: "Unread.",
upNext: "Up next: Day {n}",
listLabel: "Course emails, day by day",
previewLabel: "Lesson preview",
emailLabel: "Where should the first lesson go?",
emailPlaceholder: "you@example.com",
errorEmail: "Enter a valid email address, like you@example.com.",
empty: "The lessons will show up here as soon as they're added.",
};
const DEFAULT_ITEMS: EmailCourseInboxItem[] = [
{
day: 1,
subject: "Start here: the one change this course is built on",
preview: "A short welcome, then the first move you can make today.",
points: [
{ lead: "Know where you're starting.", text: "A quick check that shows what to fix first." },
{ lead: "Pick one goal.", text: "Write down the single result you want by the last lesson." },
{ lead: "Block the time.", text: "Put a short slot in your calendar for each lesson." },
],
},
{
day: 2,
subject: "The quick win most people skip",
preview: "Small and fast, and it makes every lesson after it easier.",
points: [
{ lead: "Find the easy fix.", text: "The one change that pays off the same day." },
{ lead: "Do it once.", text: "Set it up properly so you never repeat it." },
{ lead: "Note the result.", text: "A one-line record keeps you going tomorrow." },
],
},
{
day: 3,
subject: "Put it on repeat so it runs without you",
preview: "Turn this week's moves into a habit that keeps going.",
points: [
{ lead: "Choose a trigger.", text: "Tie the habit to something you already do." },
{ lead: "Make it small.", text: "Short enough that you'll never skip it." },
{ lead: "Review weekly.", text: "A short check-in that keeps everything on track." },
],
},
];
const DEFAULT_NOTES = ["One short lesson a day", "Three key points in every email", "Unsubscribe with one click"];
const NOTE_ICONS = [CalendarDays, ListChecks, MailCheck];
const EMAIL = /^[^@ ]+@[^@ ]+[.][^@ ]+$/;
const LIST: Variants = {
hidden: {},
show: { transition: { staggerChildren: 0.12, delayChildren: 0.05 } },
};
const ROW: Variants = {
hidden: { opacity: 0.82, y: -14 },
show: { opacity: 1, y: 0, transition: { duration: 0.45, ease: [0.2, 0.7, 0.2, 1] } },
};
export function EmailCourseInbox(props: EmailCourseInboxProps) {
const {
headline = "Preview every lesson before it reaches your inbox",
headlineEmphasis = "every lesson",
leadIn = "Tap any day to look inside.",
lead = "Each email is short, and every one ends with three moves you can make the same day.",
notes = DEFAULT_NOTES,
sender = "",
items = DEFAULT_ITEMS,
initialIndex = 0,
pointsIntro = "Inside this lesson:",
buttonLabel = "Send me the first lesson",
note = "",
copy,
onSubmit,
onAction,
state = "default",
edgeTone = "surface" as DividerTone,
className,
} = props;
const c: EmailCourseInboxCopy = { ...DEFAULT_COPY, ...copy };
const uid = useId().replace(/:/g, "");
const sideId = "cf-eci-side-" + uid;
const emailId = "cf-eci-email-" + uid;
const errId = "cf-eci-err-" + uid;
const reduce = useReducedMotion();
const start = items.length ? Math.min(Math.max(initialIndex, 0), items.length - 1) : 0;
const [selected, setSelected] = useState(start);
const [opened, setOpened] = useState<Set<number>>(() => new Set());
const selectedRef = useRef(selected);
selectedRef.current = selected;
const openFirst = () => setOpened((prev) => (prev.size ? prev : new Set([selectedRef.current])));
useEffect(() => {
if (reduce) openFirst();
}, [reduce]);
const [email, setEmail] = useState("");
const [error, setError] = useState<string | null>(null);
const inputRef = useRef<HTMLInputElement>(null);
const disabled = state === "disabled";
const shownError = error ?? (state === "error" ? c.errorEmail : null);
const openRow = (i: number) => {
setSelected(i);
setOpened((prev) => {
const next = new Set(prev);
next.add(i);
return next;
});
};
const submit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (disabled) return;
const value = email.trim();
if (!EMAIL.test(value)) {
setError(c.errorEmail);
inputRef.current?.focus();
return;
}
setError(null);
if (onSubmit) onSubmit({ email: value });
else onAction?.();
};
const unread = items.filter((_, i) => !opened.has(i)).length;
const current = items[selected];
const next = items[selected + 1];
const paneContent = (item: EmailCourseInboxItem) => {
const from = item.sender ?? sender;
const points = item.points ?? [];
return (
<>
<div className="cf-eci__meta">
<span className="cf-eci__chip">{fill(c.dayLabel, { n: item.day })}</span>
{from ? <span className="cf-eci__from">{fill(c.from, { sender: from })}</span> : null}
</div>
<h3 className="cf-eci__pane-title">{item.subject}</h3>
{points.length ? (
<>
{pointsIntro ? <p className="cf-eci__pane-intro">{pointsIntro}</p> : null}
<ol className="cf-eci__points">
{points.map((p, k) => (
<li key={k}>
<span className="cf-eci__num" aria-hidden="true">{k + 1}</span>
<span className="cf-eci__point">
{p.lead ? <strong>{p.lead} </strong> : null}
{p.text}
</span>
</li>
))}
</ol>
</>
) : item.preview ? (
<p className="cf-eci__pane-intro">{item.preview}</p>
) : null}
</>
);
};
const btnClass = "cf-eci__btn" + (state === "hover" ? " is-hover" : "") + (state === "active" ? " is-active" : "");
return (
<section className={"cf-eci" + (className ? " " + className : "")} style={FX_HOST}>
<style>{CSS}</style>
<Spotlight />
<div className="cf-eci__inner">
<h2 className="cf-eci__title">{emphasise(headline, headlineEmphasis)}</h2>
{lead || leadIn ? (
<p className="cf-eci__lead">
{leadIn ? <strong>{leadIn} </strong> : null}
{lead}
</p>
) : null}
{notes.length ? (
<ul className="cf-eci__notes">
{notes.map((n, i) => {
const Icon = NOTE_ICONS[i % NOTE_ICONS.length];
return (
<li key={i}>
<Icon className="cf-eci__ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{n}
</li>
);
})}
</ul>
) : null}
<div className="cf-eci__stage">
<div className="cf-eci__card">
<div className="cf-eci__bar">
<span className="cf-eci__bar-title">
<Inbox className="cf-eci__ico" size={18} strokeWidth={2.5} aria-hidden="true" />
{c.inbox}
</span>
{items.length ? (
<span className="cf-eci__count">{unread ? fill(c.unread, { count: unread }) : c.allRead}</span>
) : null}
</div>
{items.length ? (
<div className="cf-eci__panes">
<motion.ul
className="cf-eci__list"
aria-label={c.listLabel}
variants={LIST}
initial={reduce ? false : "hidden"}
whileInView="show"
viewport={{ once: true, amount: 0.25 }}
>
{items.map((item, i) => {
const isSel = i === selected;
const read = opened.has(i);
const from = item.sender ?? sender;
return (
<motion.li
key={i}
className="cf-eci__item"
variants={ROW}
onAnimationComplete={i === items.length - 1 ? openFirst : undefined}
>
<button
type="button"
className={"cf-eci__row" + (read ? " is-read" : "")}
aria-pressed={isSel}
aria-controls={sideId}
onClick={() => openRow(i)}
>
<span className="cf-eci__dot" aria-hidden="true" />
<span className="cf-eci__row-body">
{!read ? <span className="cf-eci__sr">{c.rowUnread} </span> : null}
<span className="cf-eci__row-top">
{from ? <span className="cf-eci__sender">{from}</span> : null}
<span className="cf-eci__chip">{fill(c.dayLabel, { n: item.day })}</span>
</span>
<span className="cf-eci__subject">{item.subject}</span>
{item.preview ? <span className="cf-eci__preview">{item.preview}</span> : null}
</span>
</button>
{isSel ? <div className="cf-eci__inline">{paneContent(item)}</div> : null}
</motion.li>
);
})}
</motion.ul>
<div className="cf-eci__side" id={sideId} role="region" aria-label={c.previewLabel}>
{current ? (
<div key={selected} className="cf-eci__pane-in" aria-live="polite">
{paneContent(current)}
</div>
) : null}
{next ? (
<button type="button" className="cf-eci__next" onClick={() => openRow(selected + 1)}>
<span className="cf-eci__next-art" aria-hidden="true">
<Spot src={calendar} size={56} />
</span>
<span className="cf-eci__next-body">
<span className="cf-eci__next-label">{fill(c.upNext, { n: next.day })}</span>
<span className="cf-eci__next-subject">{next.subject}</span>
</span>
</button>
) : null}
</div>
</div>
) : (
<p className="cf-eci__empty">{c.empty}</p>
)}
</div>
</div>
<form className="cf-eci__form" onSubmit={submit} noValidate>
<label className="cf-eci__label" htmlFor={emailId}>{c.emailLabel}</label>
<div className="cf-eci__fieldrow">
<input
ref={inputRef}
id={emailId}
className="cf-eci__input"
type="email"
name="email"
autoComplete="email"
inputMode="email"
placeholder={c.emailPlaceholder}
value={email}
disabled={disabled}
aria-invalid={shownError ? true : undefined}
aria-describedby={shownError ? errId : undefined}
onChange={(e) => {
setEmail(e.target.value);
if (error) setError(null);
}}
/>
<button type="submit" className={btnClass} disabled={disabled}>
{buttonLabel}
</button>
</div>
{shownError ? (
<p id={errId} className="cf-eci__error" role="alert">
<AlertCircle className="cf-eci__ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{shownError}
</p>
) : null}
{note ? (
<p className="cf-eci__note">
<Lock className="cf-eci__ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{note}
</p>
) : null}
</form>
</div>
<div className="cf-eci__edge" aria-hidden="true">
<Divider shape="wave" tone={edgeTone} height={56} />
</div>
</section>
);
}
export default EmailCourseInbox;
function fill(template: string, vars: Record<string, string | number>) {
return Object.entries(vars).reduce((s, [k, v]) => s.split("{" + k + "}").join(String(v)), template);
}
function emphasise(text: string, phrase?: string) {
if (!phrase) return text;
const i = text.indexOf(phrase);
if (i < 0) return text;
return (
<>
{text.slice(0, i)}
<span className="cf-eci__mark">{phrase}</span>
{text.slice(i + phrase.length)}
</>
);
}
const CSS = `
.cf-eci{position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) calc(clamp(64px,8.5vw,120px) + 56px)}
.cf-eci *,.cf-eci *::before,.cf-eci *::after{box-sizing:border-box}
.cf-eci__inner{position:relative;z-index:1;max-width:1120px;margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center}
.cf-eci__title{margin:0;max-width:46rem;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;text-wrap:balance;color:var(--band-ink)}
.cf-eci__mark{--cf-eci-marker:oklch(from var(--marker,#fae37c) max(l,.86) c h / 1);padding:0 .12em;margin:0 -.04em;border-radius:.2em .34em .24em .3em;-webkit-box-decoration-break:clone;box-decoration-break:clone;color:oklch(from var(--band) min(l,.24) c h);background:linear-gradient(to bottom,transparent 10%,var(--cf-eci-marker) 10%,var(--cf-eci-marker) 95%,transparent 95%)}
.cf-eci__lead{margin:24px 0 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;text-wrap:pretty;color:oklch(from var(--band-ink) calc(l - .06) c h)}
.cf-eci__lead strong{font-weight:800;color:var(--band-ink)}
.cf-eci__notes{list-style:none;margin:24px 0 0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:12px 28px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--band-ink)}
.cf-eci__notes li{text-wrap:pretty}
.cf-eci__ico{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em;flex:none}
.cf-eci__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-eci__stage{position:relative;width:100%;max-width:980px;margin-top:clamp(32px,4vw,48px);text-align:left}
.cf-eci__card{position:relative;z-index:1;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32)));overflow:hidden}
.cf-eci__bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px clamp(16px,2.4vw,24px);border-bottom:1px solid oklch(from var(--ink) l c h / .1);background:color-mix(in oklch,var(--ink) 3%,var(--card))}
.cf-eci__bar-title{font-family:var(--font-display);font-size:.9375rem;font-weight:800;line-height:1.3;color:var(--ink)}
.cf-eci__count,.cf-eci__chip{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--ink);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums}
.cf-eci__panes{display:grid;grid-template-columns:minmax(0,400px) minmax(0,1fr)}
.cf-eci__list{list-style:none;margin:0;padding:8px;display:flex;flex-direction:column;gap:4px;border-right:1px solid oklch(from var(--ink) l c h / .1)}
.cf-eci__item{margin:0}
.cf-eci__row{appearance:none;display:grid;grid-template-columns:10px minmax(0,1fr);gap:12px;width:100%;margin:0;padding:14px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:background-color .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-eci__row:hover{background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-eci__row:active{transform:scale(.995)}
.cf-eci__row[aria-pressed="true"]{background:color-mix(in oklch,var(--accent) 10%,var(--card));box-shadow:inset 0 0 0 1px oklch(from var(--accent) l c h / .3)}
.cf-eci__row:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:1px}
.cf-eci__dot{width:10px;height:10px;margin-top:6px;border-radius:999px;background:var(--accent-fill,var(--accent));transition:opacity .45s ease,transform .45s cubic-bezier(.2,.7,.2,1)}
.cf-eci__row.is-read .cf-eci__dot{opacity:0;transform:scale(.4)}
.cf-eci__row-body{display:block;min-width:0}
.cf-eci__row-top{display:flex;align-items:center;gap:8px;min-width:0}
.cf-eci__sender{min-width:0;font-size:.9375rem;font-weight:800;line-height:1.3;color:var(--ink);overflow-wrap:anywhere}
.cf-eci__row-top .cf-eci__chip{margin-inline-start:auto}
.cf-eci__subject{display:block;margin-top:6px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.3;color:var(--ink);text-wrap:pretty}
.cf-eci__row.is-read .cf-eci__subject{font-weight:600}
.cf-eci__preview{display:block;margin-top:4px;font-size:.9375rem;font-weight:500;line-height:1.4;color:color-mix(in oklch,var(--muted) 80%,var(--ink));text-wrap:pretty}
.cf-eci__side{min-width:0;display:flex;flex-direction:column;padding:clamp(20px,3vw,32px);background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-eci__pane-in{margin-bottom:32px;animation:cf-eci-in .45s cubic-bezier(.2,.7,.2,1) both}
.cf-eci__next{appearance:none;display:flex;align-items:center;gap:16px;width:100%;margin:auto 0 0;padding:20px 0 0;border:0;border-top:1px solid oklch(from var(--ink) l c h / .1);border-radius:0;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.cf-eci__next-art{flex:none;line-height:0;transition:transform .16s ease}
.cf-eci__next-body{display:block;min-width:0}
.cf-eci__next-label{display:block;font-size:.875rem;font-weight:800;line-height:1.2;color:color-mix(in oklch,var(--muted) 75%,var(--ink))}
.cf-eci__next-subject{display:block;margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.3;color:var(--ink);text-wrap:pretty;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:.18em;transition:text-decoration-color .16s ease}
.cf-eci__next:hover .cf-eci__next-subject{text-decoration-color:oklch(from var(--ink) l c h / .45)}
.cf-eci__next:hover .cf-eci__next-art{transform:translateY(-2px)}
.cf-eci__next:active .cf-eci__next-art{transform:none}
.cf-eci__next:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:4px;border-radius:6px}
.cf-eci__meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.cf-eci__meta .cf-eci__chip{background:var(--card);box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .12)}
.cf-eci__from{font-size:.9375rem;font-weight:600;line-height:1.4;color:color-mix(in oklch,var(--muted) 75%,var(--ink))}
.cf-eci__pane-title{margin:12px 0 0;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-.01em;line-height:1.15;text-wrap:pretty;color:var(--ink)}
.cf-eci__pane-intro{margin:16px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:600;line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-eci__points{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:16px}
.cf-eci__points li{display:grid;grid-template-columns:1.5rem minmax(0,1fr);gap:12px;align-items:baseline}
.cf-eci__num{font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);font-weight:800;line-height:1;color:var(--accent);font-variant-numeric:tabular-nums}
.cf-eci__point{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-eci__point strong{font-weight:800}
.cf-eci__inline{display:none}
.cf-eci__empty{margin:0;padding:clamp(24px,4vw,40px);text-align:center;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted)}
.cf-eci__form{position:relative;z-index:1;width:100%;max-width:640px;margin:clamp(48px,5vw,64px) auto 0;text-align:center}
.cf-eci__label{display:block;margin:0 0 12px;font-size:1.0625rem;font-weight:700;line-height:1.3;color:var(--band-ink)}
.cf-eci__fieldrow{display:flex;gap:12px;align-items:stretch}
.cf-eci__input{flex:1 1 auto;min-width:0;height:56px;padding:0 16px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));background:var(--field,#fff);color:var(--field-ink,#101828);font-family:var(--font-body);font-size:1.0625rem;text-align:left;outline:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-eci__input::placeholder{color:color-mix(in oklch,var(--field-ink,#101828) 65%,var(--field,#fff));opacity:1}
.cf-eci__input:focus-visible{border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-eci__input[aria-invalid="true"]{border-color:var(--danger);box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-eci__input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink,#101828) 6%,var(--field,#fff))}
.cf-eci__btn{flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:56px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));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;white-space:nowrap;color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);cursor:pointer;background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2,var(--cta))) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .35),0 8px 16px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-eci__btn:hover:not(:disabled),.cf-eci__btn.is-hover{background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2,var(--cta))) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .4),0 10px 18px -6px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .55))}
.cf-eci__btn:active:not(:disabled),.cf-eci__btn.is-active{transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .35),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .3)}
.cf-eci__btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-eci__btn:disabled{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
.cf-eci__error{display:inline-block;margin:12px 0 0;padding:6px 12px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:600;line-height:1.4;text-align:left;text-wrap:pretty}
.cf-eci__note{margin:12px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:oklch(from var(--band-ink) calc(l - .06) c h);text-wrap:pretty}
.cf-eci__edge{position:absolute;left:0;right:0;bottom:-1px;z-index:1;line-height:0;pointer-events:none}
@keyframes cf-eci-in{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:760px){
.cf-eci__panes{grid-template-columns:1fr}
.cf-eci__list{border-right:0;padding:6px}
.cf-eci__side{display:none}
.cf-eci__row{padding:12px}
.cf-eci__row[aria-pressed="true"]{border-radius:10px 10px 0 0;box-shadow:inset 1px 0 0 oklch(from var(--accent) l c h / .3),inset -1px 0 0 oklch(from var(--accent) l c h / .3),inset 0 1px 0 oklch(from var(--accent) l c h / .3)}
.cf-eci__inline{display:block;margin:0 0 8px;padding:4px 16px 20px 34px;border-radius:0 0 10px 10px;background:color-mix(in oklch,var(--accent) 10%,var(--card));box-shadow:inset 1px 0 0 oklch(from var(--accent) l c h / .3),inset -1px 0 0 oklch(from var(--accent) l c h / .3),inset 0 -1px 0 oklch(from var(--accent) l c h / .3);animation:cf-eci-in .45s cubic-bezier(.2,.7,.2,1) both}
.cf-eci__inline .cf-eci__meta,.cf-eci__inline .cf-eci__pane-title{display:none}
.cf-eci__inline .cf-eci__pane-intro{margin-top:8px;padding-top:12px;border-top:1px solid oklch(from var(--ink) l c h / .1)}
.cf-eci__inline .cf-eci__points{gap:12px}
.cf-eci__notes{flex-direction:column;align-items:center;gap:8px}
}
@media (max-width:560px){
.cf-eci__fieldrow{flex-direction:column}
.cf-eci__btn{width:100%}
}
@media (prefers-reduced-motion:reduce){
.cf-eci__row,.cf-eci__dot,.cf-eci__btn,.cf-eci__input,.cf-eci__next-art,.cf-eci__next-subject{transition:none}
.cf-eci__next:hover .cf-eci__next-art{transform:none}
.cf-eci__pane-in,.cf-eci__inline{animation:none}
.cf-eci__row:active,.cf-eci__btn:active:not(:disabled),.cf-eci__btn.is-active{transform:none}
}
`;
pieces/content/email-course-inbox/specimen.tsx 76 lines
import defaults from "../../studio-defaults.json";
import { EmailCourseInbox, type EmailCourseInboxItem, type EmailCourseInboxProps } from "../email-course-inbox";
export const states = ["default", "hover", "active", "disabled", "error"];
const ITEMS: EmailCourseInboxItem[] = [
{
day: 1,
subject: "Find the leak: your 15-minute money snapshot",
preview: "Open your bank app and grab a coffee. We're counting, not judging.",
points: [
{ lead: "List every account.", text: "Checking, savings and the card you forgot about. One line each." },
{ lead: "Total the last 30 days.", text: "Money in, money out. Rough numbers are fine." },
{ lead: "Flag one surprise.", text: "The charge you didn't expect is where Day 2 starts." },
],
},
{
day: 2,
subject: "Pay yourself first, even when clients pay late",
preview: "The two-account setup that turns lumpy invoices into a steady paycheck.",
points: [
{ lead: "Open a holding account.", text: "Every invoice lands here first, never in your spending account." },
{ lead: "Pick your paycheck number.", text: "The amount you can pay yourself in a slow month." },
{ lead: "Move it twice a month.", text: "Same days, same amount, so your bills never guess." },
],
},
{
day: 3,
subject: "The tax pot: stop dreading tax season",
preview: "Set aside the right slice of every invoice the day it arrives.",
points: [
{ lead: "Choose your set-aside rate.", text: "Start with the rate your accountant gives you." },
{ lead: "Automate the transfer.", text: "A rule moves the slice the moment a client pays." },
{ lead: "Name it clearly.", text: "Call the account \u201cNot mine\u201d and you'll never touch it." },
],
},
{
day: 4,
subject: "Price your next project with a floor, not a guess",
preview: "Work backward from what your month needs, then quote with confidence.",
points: [
{ lead: "Add up your month.", text: "Paycheck, tax pot and business costs in one number." },
{ lead: "Divide by real hours.", text: "Billable hours only, not the ones spent chasing work." },
{ lead: "Quote above the floor.", text: "Your floor is the minimum, never the price." },
],
},
{
day: 5,
subject: "Your Friday money hour",
preview: "One recurring hour that keeps the whole system running.",
points: [
{ lead: "Send what's owed.", text: "Invoices out and late ones nudged before you log off." },
{ lead: "Check the three pots.", text: "Holding, tax and spending, in that order." },
{ lead: "Plan next week's paycheck.", text: "Know the number before Monday asks." },
],
},
];
export default function EmailCourseInboxSpecimen({ state = "default" }: { state?: EmailCourseInboxProps["state"] }) {
return (
<EmailCourseInbox
headline="Your 5-day money reset, one email at a time"
headlineEmphasis="one email at a time"
leadIn="Tap any day to see inside."
lead="Five short lessons for freelancers with uneven income. Each one ends with three moves you can make before your next invoice."
notes={["One email a day for 5 days", "Three moves in every lesson", "Built for freelancers with uneven income"]}
sender="Priya at Tallywise"
items={ITEMS}
pointsIntro="Three moves in this lesson:"
buttonLabel="Start my money reset"
note={defaults.sample.registration.privacy}
copy={{ emailLabel: "Where should Day 1 go?", emailPlaceholder: "you@example.com" }}
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalEmailCourseInbox |
string |
|
headlineEmphasis OptionalEmailCourseInbox |
string |
|
leadIn OptionalEmailCourseInbox |
string |
|
lead OptionalEmailCourseInbox |
string |
|
notes OptionalEmailCourseInbox |
string[] |
|
sender OptionalEmailCourseInbox |
string |
|
items OptionalEmailCourseInbox |
EmailCourseInboxItem[] |
|
initialIndex OptionalEmailCourseInbox |
number |
|
pointsIntro OptionalEmailCourseInbox |
string |
|
buttonLabel OptionalEmailCourseInbox |
string |
|
note OptionalEmailCourseInbox |
string |
|
copy OptionalEmailCourseInbox |
Partial<EmailCourseInboxCopy> |
|
onSubmit OptionalEmailCourseInbox |
(values: { email: string }) => void |
|
onAction OptionalEmailCourseInbox |
() => void |
|
state OptionalEmailCourseInbox |
"default" | "hover" | "active" | "disabled" | "error" |
|
edgeTone OptionalEmailCourseInbox |
DividerTone |
|
className OptionalEmailCourseInbox |
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.
--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- 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.
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB