Entitlement Activation 1
Entitlement activation: an access "front page" lists everything the buyer just unlocked (ready now or
Use it in a prompt
Use checkout/entitlement-activation 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/checkout/entitlement-activation.tsx. - Import it and pass your copy and images (Props tab):
import { EntitlementActivation } from "@/components/funneldna/checkout/entitlement-activation"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/entitlement-activation/component.tsx 583 lines
// layout: advertorial-front
// Entitlement activation: an access "front page" lists everything the buyer just unlocked (ready now or
// unlocking later) beside a sticky activate-your-account card, so they claim access before they leave.
import * as React from "react";
import { AlertCircle, Check, Clock, Eye, EyeOff, Lock, Package } from "lucide-react";
import { Divider, FX_HOST, Spot } from "../fx/fx";
import torn from "../fx/dividers/torn";
import book from "../fx/spots/book";
import calendar from "../fx/spots/calendar";
import gift from "../fx/spots/gift";
import lock from "../fx/spots/lock";
import phone from "../fx/spots/phone";
import play from "../fx/spots/play";
export type EntitlementItem = {
name: string;
/** Format line under the name, e.g. "Workbook · printable" */
format?: string;
/** "ready" opens now; "scheduled" unlocks later */
status?: "ready" | "scheduled";
/** Overrides the default chip label, e.g. "Unlocks in 7 days" */
statusLabel?: string;
/** Product thumbnail (slot item-n) */
image?: string;
imageAlt?: string;
/** Clay illustration (an imported fx spot asset) used when there is no image */
spot?: string;
};
export type EntitlementNote = {
title: React.ReactNode;
body: React.ReactNode;
/** Clay illustration (an imported fx spot asset) shown beside the note */
spot?: string;
};
export type EntitlementActivationValues = { email: string; password: string };
export type EntitlementActivationCopy = {
/** "{ready}" and "{total}" become the item counts */
ledgerTitle: string;
readyLabel: string;
scheduledLabel: string;
cardTitle: string;
cardDeck: string;
progressLabel: string;
stepDone: string;
stepNow: string;
emailLabel: string;
emailPlaceholder: string;
passwordLabel: string;
passwordPlaceholder: string;
showPassword: string;
hidePassword: string;
emailError: string;
/** "{min}" becomes the minimum password length */
passwordError: string;
button: string;
/** Second line inside the button */
buttonSub: string;
reassurance: string;
login: string;
};
export type EntitlementActivationProps = {
/** Newspaper-style name at the top of the front page */
masthead?: string;
/** Short dateline facts beside the masthead */
dateline?: string[];
headline?: React.ReactNode;
/** Phrase inside a string headline that gets the highlight colour */
highlight?: string;
lead?: React.ReactNode;
/** Full-bleed scene behind the masthead (slot: scene) */
sceneImage?: string;
sceneAlt?: string;
items?: EntitlementItem[];
/** Short "what to open first" notes in a full-width row under the ledger and card */
notes?: EntitlementNote[];
copy?: Partial<EntitlementActivationCopy>;
/** Prefills the email field (the address used to order) */
email?: string;
minPasswordLength?: number;
onSubmit?: (values: EntitlementActivationValues) => void;
/** Shows an "already activated" log-in link when set */
loginHref?: string;
disabled?: boolean;
state?: "default" | "hover" | "active" | "disabled" | "error";
className?: string;
};
export function EntitlementActivation(props: EntitlementActivationProps) {
const {
masthead = DEFAULT_MASTHEAD,
dateline = DEFAULT_DATELINE,
headline = DEFAULT_HEADLINE,
highlight = DEFAULT_HIGHLIGHT,
lead = DEFAULT_LEAD,
sceneImage,
sceneAlt = "",
items = DEFAULT_ITEMS,
notes = DEFAULT_NOTES,
email = "",
minPasswordLength = 8,
onSubmit,
loginHref,
disabled = false,
state = "default",
className,
} = props;
const copy: EntitlementActivationCopy = { ...DEFAULT_COPY, ...props.copy };
const uid = React.useId();
const id = (part: string) => `${uid}-${part}`;
const total = items.length;
const ready = items.filter((item) => item.status !== "scheduled").length;
const locked = disabled || state === "disabled";
const emailRef = React.useRef<HTMLInputElement>(null);
const passwordRef = React.useRef<HTMLInputElement>(null);
const [values, setValues] = React.useState<EntitlementActivationValues>({ email, password: "" });
const [errors, setErrors] = React.useState<FieldErrors>(() =>
state === "error" ? validate({ email, password: "" }, minPasswordLength, copy) : {},
);
const [showPassword, setShowPassword] = React.useState(false);
React.useEffect(() => {
setValues((current) => ({ ...current, email }));
setErrors(state === "error" ? validate({ email, password: "" }, minPasswordLength, copy) : {});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [email, state]);
const update = (field: keyof EntitlementActivationValues) => (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value;
setValues((current) => ({ ...current, [field]: value }));
if (errors[field]) setErrors((current) => ({ ...current, [field]: undefined }));
};
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (locked) return;
const next = validate(values, minPasswordLength, copy);
setErrors(next);
if (next.email) {
emailRef.current?.focus();
return;
}
if (next.password) {
passwordRef.current?.focus();
return;
}
onSubmit?.({ email: values.email.trim(), password: values.password });
};
const buttonClass = `ea-btn${state === "hover" ? " is-hover" : ""}${state === "active" ? " is-active" : ""}`;
return (
<section
className={`cf-entitlement-activation${className ? ` ${className}` : ""}`}
aria-labelledby={id("headline")}
>
<style>{CSS}</style>
<div className="ea-hero" style={FX_HOST}>
{sceneImage ? (
<img
className="ea-scene"
src={sceneImage}
alt={sceneAlt}
aria-hidden={sceneAlt ? undefined : true}
width={1600}
height={900}
/>
) : null}
<div className="ea-scrim" aria-hidden="true" />
<div className="ea-wrap">
<header className="ea-mast">
<p className="ea-masthead">{masthead}</p>
{dateline.length ? (
<ul className="ea-dateline">
{dateline.map((fact, index) => (
<li key={`${fact}-${index}`}>{fact}</li>
))}
</ul>
) : null}
</header>
<div className="ea-lede">
<div>
<h2 className="ea-headline" id={id("headline")}>
{withEmphasis(headline, highlight)}
</h2>
{lead ? <p className="ea-lead">{lead}</p> : null}
</div>
</div>
</div>
<Divider shape="torn" src={torn} tone="surface" height={56} />
</div>
<div className="ea-paper">
<div className="ea-grid">
<div className="ea-main">
<h3 className="ea-ledger-title">{fill(copy.ledgerTitle, { ready, total })}</h3>
<ul className="ea-ledger">
{items.map((item, index) => {
const later = item.status === "scheduled";
return (
<li className="ea-row" key={`${item.name}-${index}`}>
<span className="ea-thumb">
{item.image ? (
<img src={item.image} alt={item.imageAlt ?? item.name} width={56} height={56} loading="lazy" />
) : item.spot ? (
<Spot src={item.spot} size={56} />
) : (
<span className="ea-thumb-icon" aria-hidden="true">
<Package size={24} strokeWidth={2.5} />
</span>
)}
</span>
<span className="ea-copy">
<span className="ea-name">{item.name}</span>
{item.format ? <span className="ea-format">{item.format}</span> : null}
</span>
<span className={`ea-status ${later ? "is-later" : "is-ready"}`}>
{later ? (
<Clock size={16} strokeWidth={2.5} aria-hidden="true" />
) : (
<span className="ea-badge" aria-hidden="true">
<Check size={12} strokeWidth={3} />
</span>
)}
{item.statusLabel ?? (later ? copy.scheduledLabel : copy.readyLabel)}
</span>
</li>
);
})}
</ul>
</div>
<div className="ea-card" role="region" aria-labelledby={id("card")}>
<div className="ea-card-head">
<h3 id={id("card")}>{copy.cardTitle}</h3>
<p>{copy.cardDeck}</p>
</div>
<div className="ea-card-body">
<ol className="ea-steps" aria-label={copy.progressLabel}>
<li className="ea-step is-done">
<span className="ea-track" aria-hidden="true">
<span className="ea-fill" />
</span>
<span className="ea-step-label">
<span className="ea-badge" aria-hidden="true">
<Check size={11} strokeWidth={3} />
</span>
{copy.stepDone}
</span>
</li>
<li className="ea-step is-now" aria-current="step">
<span className="ea-track" aria-hidden="true">
<span className="ea-fill" />
</span>
<span className="ea-step-label">{copy.stepNow}</span>
</li>
</ol>
<form noValidate onSubmit={handleSubmit}>
<div className="ea-field">
<label className="ea-label" htmlFor={id("email")}>
{copy.emailLabel}
</label>
<input
ref={emailRef}
id={id("email")}
className="ea-input"
type="email"
name="email"
inputMode="email"
autoComplete="email"
placeholder={copy.emailPlaceholder}
value={values.email}
onChange={update("email")}
aria-invalid={Boolean(errors.email)}
aria-describedby={errors.email ? id("email-error") : undefined}
disabled={locked}
required
/>
{errors.email ? (
<p className="ea-error" id={id("email-error")}>
<AlertCircle className="ea-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{errors.email}
</p>
) : null}
</div>
<div className="ea-field">
<label className="ea-label" htmlFor={id("password")}>
{copy.passwordLabel}
</label>
<div className="ea-pass">
<input
ref={passwordRef}
id={id("password")}
className="ea-input"
type={showPassword ? "text" : "password"}
name="password"
autoComplete="new-password"
placeholder={copy.passwordPlaceholder}
value={values.password}
onChange={update("password")}
minLength={minPasswordLength}
aria-invalid={Boolean(errors.password)}
aria-describedby={errors.password ? id("password-error") : undefined}
disabled={locked}
required
/>
<button
type="button"
className="ea-toggle"
aria-pressed={showPassword}
aria-label={showPassword ? copy.hidePassword : copy.showPassword}
onClick={() => setShowPassword((visible) => !visible)}
disabled={locked}
>
{showPassword ? (
<EyeOff size={20} strokeWidth={2.5} aria-hidden="true" />
) : (
<Eye size={20} strokeWidth={2.5} aria-hidden="true" />
)}
</button>
</div>
{errors.password ? (
<p className="ea-error" id={id("password-error")}>
<AlertCircle className="ea-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{errors.password}
</p>
) : null}
</div>
<button type="submit" className={buttonClass} disabled={locked}>
<span className="ea-btn-main">{copy.button}</span>
<span className="ea-btn-sub">{copy.buttonSub}</span>
</button>
</form>
<p className="ea-reassure">
<Lock className="ea-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.reassurance}
</p>
{loginHref ? (
<p className="ea-login">
<a href={loginHref}>{copy.login}</a>
</p>
) : null}
</div>
</div>
</div>
{notes.length ? (
<ul className="ea-notes">
{notes.map((note, index) => (
<li className={`ea-note${note.spot ? " has-spot" : ""}`} key={index}>
{note.spot ? (
<span className="ea-note-art">
<Spot src={note.spot} size={56} />
</span>
) : null}
<div className="ea-note-copy">
<h3>{note.title}</h3>
<p>{note.body}</p>
</div>
</li>
))}
</ul>
) : null}
</div>
</section>
);
}
export default EntitlementActivation;
type FieldErrors = { email?: string; password?: string };
const DEFAULT_MASTHEAD = "Your Access Edition";
const DEFAULT_DATELINE = ["Access reserved", "One step left"];
const DEFAULT_HEADLINE = "Everything you just unlocked is ready. Claim it now.";
const DEFAULT_HIGHLIGHT = "Claim it now.";
const DEFAULT_LEAD = "Set your password once and every item below opens in your account.";
const DEFAULT_ITEMS: EntitlementItem[] = [
{ name: "The main program", format: "Online lessons · start anytime", status: "ready", spot: book },
{ name: "Your bonus downloads", format: "Templates and printables", status: "ready", spot: gift },
{
name: "Live session replay",
format: "Video · watch online",
status: "scheduled",
statusLabel: "Unlocks after the session",
spot: play,
},
];
const DEFAULT_NOTES: EntitlementNote[] = [
{
title: "One password opens everything",
body: "Log in once and every item on this page is waiting in your account.",
spot: lock,
},
{
title: "New items arrive on their own",
body: "Anything marked with a date unlocks in your account automatically.",
spot: calendar,
},
{
title: "Pick up on any device",
body: "Use the same email and password on your phone, tablet or laptop.",
spot: phone,
},
];
const DEFAULT_COPY: EntitlementActivationCopy = {
ledgerTitle: "{ready} of {total} are ready the minute you log in",
readyLabel: "Ready now",
scheduledLabel: "Unlocks soon",
cardTitle: "Activate your account in one step",
cardDeck: "Set a password and everything on this page opens.",
progressLabel: "Your progress",
stepDone: "Access reserved",
stepNow: "Set your login",
emailLabel: "Email address",
emailPlaceholder: "you@example.com",
passwordLabel: "Create a password",
passwordPlaceholder: "At least 8 characters",
showPassword: "Show password",
hidePassword: "Hide password",
emailError: "Enter a valid email address.",
passwordError: "Use at least {min} characters.",
button: "Activate My Account",
buttonSub: "Instant access on any device",
reassurance: "Secure login · Nothing extra to pay",
login: "Already activated? Log in",
};
function validate(values: EntitlementActivationValues, min: number, copy: EntitlementActivationCopy): FieldErrors {
const errors: FieldErrors = {};
if (!isEmail(values.email)) errors.email = copy.emailError;
if (values.password.length < min) errors.password = fill(copy.passwordError, { min });
return errors;
}
function isEmail(value: string) {
const text = value.trim();
const at = text.indexOf("@");
const dot = text.lastIndexOf(".");
return at > 0 && text.indexOf("@", at + 1) === -1 && dot > at + 1 && dot < text.length - 1 && !text.includes(" ");
}
function fill(template: string, vars: Record<string, string | number>) {
return Object.keys(vars).reduce((text, key) => text.split(`{${key}}`).join(String(vars[key])), template);
}
function withEmphasis(text: React.ReactNode, phrase?: string) {
if (typeof text !== "string" || !phrase) return text;
const start = text.indexOf(phrase);
if (start < 0) return text;
return (
<>
{text.slice(0, start)}
<span className="ea-emph">{phrase}</span>
{text.slice(start + phrase.length)}
</>
);
}
const CSS = `
.cf-entitlement-activation{--ea-gutter:clamp(16px,5vw,48px);--ea-card-w:400px;--ea-gap:clamp(32px,5vw,72px);--ea-lift:clamp(132px,14vw,208px);--ea-hair:oklch(from var(--ink) l c h / .14);--ea-subhead:color-mix(in oklab,var(--cta) 55%,var(--ink));--ea-emph:oklch(from var(--marker,#fae37c) max(l,.86) c h);--ea-shadow:var(--shadow,oklch(.22 .03 260));position:relative;background:var(--surface);color:var(--ink);font-family:var(--font-body);overflow-x:clip}
.cf-entitlement-activation *,.cf-entitlement-activation *::before,.cf-entitlement-activation *::after{box-sizing:border-box}
.cf-entitlement-activation .ea-hero{position:relative;isolation:isolate;background:var(--band);color:var(--band-ink);padding:clamp(40px,6vw,72px) var(--ea-gutter) calc(clamp(56px,7vw,96px) + 56px)}
.cf-entitlement-activation .ea-scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 40%;z-index:-2}
.cf-entitlement-activation .ea-scrim{position:absolute;inset:0;z-index:-1;background:oklch(from var(--band) l c h / .8)}
.cf-entitlement-activation .ea-wrap{position:relative;z-index:1;max-width:1120px;margin-inline:auto}
.cf-entitlement-activation .ea-mast{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:12px 24px;padding-bottom:16px;border-bottom:1px solid oklch(from var(--band-ink) l c h / .32)}
.cf-entitlement-activation .ea-masthead{margin:0;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-.01em;text-transform:var(--display-case,none)}
.cf-entitlement-activation .ea-dateline{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 0;font-size:.9375rem;font-weight:600;line-height:1.4}
.cf-entitlement-activation .ea-dateline li{display:inline-flex;align-items:center}
.cf-entitlement-activation .ea-dateline li+li::before{content:"";width:4px;height:4px;border-radius:50%;background:currentColor;margin-inline:12px}
.cf-entitlement-activation .ea-lede{display:grid;grid-template-columns:minmax(0,1fr) var(--ea-card-w);gap:var(--ea-gap);padding-top:clamp(28px,3.5vw,48px)}
.cf-entitlement-activation .ea-headline{margin:0 0 16px;font-family:var(--font-display);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);text-wrap:balance}
.cf-entitlement-activation .ea-emph{color:var(--ea-emph)}
.cf-entitlement-activation .ea-lead{margin:0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-entitlement-activation .ea-paper{padding:0 var(--ea-gutter) clamp(64px,8.5vw,120px)}
.cf-entitlement-activation .ea-grid{max-width:1120px;margin-inline:auto;display:grid;grid-template-columns:minmax(0,1fr) var(--ea-card-w);grid-template-areas:"main card";column-gap:var(--ea-gap);align-items:start}
.cf-entitlement-activation .ea-main{grid-area:main;min-width:0;padding-top:clamp(32px,4vw,48px)}
.cf-entitlement-activation .ea-ledger-title{margin:0 0 16px;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-.01em;text-wrap:balance}
.cf-entitlement-activation .ea-ledger{list-style:none;margin:0;padding:0}
.cf-entitlement-activation .ea-row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:16px;align-items:start;padding:16px 0;border-bottom:1px solid var(--ea-hair)}
.cf-entitlement-activation .ea-row:first-child{border-top:1px solid var(--ea-hair)}
.cf-entitlement-activation .ea-thumb{display:block;width:56px;height:56px}
.cf-entitlement-activation .ea-thumb img{display:block;width:56px;height:56px;object-fit:cover;border-radius:8px}
.cf-entitlement-activation .ea-thumb-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:8px;background:color-mix(in oklch,var(--ink) 6%,var(--surface));color:var(--ink)}
.cf-entitlement-activation .ea-copy{display:grid;gap:4px;min-width:0;padding-top:4px}
.cf-entitlement-activation .ea-name{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3;color:var(--ink);text-wrap:pretty}
.cf-entitlement-activation .ea-format{font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-entitlement-activation .ea-status{display:inline-flex;align-items:center;gap:8px;min-height:30px;margin-top:4px;padding:4px 12px 4px 6px;border-radius:999px;font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
.cf-entitlement-activation .ea-status.is-ready{background:var(--success-soft);color:var(--success)}
.cf-entitlement-activation .ea-status.is-later{padding-left:10px;background:color-mix(in oklch,var(--ink) 6%,var(--surface));color:var(--ink)}
.cf-entitlement-activation .ea-badge{display:inline-grid;place-items:center;flex:none;width:20px;height:20px;border-radius:50%;background:var(--success);color:var(--status-glyph,#fff)}
.cf-entitlement-activation .ea-notes{list-style:none;max-width:1120px;margin:clamp(48px,6vw,72px) auto 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:32px clamp(24px,3vw,48px)}
.cf-entitlement-activation .ea-note{display:grid;align-content:start;gap:16px;min-width:0}
.cf-entitlement-activation .ea-note-art{display:block;width:56px;height:56px}
.cf-entitlement-activation .ea-note-copy{min-width:0}
.cf-entitlement-activation .ea-note h3{margin:0 0 8px;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-.01em;text-transform:var(--display-case,none);color:var(--ink);text-wrap:balance}
.cf-entitlement-activation .ea-note p{margin:0;max-width:60ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-entitlement-activation .ea-card{grid-area:card;position:sticky;top:24px;z-index:2;margin-top:calc(-1 * var(--ea-lift));background:var(--card);color:var(--ink);border:1px solid var(--card-border,color-mix(in oklch,var(--accent) 28%,var(--card)));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg));overflow:hidden}
.cf-entitlement-activation .ea-card-head{padding:24px clamp(20px,3vw,32px);background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-entitlement-activation .ea-card-head h3{margin:0 0 8px;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-.01em;text-wrap:balance}
.cf-entitlement-activation .ea-card-head p{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:500;line-height:1.4;text-wrap:pretty}
.cf-entitlement-activation .ea-card-body{padding:24px clamp(20px,3vw,32px) clamp(20px,3vw,28px)}
.cf-entitlement-activation .ea-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.cf-entitlement-activation .ea-track{display:block;height:6px;margin-bottom:8px;border-radius:999px;background:color-mix(in oklch,var(--ink) 10%,var(--card));overflow:hidden}
.cf-entitlement-activation .ea-fill{display:block;height:100%;border-radius:inherit;transform-origin:left center}
.cf-entitlement-activation .is-done .ea-fill{background:var(--success)}
.cf-entitlement-activation .is-now .ea-fill{width:50%;background:var(--accent-fill,var(--accent));animation:ea-fill .6s cubic-bezier(.2,.7,.2,1) .2s both}
.cf-entitlement-activation .ea-step-label{display:block;font-size:.9375rem;font-weight:700;line-height:1.35;color:var(--ink);text-wrap:pretty}
.cf-entitlement-activation .ea-step-label .ea-badge{width:18px;height:18px;vertical-align:-4px;margin-inline-end:.4em}
.cf-entitlement-activation .ea-field{display:grid;gap:8px;margin-top:20px}
.cf-entitlement-activation .ea-label{font-size:1rem;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-entitlement-activation .ea-input{width:100%;min-height:56px;padding:0 16px;font-family:var(--font-body);font-size:1.0625rem;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));transition:border-color .16s ease,box-shadow .16s ease}
.cf-entitlement-activation .ea-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-entitlement-activation .ea-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink) 40%,transparent)}
.cf-entitlement-activation .ea-input:focus-visible{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 / .35)}
.cf-entitlement-activation .ea-input[aria-invalid="true"]{border-color:var(--danger)}
.cf-entitlement-activation .ea-input[aria-invalid="true"]:focus-visible{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-entitlement-activation .ea-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink) 6%,var(--field))}
.cf-entitlement-activation .ea-pass{position:relative}
.cf-entitlement-activation .ea-pass .ea-input{padding-right:56px}
.cf-entitlement-activation .ea-toggle{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:8px;background:transparent;color:color-mix(in oklch,var(--field-ink) 70%,var(--field));cursor:pointer;transition:background .16s ease,color .16s ease}
.cf-entitlement-activation .ea-toggle:hover:not(:disabled){background:color-mix(in oklch,var(--field-ink) 8%,var(--field));color:var(--field-ink)}
.cf-entitlement-activation .ea-toggle:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:1px}
.cf-entitlement-activation .ea-toggle:disabled{cursor:not-allowed}
.cf-entitlement-activation .ea-error{margin:0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
.cf-entitlement-activation .ea-inline-icon{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-entitlement-activation .ea-btn{width:100%;margin-top:24px;min-height:72px;padding:10px 28px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;cursor:pointer;text-align:center;color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));text-transform:var(--button-case,none);border-radius:var(--button-radius,var(--radius,12px));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) 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(--ea-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--ea-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-entitlement-activation .ea-btn:hover:not(:disabled),.cf-entitlement-activation .ea-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)) calc(l - .07) 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(--ea-shadow) l c h / .35),0 10px 18px -6px oklch(from var(--ea-shadow) l c h / .55))}
.cf-entitlement-activation .ea-btn:active:not(:disabled),.cf-entitlement-activation .ea-btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .03) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .09) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h / .45),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--ea-shadow) l c h / .3)}
.cf-entitlement-activation .ea-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px}
.cf-entitlement-activation .ea-btn:disabled{cursor:not-allowed;transform:none;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
.cf-entitlement-activation .ea-btn-main{font-size:clamp(1.125rem,1.55vw,1.375rem);font-weight:var(--button-weight,800);line-height:1.15}
.cf-entitlement-activation .ea-btn-sub{font-family:var(--font-body);font-size:.9375rem;font-weight:600;line-height:1.3;text-transform:none;letter-spacing:0;text-wrap:pretty}
.cf-entitlement-activation .ea-reassure{margin:16px 0 0;text-align:center;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-entitlement-activation .ea-login{margin:8px 0 0;text-align:center;font-size:.9375rem;line-height:1.4}
.cf-entitlement-activation .ea-login a{color:var(--link,var(--accent));font-weight:700;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em}
.cf-entitlement-activation .ea-login a:hover{color:oklch(from var(--link,var(--accent)) calc(l - .08) c h);text-decoration-color:currentColor}
.cf-entitlement-activation .ea-login a:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:2px;border-radius:4px}
@keyframes ea-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ea-fill{from{transform:scaleX(.3)}to{transform:scaleX(1)}}
.cf-entitlement-activation .ea-lede>div,.cf-entitlement-activation .ea-card,.cf-entitlement-activation .ea-row,.cf-entitlement-activation .ea-note{animation:ea-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-entitlement-activation .ea-card{animation-delay:.07s}
.cf-entitlement-activation .ea-row:nth-child(2){animation-delay:.07s}
.cf-entitlement-activation .ea-row:nth-child(3){animation-delay:.14s}
.cf-entitlement-activation .ea-row:nth-child(4){animation-delay:.21s}
.cf-entitlement-activation .ea-row:nth-child(n+5){animation-delay:.28s}
@media (max-width:960px){
.cf-entitlement-activation .ea-lede{grid-template-columns:minmax(0,1fr)}
.cf-entitlement-activation .ea-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"card" "main"}
.cf-entitlement-activation .ea-card{position:relative;top:auto;margin-top:-40px;width:100%}
.cf-entitlement-activation .ea-main{padding-top:48px}
.cf-entitlement-activation .ea-notes{grid-template-columns:minmax(0,1fr);gap:24px;margin-top:48px}
.cf-entitlement-activation .ea-note.has-spot{grid-template-columns:56px minmax(0,1fr);gap:16px;align-items:start}
}
@media (max-width:560px){
.cf-entitlement-activation .ea-mast{flex-direction:column;align-items:flex-start;gap:12px}
.cf-entitlement-activation .ea-dateline{gap:8px}
.cf-entitlement-activation .ea-dateline li{min-height:28px;padding:4px 12px;border-radius:999px;font-size:.875rem;background:oklch(from var(--band-ink) l c h / .12)}
.cf-entitlement-activation .ea-dateline li+li::before{display:none}
.cf-entitlement-activation .ea-row{grid-template-columns:56px minmax(0,1fr);gap:12px 16px}
.cf-entitlement-activation .ea-status{grid-column:2;justify-self:start;margin-top:0}
.cf-entitlement-activation .ea-card-head{padding:20px}
.cf-entitlement-activation .ea-card-body{padding:20px}
}
@media (prefers-reduced-motion:reduce){
.cf-entitlement-activation .ea-lede>div,.cf-entitlement-activation .ea-card,.cf-entitlement-activation .ea-row,.cf-entitlement-activation .ea-note,.cf-entitlement-activation .ea-fill,.cf-entitlement-activation .is-now .ea-fill{animation:none}
.cf-entitlement-activation .ea-btn,.cf-entitlement-activation .ea-input,.cf-entitlement-activation .ea-toggle{transition:none}
.cf-entitlement-activation .ea-btn:active:not(:disabled),.cf-entitlement-activation .ea-btn.is-active{transform:none}
}
`;
pieces/checkout/entitlement-activation/specimen.tsx 75 lines
import __studioImagece39641b from "../assets/09cf6851aa6a1709.webp";
import * as React from "react";
import { EntitlementActivation, type EntitlementActivationProps, type EntitlementItem } from "../entitlement-activation";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import play from "../../fx/spots/play";
import pin from "../../fx/spots/pin";
import book from "../../fx/spots/book";
import rocket from "../../fx/spots/rocket";
export const states = ["default", "hover", "active", "disabled", "error"];
const FORMATS = ["Step-by-step guide · PDF", "Fill-in workbook · printable", "Printable launch checklist"];
export default function EntitlementActivationSpecimen({ state = "default" }: { state?: EntitlementActivationProps["state"] }) {
const sample = defaults.sample;
const items: EntitlementItem[] = [
...sample.items.map((item, index) => ({
name: item.name,
format: FORMATS[index],
status: "ready" as const,
image: slot(`item-${index + 1}`, item.image),
imageAlt: item.imageAlt,
})),
{
name: `${sample.registration.name} replay`,
format: "Video replay · watch online",
status: "scheduled" as const,
statusLabel: "Unlocks in 7 days",
spot: play,
},
];
return (
<EntitlementActivation
state={state}
masthead={sample.name}
dateline={["Order FSK-20417", `Paid in full · ${sample.price}`, "One step left"]}
headline="Your kit is paid for. Claim it in one step."
highlight="Claim it in one step."
lead="Set a password and your guide, workbook and checklist open on any device."
sceneImage={slot(
"scene",
__studioImagece39641b,
)}
items={items}
notes={[
{
title: "Map your offer tonight",
body: "Open the Funnel Planning Guide first and sketch every page your funnel needs.",
spot: pin,
},
{
title: "Write while it’s fresh",
body: "The Page Copy Workbook takes you from headline to call to action, one blank at a time.",
spot: book,
},
{
title: "Launch without the nerves",
body: "Run the Launch Checklist before you publish and catch broken links and forms early.",
spot: rocket,
},
]}
email={state === "error" ? "dana@example" : "dana@example.com"}
loginHref="#log-in"
copy={{
cardTitle: "Claim your kit in one step",
cardDeck: "Your order is paid. Set a password to open everything.",
stepDone: "Order paid",
stepNow: "Set your login",
buttonSub: "3 items open instantly",
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
masthead OptionalEntitlementActivation |
string |
|
dateline OptionalEntitlementActivation |
string[] |
|
headline OptionalEntitlementActivation |
React.ReactNode |
|
highlight OptionalEntitlementActivation |
string |
|
lead OptionalEntitlementActivation |
React.ReactNode |
|
sceneImage OptionalEntitlementActivation |
string |
|
sceneAlt OptionalEntitlementActivation |
string |
|
items OptionalEntitlementActivation |
EntitlementItem[] |
|
notes OptionalEntitlementActivation |
EntitlementNote[] |
|
copy OptionalEntitlementActivation |
Partial<EntitlementActivationCopy> |
|
email OptionalEntitlementActivation |
string |
|
minPasswordLength OptionalEntitlementActivation |
number |
|
onSubmit OptionalEntitlementActivation |
(values: EntitlementActivationValues) => void |
|
loginHref OptionalEntitlementActivation |
string |
|
disabled OptionalEntitlementActivation |
boolean |
|
state OptionalEntitlementActivation |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalEntitlementActivation |
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-bg--button-2-ink--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.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
scene- A wide atmosphere photo behind or beside the copy.
-
09bc3d4486616844.webp
image/webp · 23.2 KB
-
09cf6851aa6a1709.webp
image/webp · 67.8 KB
-
0d114386aa55e8d2.webp
image/webp · 15.6 KB
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
4788bc008c79471c.webp
image/webp · 13.9 KB
-
63571cb07acc4626.webp
image/webp · 17.3 KB
-
839cc020060f63a3.webp
image/webp · 9.49 KB
-
9a2ebdab5ff4fcc4.webp
image/webp · 3.64 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
bc3d360c88eeac0e.webp
image/webp · 23.9 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d7814fce240ddf0e.webp
image/webp · 17.6 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB