Neon Opt-in Planner 1
Broadsheet lead-magnet opt-in block pairing a kitchen-counter printable preview with live week switching and a single-field email capture.
Use it in a prompt
Use forms/neon-optin-planner 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/forms/neon-optin-planner.tsx. - Import it and pass your copy and images (Props tab):
import { NeonOptinPlanner } from "@/components/funneldna/forms/neon-optin-planner"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/neon-optin-planner/component.tsx 1184 lines
// layout: advertorial-front
// Broadsheet lead-magnet opt-in block pairing a kitchen-counter printable preview with live week switching and a single-field email capture.
import React, { useId, useState } from "react";
import { AlertCircle, Lock } from "lucide-react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
import { Spot } from "../fx/fx";
import calendarSpot from "../fx/spots/calendar";
import clockSpot from "../fx/spots/clock";
import checklistSpot from "../fx/spots/checklist";
export type NeonOptinPlannerItem = {
/** Short benefit headline for what is inside the lead magnet. */
title: string;
/** One-sentence explanation of the item. */
detail: string;
/** Optional imported Spot clay illustration URL. */
spot?: string;
};
export type NeonOptinPlannerWeek = {
/** Compact tab label, e.g. "Week 1". */
label: string;
/** Printed heading shown on the sheet for the selected week. */
heading: string;
/** Three short sample dinner lines printed on the sheet preview. */
meals: string[];
};
export type NeonOptinPlannerProof = {
/** Optional supplied quote; omitted unless provided. */
quote: string;
/** Attribution name for the supplied quote. */
author: string;
/** Optional location or role for the supplied quote. */
role?: string;
};
export type NeonOptinPlannerProps = {
/** Masthead brand or kitchen name. */
publicationName?: string;
/** Left masthead edition line. */
editionLabel?: string;
/** Right masthead format line. */
formatLabel?: string;
/** Headline text before the emphasized phrase. */
headlineBefore?: string;
/** Highlighted phrase inside the headline. */
headlineEmphasis?: string;
/** Optional headline text after the emphasized phrase. */
headlineAfter?: string;
/** One-line promise of what the planner does. */
promise?: string;
/** Short conversational aside in the author's voice. */
aside?: string;
/** Generated overhead photograph URL of the blank printable sheet on a counter. */
productImage?: string;
/** Accessible description for the planner photograph. */
productImageAlt?: string;
/** Small top line printed onto the planner sheet. */
sheetKicker?: string;
/** Main planner title laid over the sheet in matching perspective. */
sheetTitle?: string;
/** Printed metadata line beneath the sheet title. */
sheetSubtitle?: string;
/** Printed closing line at the foot of the sheet preview. */
sheetFooterNote?: string;
/** Interactive week previews that update the printed sheet live. */
weeks?: NeonOptinPlannerWeek[];
/** Accessible label for the week switcher tabs. */
weekSelectorLabel?: string;
/** Benefit-driven heading above the three inside items. */
insideHeading?: string;
/** Three short lines explaining what is inside the planner. */
items?: NeonOptinPlannerItem[];
/** Label above the email input. */
emailLabel?: string;
/** Example email placeholder. */
emailPlaceholder?: string;
/** Primary submit button label. */
buttonLabel?: string;
/** Short privacy reassurance line beneath the button. */
privacyNote?: string;
/** Inline error shown when submitted empty. */
emptyEmailError?: string;
/** Inline error shown when the email format is invalid. */
invalidEmailError?: string;
/** Sample invalid address prefilled in the "error" preview state. */
errorPreviewEmail?: string;
/** Screen-reader announcement when the week changes. Placeholders: {heading}, {meals} (comma-joined). */
weekAnnouncement?: string;
/** Proof quote wrapper. Placeholder: {quote}. */
proofQuoteTemplate?: string;
/** Proof attribution without a role. Placeholder: {author}. */
proofAttribution?: string;
/** Proof attribution with a role. Placeholders: {author}, {role}. */
proofAttributionWithRole?: string;
/** Optional supplied customer proof; defaults to empty. */
proof?: NeonOptinPlannerProof;
/** Called with validated form values on submit. */
onSubmit?: (values: { email: string }) => void;
/** Controlled preview state for design tooling. */
state?: "default" | "hover" | "active" | "disabled" | "error";
/** Optional root class name for page placement. */
className?: string;
};
export function NeonOptinPlanner({
publicationName = "Cobblebrae Kitchen",
editionLabel = "Weeknight Sheet",
formatLabel = "Free One-Page PDF",
headlineBefore = "For busy cooks stuck staring into the fridge ",
headlineEmphasis = "at 5:30 p.m.",
headlineAfter = "",
promise = "Print one page to get 4 weeks of five-ingredient dinners and a tear-off shopping list.",
aside = "(Yes, really five ingredients—no secret pantry of twelve.)",
productImage = "",
productImageAlt = "Overhead view of a blank printable weekly dinner planner on a kitchen counter surrounded by fresh herbs and kitchen tools",
sheetKicker = "Free Kitchen Printable",
sheetTitle = "Five-Ingredient Weeknight Planner",
sheetSubtitle = "4 Weeks · 5 Ingredients Max · Shopping List",
sheetFooterNote = "+ Thu, Fri & tear-off aisle checklist",
weeks = DEFAULT_WEEKS,
weekSelectorLabel = "Preview each week on the dinner planner",
insideHeading = "Four weeks of dinner, decided in ten seconds",
items = DEFAULT_ITEMS,
emailLabel = "Where should we send your planner?",
emailPlaceholder = "you@example.com",
buttonLabel = "Yes! Send me the planner",
privacyNote = "Free PDF sent straight to your inbox. Unsubscribe in one click.",
emptyEmailError = "Enter your email address so we know where to send the planner.",
invalidEmailError = "That doesn't look like a valid email address. Check for a typo and try again.",
errorPreviewEmail = "cook@cobblebrae",
weekAnnouncement = "{heading}: {meals}",
proofQuoteTemplate = "“{quote}”",
proofAttribution = "— {author}",
proofAttributionWithRole = "— {author}, {role}",
proof,
onSubmit,
state = "default",
className = "",
}: NeonOptinPlannerProps) {
const headingId = useId();
const emailId = useId();
const errorId = useId();
const privacyId = useId();
const reducedMotion = useReducedMotion();
const [activeWeekIndex, setActiveWeekIndex] = useState(0);
const [email, setEmail] = useState(() => (state === "error" ? errorPreviewEmail : ""));
const [localError, setLocalError] = useState("");
const isDisabled = state === "disabled";
const visibleError = localError || (state === "error" ? invalidEmailError : "");
const hasError = Boolean(visibleError);
const safeWeekIndex = weeks.length > 0 ? Math.min(activeWeekIndex, weeks.length - 1) : 0;
const activeWeek = weeks[safeWeekIndex];
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault();
if (isDisabled) return;
const trimmed = email.trim();
if (!trimmed) {
setLocalError(emptyEmailError);
return;
}
if (!EMAIL_PATTERN.test(trimmed)) {
setLocalError(invalidEmailError);
return;
}
setLocalError("");
onSubmit?.({ email: trimmed });
}
return (
<section
className={`cf-neon-optin-planner${className ? ` ${className}` : ""}`}
aria-labelledby={headingId}
>
<style>{STYLES}</style>
<div className="cf-nop-shell">
<header className="cf-nop-masthead">
<span className="cf-nop-meta cf-nop-meta-left">{editionLabel}</span>
<span className="cf-nop-brand">{publicationName}</span>
<span className="cf-nop-meta cf-nop-meta-right">{formatLabel}</span>
</header>
<div className="cf-nop-hero">
<h1 id={headingId} className="cf-nop-headline">
{headlineBefore}
{headlineEmphasis ? (
<mark className="cf-nop-emph">{headlineEmphasis}</mark>
) : null}
{headlineAfter}
</h1>
<p className="cf-nop-promise">
{promise}
{aside ? (
<>
{" "}
<span className="cf-nop-aside">{aside}</span>
</>
) : null}
</p>
</div>
<div className="cf-nop-spread">
<div className="cf-nop-visual-col">
<figure className="cf-nop-photo-frame">
{productImage ? (
<img
src={productImage}
alt={productImageAlt}
className="cf-nop-photo"
loading="eager"
decoding="async"
/>
) : (
<div className="cf-nop-photo-fallback" aria-hidden="true" />
)}
<div className="cf-nop-sheet-overlay" aria-hidden="true">
<div className="cf-nop-sheet-paper">
<div className="cf-nop-sheet-kicker">{sheetKicker}</div>
<div className="cf-nop-sheet-title">{sheetTitle}</div>
<div className="cf-nop-sheet-rule" />
<div className="cf-nop-sheet-sub">{sheetSubtitle}</div>
{activeWeek ? (
<AnimatePresence mode="wait" initial={false}>
<motion.div
key={activeWeek.label}
className="cf-nop-sheet-week"
initial={reducedMotion ? false : { opacity: 0.72, y: 4 }}
animate={{ opacity: 1, y: 0 }}
exit={reducedMotion ? undefined : { opacity: 0.72, y: -4 }}
transition={{
duration: reducedMotion ? 0 : 0.2,
ease: [0.2, 0.7, 0.2, 1],
}}
>
<div className="cf-nop-sheet-week-head">{activeWeek.heading}</div>
<ul className="cf-nop-sheet-meals">
{activeWeek.meals.map((meal) => (
<li key={meal}>{meal}</li>
))}
</ul>
</motion.div>
</AnimatePresence>
) : null}
{sheetFooterNote ? (
<div className="cf-nop-sheet-foot">{sheetFooterNote}</div>
) : null}
</div>
</div>
</figure>
{weeks.length > 0 ? (
<div
className="cf-nop-weeks"
role="tablist"
aria-label={weekSelectorLabel}
>
{weeks.map((week, index) => {
const isSelected = index === safeWeekIndex;
return (
<button
key={week.label}
type="button"
role="tab"
aria-selected={isSelected}
disabled={isDisabled}
className={`cf-nop-week-tab${isSelected ? " is-active" : ""}`}
onClick={() => setActiveWeekIndex(index)}
>
{week.label}
</button>
);
})}
</div>
) : null}
{activeWeek ? (
<p className="cf-nop-sr-only" aria-live="polite">
{fillTemplate(weekAnnouncement, {
heading: activeWeek.heading,
meals: activeWeek.meals.join(", "),
})}
</p>
) : null}
</div>
<div className="cf-nop-action-col">
<div className="cf-nop-inside">
<h2 className="cf-nop-inside-heading">{insideHeading}</h2>
<ul className="cf-nop-inside-list">
{items.map((item, index) => (
<li key={item.title} className="cf-nop-inside-item">
<div className="cf-nop-spot-wrap" aria-hidden="true">
<Spot
src={item.spot ?? DEFAULT_SPOTS[index % DEFAULT_SPOTS.length]}
size={52}
shade="ink"
light="card"
/>
</div>
<div className="cf-nop-inside-copy">
<strong className="cf-nop-inside-title">{item.title}</strong>
<p className="cf-nop-inside-detail">{item.detail}</p>
</div>
</li>
))}
</ul>
</div>
<hr className="cf-nop-rule" />
<form className="cf-nop-form" onSubmit={handleSubmit} noValidate>
<div className="cf-nop-field">
<label htmlFor={emailId} className="cf-nop-label">
{emailLabel}
</label>
<input
id={emailId}
name="email"
type="email"
inputMode="email"
autoComplete="email"
value={email}
placeholder={emailPlaceholder}
disabled={isDisabled}
aria-invalid={hasError || undefined}
aria-describedby={hasError ? `${errorId} ${privacyId}` : privacyId}
className={`cf-nop-input${hasError ? " is-error" : ""}`}
onChange={(event) => {
setEmail(event.target.value);
if (localError) setLocalError("");
}}
/>
{hasError ? (
<p id={errorId} className="cf-nop-error" role="alert">
<AlertCircle
className="cf-nop-inline-icon"
size={16}
strokeWidth={2.5}
aria-hidden="true"
/>
{visibleError}
</p>
) : null}
</div>
<button
type="submit"
disabled={isDisabled}
className={`cf-nop-submit${state === "hover" ? " is-hover" : ""}${state === "active" ? " is-active" : ""}`}
>
{buttonLabel}
</button>
<p id={privacyId} className="cf-nop-privacy">
<Lock
className="cf-nop-inline-icon"
size={16}
strokeWidth={2.5}
aria-hidden="true"
/>
{privacyNote}
</p>
</form>
{proof?.quote ? (
<blockquote className="cf-nop-proof">
<p className="cf-nop-proof-quote">
{fillTemplate(proofQuoteTemplate, { quote: proof.quote })}
</p>
<footer className="cf-nop-proof-author">
{proof.role
? fillTemplate(proofAttributionWithRole, {
author: proof.author,
role: proof.role,
})
: fillTemplate(proofAttribution, { author: proof.author })}
</footer>
</blockquote>
) : null}
</div>
</div>
</div>
</section>
);
}
export default NeonOptinPlanner;
const DEFAULT_SPOTS = [calendarSpot, clockSpot, checklistSpot] as const;
const DEFAULT_WEEKS: NeonOptinPlannerWeek[] = [
{
label: "Week 1",
heading: "Week 1 · 20-Minute Skillets",
meals: [
"Mon — Lemon Herb Skillet Chicken",
"Tue — Crispy Gnocchi & Tomatoes",
"Wed — Garlic Butter Salmon & Beans",
],
},
{
label: "Week 2",
heading: "Week 2 · One-Pan Dinners",
meals: [
"Mon — Sheet-Pan Sausage & Peppers",
"Tue — Honey Soy Glazed Chicken",
"Wed — White Bean & Spinach Soup",
],
},
{
label: "Week 3",
heading: "Week 3 · Pantry Nights",
meals: [
"Mon — Black Bean & Cheddar Melts",
"Tue — Pesto Tortellini & Peas",
"Wed — Spiced Turkey Lettuce Cups",
],
},
{
label: "Week 4",
heading: "Week 4 · Easy Favorites",
meals: [
"Mon — Maple Mustard Pork Chops",
"Tue — Roasted Broccoli Flatbread",
"Wed — Creamy Tomato Chickpeas",
],
},
];
const DEFAULT_ITEMS: NeonOptinPlannerItem[] = [
{
title: "4 weeks of weeknight dinners",
detail: "Twenty Monday-to-Friday meals mapped cleanly onto one printable page.",
spot: calendarSpot,
},
{
title: "5 ingredients or fewer per meal",
detail: "Everyday grocery staples so dinner stays fast without a specialty run.",
spot: clockSpot,
},
{
title: "Tear-off weekly shopping list",
detail: "Grouped by store section so you grab what you need and head home.",
spot: checklistSpot,
},
];
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
/** Replaces named {placeholders} with text; unknown placeholders are left as written. */
function fillTemplate(template: string, values: Record<string, string>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) =>
key in values ? values[key] : match,
);
}
const STYLES = `
.cf-neon-optin-planner {
position: relative;
width: 100%;
background: var(--band);
color: var(--band-ink);
font-family: var(--font-body);
padding-top: clamp(40px, 6.5vw, 88px);
padding-bottom: clamp(48px, 7vw, 96px);
overflow-x: clip;
box-sizing: border-box;
}
.cf-neon-optin-planner *,
.cf-neon-optin-planner *::before,
.cf-neon-optin-planner *::after {
box-sizing: border-box;
}
.cf-neon-optin-planner::after {
content: "";
position: absolute;
inset: auto 0 0 0;
height: clamp(104px, 13.5vw, 156px);
background: var(--surface);
z-index: 0;
pointer-events: none;
}
.cf-neon-optin-planner .cf-nop-shell {
position: relative;
z-index: 1;
max-width: 1120px;
margin-inline: auto;
padding-inline: clamp(16px, 5vw, 48px);
}
/* Broadsheet masthead */
.cf-neon-optin-planner .cf-nop-masthead {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 12px;
padding-block: 12px;
border-top: 1px solid oklch(from var(--band-ink) l c h / 0.24);
border-bottom: 3px double oklch(from var(--band-ink) l c h / 0.36);
color: var(--band-ink);
}
.cf-neon-optin-planner .cf-nop-brand {
font-family: var(--font-display);
font-size: 0.9375rem;
font-weight: var(--display-weight, 800);
letter-spacing: 0.14em;
text-transform: uppercase;
text-align: center;
color: var(--band-ink);
white-space: nowrap;
}
.cf-neon-optin-planner .cf-nop-meta {
font-size: 0.875rem;
font-weight: 600;
color: var(--band-ink);
letter-spacing: 0.02em;
}
.cf-neon-optin-planner .cf-nop-meta-right {
text-align: right;
}
/* Broadsheet banner headline & promise */
.cf-neon-optin-planner .cf-nop-hero {
max-width: 56rem;
margin: clamp(24px, 3.8vw, 40px) auto clamp(28px, 4vw, 44px);
text-align: center;
animation: cf-nop-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cf-neon-optin-planner .cf-nop-headline {
margin: 0;
font-family: var(--font-display);
font-size: clamp(1.875rem, 1rem + 3.9vw, 3.875rem);
font-weight: var(--display-weight, 800);
line-height: 1.16;
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
color: var(--band-ink);
text-wrap: balance;
}
.cf-neon-optin-planner .cf-nop-emph {
display: inline;
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
padding: 0 0.16em;
border-radius: 0.08em;
box-decoration-break: clone;
-webkit-box-decoration-break: clone;
}
.cf-neon-optin-planner .cf-nop-promise {
margin: clamp(16px, 2.6vw, 32px) auto 0;
max-width: 60ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
font-weight: 500;
line-height: 1.45;
color: var(--band-ink);
text-wrap: pretty;
}
.cf-neon-optin-planner .cf-nop-aside {
font-style: normal;
font-weight: 400;
color: var(--band-ink);
}
/* Overhanging front-page spread card */
.cf-neon-optin-planner .cf-nop-spread {
position: relative;
z-index: 2;
display: grid;
grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
align-items: start;
background: var(--card, #ffffff);
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(--card-shadow, var(--shadow-lg));
overflow: hidden;
animation: cf-nop-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.07s both;
}
.cf-neon-optin-planner .cf-nop-visual-col {
padding: clamp(16px, 3vw, 32px);
border-right: 1px solid oklch(from var(--ink) l c h / 0.12);
display: flex;
flex-direction: column;
gap: 16px;
min-width: 0;
}
/* Photo frame: the sheet sits in the flow, so the frame grows with its content and never clips it */
.cf-neon-optin-planner .cf-nop-photo-frame {
position: relative;
margin: 0;
width: 100%;
display: grid;
border-radius: 12px;
overflow: hidden;
container-type: inline-size;
background: color-mix(in oklch, var(--ink) 5%, var(--card));
}
.cf-neon-optin-planner .cf-nop-photo-frame::before {
content: "";
grid-area: 1 / 1;
padding-top: 112.5%;
}
.cf-neon-optin-planner .cf-nop-photo {
position: absolute;
inset: 0;
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cf-neon-optin-planner .cf-nop-photo-frame:hover .cf-nop-photo {
transform: scale(1.015);
}
.cf-neon-optin-planner .cf-nop-photo-fallback {
position: absolute;
inset: 0;
background: color-mix(in oklch, var(--ink) 7%, var(--card));
}
/* Live printed typography laid over the blank white paper sheet */
.cf-neon-optin-planner .cf-nop-sheet-overlay {
grid-area: 1 / 1;
position: relative;
z-index: 1;
align-self: center;
padding: 11cqi 13cqi;
pointer-events: none;
}
.cf-neon-optin-planner .cf-nop-sheet-paper {
padding: clamp(14px, 5cqi, 26px) clamp(14px, 5cqi, 24px);
background: oklch(from var(--field, #ffffff) l c h / 0.92);
border-radius: 2px;
box-shadow: var(--shadow-sm, 0 1px 3px oklch(0.22 0.03 260 / 0.2));
color: var(--field-ink, #101828);
transform: rotate(-0.6deg);
}
.cf-neon-optin-planner .cf-nop-sheet-kicker {
font-size: 0.875rem;
font-weight: 700;
line-height: 1.25;
letter-spacing: 0.06em;
text-transform: uppercase;
color: color-mix(in oklch, var(--field-ink, #101828) 72%, var(--field, #ffffff));
margin-bottom: 12px;
}
.cf-neon-optin-planner .cf-nop-sheet-title {
font-family: var(--font-display);
font-size: clamp(1.125rem, 5.4cqi, 1.625rem);
font-weight: var(--display-weight, 800);
line-height: 1.12;
letter-spacing: -0.02em;
color: var(--field-ink, #101828);
text-wrap: balance;
}
.cf-neon-optin-planner .cf-nop-sheet-rule {
height: 2px;
width: 100%;
margin-block: clamp(10px, 2.6cqi, 14px);
background: oklch(from var(--field-ink, #101828) l c h / 0.2);
}
.cf-neon-optin-planner .cf-nop-sheet-sub {
font-size: 0.875rem;
font-weight: 600;
line-height: 1.35;
color: color-mix(in oklch, var(--field-ink, #101828) 78%, var(--field, #ffffff));
text-wrap: pretty;
}
.cf-neon-optin-planner .cf-nop-sheet-week {
margin-top: clamp(12px, 3.2cqi, 18px);
}
.cf-neon-optin-planner .cf-nop-sheet-week-head {
font-family: var(--font-display);
font-size: clamp(0.875rem, 3.4cqi, 1rem);
font-weight: var(--display-weight, 800);
line-height: 1.25;
color: var(--field-ink, #101828);
margin-bottom: 8px;
}
.cf-neon-optin-planner .cf-nop-sheet-meals {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: clamp(4px, 1.2cqi, 7px);
}
.cf-neon-optin-planner .cf-nop-sheet-meals li {
font-size: clamp(0.875rem, 3.3cqi, 1rem);
font-weight: 500;
line-height: 1.35;
color: var(--field-ink, #101828);
text-wrap: pretty;
overflow-wrap: anywhere;
}
.cf-neon-optin-planner .cf-nop-sheet-foot {
margin-top: clamp(10px, 2.4cqi, 14px);
padding-top: 8px;
border-top: 1px solid oklch(from var(--field-ink, #101828) l c h / 0.16);
font-size: 0.875rem;
font-style: normal;
font-weight: 500;
line-height: 1.35;
color: color-mix(in oklch, var(--field-ink, #101828) 76%, var(--field, #ffffff));
text-wrap: pretty;
}
/* Narrow frames (phones): give the sheet more of the photo so the print stays roomy */
@container (max-width: 420px) {
.cf-neon-optin-planner .cf-nop-sheet-overlay {
padding: 9cqi 7cqi;
}
.cf-neon-optin-planner .cf-nop-sheet-paper {
padding: 16px;
transform: none;
}
.cf-neon-optin-planner .cf-nop-sheet-kicker {
letter-spacing: 0.04em;
}
}
/* Signature interaction: 4-week preview tabs */
.cf-neon-optin-planner .cf-nop-weeks {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 8px;
}
.cf-neon-optin-planner .cf-nop-week-tab {
min-height: 44px;
padding: 0 12px;
border-radius: calc(var(--radius, 12px) - 2px);
border: 1px solid oklch(from var(--ink) l c h / 0.14);
background: color-mix(in oklch, var(--ink) 5%, var(--card));
color: var(--ink);
font-family: var(--font-body);
font-size: 0.875rem;
font-weight: 700;
line-height: 1.2;
white-space: nowrap;
cursor: pointer;
transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.cf-neon-optin-planner .cf-nop-week-tab:hover:not(:disabled) {
background: color-mix(in oklch, var(--ink) 9%, var(--card));
border-color: oklch(from var(--ink) l c h / 0.24);
}
.cf-neon-optin-planner .cf-nop-week-tab.is-active {
background: color-mix(in oklch, var(--accent) 11%, var(--card));
border-color: var(--accent);
color: var(--ink);
box-shadow: inset 0 -2px 0 var(--accent);
}
.cf-neon-optin-planner .cf-nop-week-tab:focus-visible {
outline: 3px solid var(--field-focus, var(--accent));
outline-offset: 2px;
}
.cf-neon-optin-planner .cf-nop-week-tab:disabled {
opacity: 0.55;
cursor: not-allowed;
}
.cf-neon-optin-planner .cf-nop-sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Right column: inside points + opt-in form */
.cf-neon-optin-planner .cf-nop-action-col {
padding: clamp(20px, 3vw, 32px);
display: flex;
flex-direction: column;
min-width: 0;
}
.cf-neon-optin-planner .cf-nop-inside-heading {
margin: 0 0 20px;
font-family: var(--font-display);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
font-weight: var(--display-weight, 800);
line-height: 1.15;
letter-spacing: -0.015em;
color: var(--ink);
text-wrap: balance;
}
.cf-neon-optin-planner .cf-nop-inside-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 18px;
}
.cf-neon-optin-planner .cf-nop-inside-item {
display: flex;
align-items: flex-start;
gap: 16px;
}
.cf-neon-optin-planner .cf-nop-spot-wrap {
flex: 0 0 auto;
line-height: 0;
margin-top: 2px;
}
.cf-neon-optin-planner .cf-nop-inside-copy {
min-width: 0;
}
.cf-neon-optin-planner .cf-nop-inside-title {
display: block;
font-size: 1.0625rem;
font-weight: 700;
line-height: 1.3;
color: var(--ink);
}
.cf-neon-optin-planner .cf-nop-inside-detail {
margin: 4px 0 0;
font-size: 0.9375rem;
font-weight: 400;
line-height: 1.45;
color: var(--muted);
text-wrap: pretty;
}
.cf-neon-optin-planner .cf-nop-rule {
width: 100%;
height: 1px;
margin: 24px 0;
border: 0;
background: oklch(from var(--ink) l c h / 0.12);
}
/* Form */
.cf-neon-optin-planner .cf-nop-form {
display: grid;
gap: 16px;
}
.cf-neon-optin-planner .cf-nop-field {
display: grid;
gap: 8px;
}
.cf-neon-optin-planner .cf-nop-label {
font-size: 1.0625rem;
font-weight: 700;
line-height: 1.3;
color: var(--label-ink, var(--ink));
}
.cf-neon-optin-planner .cf-nop-input {
width: 100%;
height: 56px;
padding: 0 16px;
border-radius: var(--field-radius, var(--radius, 12px));
border: 1.5px solid var(--field-border, color-mix(in oklch, var(--ink) 24%, transparent));
background: var(--field, #ffffff);
color: var(--field-ink, #101828);
font-family: var(--font-body);
font-size: 1.0625rem;
font-weight: 500;
line-height: 1.4;
transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cf-neon-optin-planner .cf-nop-input::placeholder {
color: color-mix(in oklch, var(--field-ink, #101828) 65%, var(--field, #ffffff));
opacity: 1;
}
.cf-neon-optin-planner .cf-nop-input:focus {
outline: none;
border-color: var(--field-focus, var(--accent));
box-shadow: 0 0 0 3px oklch(from var(--field-focus, var(--accent)) l c h / 0.35);
}
.cf-neon-optin-planner .cf-nop-input.is-error {
border-color: var(--danger);
}
.cf-neon-optin-planner .cf-nop-input.is-error:focus {
box-shadow: 0 0 0 3px oklch(from var(--danger) l c h / 0.25);
}
.cf-neon-optin-planner .cf-nop-input:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.cf-neon-optin-planner .cf-nop-error {
margin: 0;
padding: 10px 14px;
border-radius: calc(var(--radius, 12px) - 2px);
background: var(--danger-soft);
color: var(--danger);
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
text-wrap: pretty;
}
.cf-neon-optin-planner .cf-nop-inline-icon {
display: inline-block;
vertical-align: -0.16em;
margin-inline-end: 0.42em;
flex-shrink: 0;
}
/* Belcher primary button */
.cf-neon-optin-planner .cf-nop-submit {
display: inline-flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: 64px;
padding: 14px 24px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta)) calc(l + 0.04) c h) 0%,
var(--button-bg-2, oklch(from var(--button-bg, var(--cta)) calc(l - 0.05) c h)) 100%
);
color: var(--button-ink, var(--cta-ink));
font-family: var(--button-font, var(--font-display));
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
font-weight: var(--button-weight, 800);
line-height: 1.15;
text-align: center;
text-transform: var(--button-case, none);
text-shadow: var(--button-text-shadow, none);
text-wrap: balance;
cursor: pointer;
box-shadow: var(
--button-shadow,
inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28),
0 8px 16px -6px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.34)
);
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-neon-optin-planner .cf-nop-submit:hover:not(:disabled),
.cf-neon-optin-planner .cf-nop-submit.is-hover:not(:disabled) {
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta)) calc(l - 0.01) c h) 0%,
oklch(from var(--button-bg, var(--cta)) calc(l - 0.1) c h) 100%
);
transform: translateY(-1px);
box-shadow: var(
--button-shadow,
inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.65),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h),
0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.32),
0 12px 20px -6px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.4)
);
}
.cf-neon-optin-planner .cf-nop-submit:active:not(:disabled),
.cf-neon-optin-planner .cf-nop-submit.is-active:not(:disabled) {
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta)) calc(l - 0.06) c h) 0%,
oklch(from var(--button-bg, var(--cta)) calc(l - 0.12) c h) 100%
);
transform: translateY(1px);
box-shadow: var(
--button-shadow,
inset 0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28),
inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.18) c h),
0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.22)
);
}
.cf-neon-optin-planner .cf-nop-submit:focus-visible {
outline: 3px solid var(--field-focus, var(--accent));
outline-offset: 3px;
}
.cf-neon-optin-planner .cf-nop-submit:disabled {
opacity: 0.56;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.cf-neon-optin-planner .cf-nop-privacy {
margin: 0;
text-align: center;
font-size: 0.9375rem;
font-weight: 500;
line-height: 1.4;
color: var(--muted);
text-wrap: pretty;
}
/* Optional supplied proof quote */
.cf-neon-optin-planner .cf-nop-proof {
margin: 20px 0 0;
padding: 16px 0 0;
border-top: 1px solid oklch(from var(--ink) l c h / 0.12);
}
.cf-neon-optin-planner .cf-nop-proof-quote {
margin: 0;
font-size: 0.9375rem;
font-style: normal;
line-height: 1.5;
color: var(--ink);
text-wrap: pretty;
}
.cf-neon-optin-planner .cf-nop-proof-author {
margin-top: 8px;
font-size: 0.875rem;
font-weight: 700;
color: var(--muted);
}
@keyframes cf-nop-rise {
from {
opacity: 0.82;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Responsive: tablet */
@media (max-width: 880px) {
.cf-neon-optin-planner .cf-nop-spread {
grid-template-columns: minmax(0, 1fr);
}
.cf-neon-optin-planner .cf-nop-visual-col {
border-right: 0;
border-bottom: 1px solid oklch(from var(--ink) l c h / 0.12);
align-items: center;
}
.cf-neon-optin-planner .cf-nop-photo-frame {
max-width: 440px;
margin-inline: auto;
}
.cf-neon-optin-planner .cf-nop-weeks {
width: 100%;
max-width: 440px;
}
}
/* Responsive: phone */
@media (max-width: 600px) {
.cf-neon-optin-planner .cf-nop-masthead {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding-block: 12px;
}
.cf-neon-optin-planner .cf-nop-meta-left {
display: none;
}
.cf-neon-optin-planner .cf-nop-brand {
font-size: 0.875rem;
letter-spacing: 0.1em;
white-space: normal;
}
.cf-neon-optin-planner .cf-nop-meta-right {
text-align: center;
}
.cf-neon-optin-planner .cf-nop-hero {
margin-block: 24px 28px;
}
.cf-neon-optin-planner .cf-nop-headline {
line-height: 1.14;
}
.cf-neon-optin-planner .cf-nop-visual-col {
gap: 12px;
}
.cf-neon-optin-planner .cf-nop-weeks {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cf-neon-optin-planner .cf-nop-inside-heading {
margin-bottom: 16px;
}
.cf-neon-optin-planner .cf-nop-inside-list {
gap: 16px;
}
.cf-neon-optin-planner .cf-nop-inside-item {
gap: 12px;
}
.cf-neon-optin-planner .cf-nop-submit {
min-height: 60px;
padding-inline: 16px;
}
}
@media (prefers-reduced-motion: reduce) {
.cf-neon-optin-planner .cf-nop-hero,
.cf-neon-optin-planner .cf-nop-spread {
animation: none;
}
.cf-neon-optin-planner .cf-nop-photo,
.cf-neon-optin-planner .cf-nop-week-tab,
.cf-neon-optin-planner .cf-nop-input,
.cf-neon-optin-planner .cf-nop-submit {
transition: none;
}
.cf-neon-optin-planner .cf-nop-photo-frame:hover .cf-nop-photo,
.cf-neon-optin-planner .cf-nop-submit:hover:not(:disabled),
.cf-neon-optin-planner .cf-nop-submit:active:not(:disabled) {
transform: none;
}
}
`;
pieces/forms/neon-optin-planner/specimen.tsx 36 lines
import designedPlannerPhoto from "../assets/3fd8ad61c614f670.webp";
import NeonOptinPlanner, { type NeonOptinPlannerProps } from "../neon-optin-planner";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled", "error"] as const;
export default function Specimen({
state = "default",
}: {
state?: NeonOptinPlannerProps["state"];
}) {
return (
<NeonOptinPlanner
state={state}
publicationName="Cobblebrae Kitchen"
editionLabel="Weeknight Sheet"
formatLabel="Free One-Page PDF"
headlineBefore="For busy cooks stuck staring into the fridge "
headlineEmphasis="at 5:30 p.m."
promise="Print one page to get 4 weeks of five-ingredient dinners and a tear-off shopping list."
aside="(Yes, really five ingredients—no secret pantry of twelve.)"
productImage={slot("product", designedPlannerPhoto)}
productImageAlt="Printable Five-Ingredient Weeknight Planner lying on a kitchen counter beside fresh herbs, tomatoes, and a wooden spoon"
sheetKicker="Cobblebrae Kitchen"
sheetTitle="Five-Ingredient Weeknight Planner"
sheetSubtitle="4 Weeks · 20 Dinners · Shopping List"
sheetFooterNote="+ Thu, Fri & tear-off aisle checklist"
insideHeading="Four weeks of dinner, decided in ten seconds"
emailLabel="Where should we send your planner?"
emailPlaceholder="you@example.com"
buttonLabel="Send me the planner"
privacyNote="Free one-page PDF sent straight to your inbox. Unsubscribe in one click."
/>
);
}
| Name | Type | Details |
|---|---|---|
publicationName OptionalNeonOptinPlanner |
string |
Default "Cobblebrae Kitchen"
|
editionLabel OptionalNeonOptinPlanner |
string |
Default "Weeknight Sheet"
|
formatLabel OptionalNeonOptinPlanner |
string |
Default "Free One-Page PDF"
|
headlineBefore OptionalNeonOptinPlanner |
string |
Default "For busy cooks stuck staring into the fridge "
|
headlineEmphasis OptionalNeonOptinPlanner |
string |
Default "at 5:30 p.m."
|
headlineAfter OptionalNeonOptinPlanner |
string |
Default ""
|
promise OptionalNeonOptinPlanner |
string |
Default "Print one page to get 4 weeks of five-ingredient dinners and a tear-off shopping list."
|
aside OptionalNeonOptinPlanner |
string |
Default "(Yes, really five ingredients—no secret pantry of twelve.)"
|
productImage OptionalNeonOptinPlanner |
string |
Default ""
|
productImageAlt OptionalNeonOptinPlanner |
string |
Default "Overhead view of a blank printable weekly dinner planner on a kitchen counter surrounded by fresh herbs and kitchen tools"
|
sheetKicker OptionalNeonOptinPlanner |
string |
Default "Free Kitchen Printable"
|
sheetTitle OptionalNeonOptinPlanner |
string |
Default "Five-Ingredient Weeknight Planner"
|
sheetSubtitle OptionalNeonOptinPlanner |
string |
Default "4 Weeks · 5 Ingredients Max · Shopping List"
|
sheetFooterNote OptionalNeonOptinPlanner |
string |
Default "+ Thu, Fri & tear-off aisle checklist"
|
weeks OptionalNeonOptinPlanner |
NeonOptinPlannerWeek[] |
Default DEFAULT_WEEKS
|
weekSelectorLabel OptionalNeonOptinPlanner |
string |
Default "Preview each week on the dinner planner"
|
insideHeading OptionalNeonOptinPlanner |
string |
Default "Four weeks of dinner, decided in ten seconds"
|
items OptionalNeonOptinPlanner |
NeonOptinPlannerItem[] |
Default DEFAULT_ITEMS
|
emailLabel OptionalNeonOptinPlanner |
string |
Default "Where should we send your planner?"
|
emailPlaceholder OptionalNeonOptinPlanner |
string |
Default "you@example.com"
|
buttonLabel OptionalNeonOptinPlanner |
string |
Default "Yes! Send me the planner"
|
privacyNote OptionalNeonOptinPlanner |
string |
Default "Free PDF sent straight to your inbox. Unsubscribe in one click."
|
emptyEmailError OptionalNeonOptinPlanner |
string |
Default "Enter your email address so we know where to send the planner."
|
invalidEmailError OptionalNeonOptinPlanner |
string |
Default "That doesn't look like a valid email address. Check for a typo and try again."
|
errorPreviewEmail OptionalNeonOptinPlanner |
string |
Default "cook@cobblebrae"
|
weekAnnouncement OptionalNeonOptinPlanner |
string |
Default "{heading}: {meals}"
|
proofQuoteTemplate OptionalNeonOptinPlanner |
string |
Default "“{quote}”"
|
proofAttribution OptionalNeonOptinPlanner |
string |
Default "— {author}"
|
proofAttributionWithRole OptionalNeonOptinPlanner |
string |
Default "— {author}, {role}"
|
proof OptionalNeonOptinPlanner |
NeonOptinPlannerProof |
|
onSubmit OptionalNeonOptinPlanner |
(values: { email: string }) => void |
|
state OptionalNeonOptinPlanner |
"default" | "hover" | "active" | "disabled" | "error" |
Default "default"
|
className OptionalNeonOptinPlanner |
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.
--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-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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
3fd8ad61c614f670.webp
image/webp · 82.1 KB
-
7c36d7f4dd4ae594.webp
image/webp · 26.5 KB
-
d0943b629c0b1324.webp
image/webp · 8.87 KB