Neon Order Block 1
One-page digital course checkout block with a spotlight-lit photo stage, overlapping form card, live order bump, and mobile-collapsible summary.
Use it in a prompt
Use checkout/neon-order-block 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/neon-order-block.tsx. - Import it and pass your copy and images (Props tab):
import { NeonOrderBlock } from "@/components/funneldna/checkout/neon-order-block"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/neon-order-block/component.tsx 1916 lines
// layout: photo-overlap-card
// One-page digital course checkout block with a spotlight-lit photo stage, overlapping form card, live order bump, and mobile-collapsible summary.
import React, { useId, useState } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
import {
AlertCircle,
Check,
ChevronDown,
CreditCard,
Loader2,
Lock,
ShieldCheck,
} from "lucide-react";
import {
AmericanExpress,
Discover,
Mastercard,
Visa,
} from "react-svg-credit-card-payment-icons/icons/flat-rounded";
import { FX_HOST, Spotlight } from "../fx/fx";
export type NeonOrderState =
| "default"
| "hover"
| "active"
| "disabled"
| "error"
| "processing";
export type NeonOrderLineItem = {
/** Visible feature or deliverable title. */
title: string;
/** Short supporting detail under the title. */
detail?: string;
};
export type NeonOrderBump = {
/** Checkbox headline shown inside the yellow bump strip. */
title: string;
/** Bold lead-in phrase inside the bump body. */
leadIn?: string;
/** Concise pitch explaining what the add-on includes. */
pitch: string;
/** One-time numeric price added to the total when ticked. */
price: number;
/** Label shown in the order summary when added. */
summaryTitle?: string;
/** Tag shown when the bump is ticked. */
addedLabel?: string;
/** Tag shown before the bump is ticked. */
addPriceLabel?: string;
/** Link label to remove the bump from the summary list. */
removeLabel?: string;
};
export type NeonOrderFieldCopy = {
fullNameLabel?: string;
fullNamePlaceholder?: string;
emailLabel?: string;
emailPlaceholder?: string;
cardNumberLabel?: string;
cardNumberPlaceholder?: string;
expiryLabel?: string;
expiryPlaceholder?: string;
cvcLabel?: string;
cvcPlaceholder?: string;
};
export type NeonOrderErrorCopy = {
banner?: string;
fullNameRequired?: string;
emailInvalid?: string;
cardNumberInvalid?: string;
expiryInvalid?: string;
cvcInvalid?: string;
};
export type NeonOrderCardLabels = {
visa?: string;
mastercard?: string;
amex?: string;
discover?: string;
};
export type NeonOrderSubmitPayload = {
fullName: string;
email: string;
cardLast4: string;
cardBrand: "visa" | "mastercard" | "amex" | "discover" | "unknown";
expiry: string;
bumpSelected: boolean;
total: number;
};
export type NeonOrderBlockProps = {
/** Main display headline sitting on the dark spotlight photo stage. */
headline?: React.ReactNode;
/** Supporting lead line under the headline. */
lead?: React.ReactNode;
/** Author aside appended after the lead. */
leadAside?: string;
/** Course or digital product name shown in the summary. */
productName?: string;
/** Short subtitle under the product name (format / access note). */
productMeta?: string;
/** Transparent-background product image URL (product slot). */
productImage?: string;
/** Accessible alt text for the product image. */
productImageAlt?: string;
/** Full-bleed dark stage backdrop photo URL (scene slot). */
sceneImage?: string;
/** Accessible alt text for the stage backdrop photo. */
sceneImageAlt?: string;
/** Currency symbol prefixed to formatted prices. */
currencySymbol?: string;
/** Numeric base course price. */
basePrice?: number;
/** Number of days used to compute the per-day price breakdown. */
perDayDays?: number;
/** Template for the per-day line using {total}, {daily}, and {days}. */
perDayTemplate?: string;
/** Deliverables included with the main course. */
lineItems?: NeonOrderLineItem[];
/** Optional bordered order bump panel above the submit button. */
orderBump?: NeonOrderBump;
/** Initial checked state for the order bump (defaults to false). */
defaultBumpSelected?: boolean;
/** Benefit-led heading above contact fields. */
contactHeading?: string;
/** Benefit-led heading above local mock payment fields. */
paymentHeading?: string;
/** Short security reassurance beside the payment heading. */
paymentBadge?: string;
/** Heading for the desktop summary rail. */
summaryHeading?: string;
/** Accessible label for the order items ledger list. */
summaryItemsLabel?: string;
/** Label beside the final total figure. */
summaryTotalLabel?: string;
/** Mobile toggle label when the summary is collapsed. */
summaryToggleShowLabel?: string;
/** Mobile toggle label when the summary is expanded. */
summaryToggleHideLabel?: string;
/** Visible labels and example placeholders for every field. */
fields?: NeonOrderFieldCopy;
/** Validation messages for inline errors. */
errorsCopy?: NeonOrderErrorCopy;
/** Primary order button label (live total appends automatically). */
buttonLabel?: string;
/** Button label shown during the processing state. */
processingLabel?: string;
/** Single plain guarantee sentence displayed near the order button. */
guaranteeText?: string;
/** Accessible group label for the accepted card-network marks. */
cardsLabel?: string;
/** Accessible labels for each accepted card-network mark. */
cardLabels?: NeonOrderCardLabels;
/** Visual and interactive state override for Studio or host control. */
state?: NeonOrderState;
/** Called on valid local submission; never transmits card details. */
onSubmit?: (payload: NeonOrderSubmitPayload) => void;
/** Optional root class for page-level spacing overrides. */
className?: string;
};
type FieldErrors = Partial<
Record<"fullName" | "email" | "cardNumber" | "expiry" | "cvc", string>
>;
const DEFAULT_LINE_ITEMS: NeonOrderLineItem[] = [
{
title: "60 short video lessons",
detail: "Focused 8-minute sessions built around real conversations",
},
{
title: "Weekly speaking drills",
detail: "Guided call-and-response practice to build automatic recall",
},
];
const DEFAULT_BUMP: Required<NeonOrderBump> = {
title: "Add the Pronunciation Drill Pack",
leadIn: "One-time offer:",
pitch:
"Get 18 native-speed audio shadowing tracks to sharpen your accent and cadence during daily walks or commutes.",
price: 27,
summaryTitle: "Pronunciation Drill Pack",
addedLabel: "Added to order",
addPriceLabel: "+$27 one-time",
removeLabel: "Remove",
};
const DEFAULT_FIELDS: Required<NeonOrderFieldCopy> = {
fullNameLabel: "Full name",
fullNamePlaceholder: "Elena Morales",
emailLabel: "Email address",
emailPlaceholder: "elena@example.com",
cardNumberLabel: "Card number",
cardNumberPlaceholder: "4242 4242 4242 4242",
expiryLabel: "Expiration",
expiryPlaceholder: "08 / 28",
cvcLabel: "Security code",
cvcPlaceholder: "482",
};
const DEFAULT_ERRORS: Required<NeonOrderErrorCopy> = {
banner: "Please fix the highlighted fields below before completing your order.",
fullNameRequired: "Enter your full name so we can set up your account.",
emailInvalid: "Enter a valid email address for your course login.",
cardNumberInvalid: "Enter a valid 15 or 16-digit card number.",
expiryInvalid: "Enter an expiry date as MM / YY.",
cvcInvalid: "Enter the 3 or 4-digit security code.",
};
const DEFAULT_CARD_LABELS: Required<NeonOrderCardLabels> = {
visa: "Visa",
mastercard: "Mastercard",
amex: "American Express",
discover: "Discover",
};
export function NeonOrderBlock({
headline = "Start speaking real Spanish in 90 days",
lead = "Get 60 short video lessons and weekly speaking drills built for busy adults.",
leadAside = "(Yes, even if high-school Spanish left you frozen mid-sentence.)",
productName = "90-Day Speaking Course",
productMeta = "Instant digital access · Lifetime updates",
productImage,
productImageAlt = "Course digital workbook and studio audio kit",
sceneImage,
sceneImageAlt = "",
currencySymbol = "$",
basePrice = 197,
perDayDays = 90,
perDayTemplate = "{total} once — about {daily} a day for {days} days",
lineItems = DEFAULT_LINE_ITEMS,
orderBump = DEFAULT_BUMP,
defaultBumpSelected = false,
contactHeading = "Where should we send your course login?",
paymentHeading = "Finish your enrollment",
paymentBadge = "256-bit encrypted checkout",
summaryHeading = "Your 90-day speaking kit",
summaryItemsLabel = "Order items",
summaryTotalLabel = "Total due today",
summaryToggleShowLabel = "Show order summary",
summaryToggleHideLabel = "Hide order summary",
fields,
errorsCopy,
buttonLabel = "Complete my order",
processingLabel = "Processing your order…",
guaranteeText = "Protected by our 30-day money-back guarantee — try the lessons and email us if it’s not right for you.",
cardsLabel = "Accepted payment cards",
cardLabels,
state = "default",
onSubmit,
className,
}: NeonOrderBlockProps) {
const uid = useId();
const prefersReducedMotion = useReducedMotion();
const fieldCopy = { ...DEFAULT_FIELDS, ...fields };
const errCopy = { ...DEFAULT_ERRORS, ...errorsCopy };
const cardNetworkLabels = { ...DEFAULT_CARD_LABELS, ...cardLabels };
const [fullName, setFullName] = useState("");
const [email, setEmail] = useState("");
const [cardNumber, setCardNumber] = useState("");
const [expiry, setExpiry] = useState("");
const [cvc, setCvc] = useState("");
const [bumpSelected, setBumpSelected] = useState(defaultBumpSelected);
const [mobileSummaryOpen, setMobileSummaryOpen] = useState(false);
const [submittedErrors, setSubmittedErrors] = useState<FieldErrors>({});
const [hasUserEditedErrorState, setHasUserEditedErrorState] = useState(false);
const isDisabled = state === "disabled";
const isProcessing = state === "processing";
const isLocked = isDisabled || isProcessing;
const activeErrors: FieldErrors =
state === "error" && !hasUserEditedErrorState
? {
fullName: errCopy.fullNameRequired,
email: errCopy.emailInvalid,
cardNumber: errCopy.cardNumberInvalid,
expiry: errCopy.expiryInvalid,
cvc: errCopy.cvcInvalid,
}
: submittedErrors;
const hasAnyError = Object.keys(activeErrors).length > 0;
const bumpPrice = orderBump ? orderBump.price : 0;
const total = basePrice + (orderBump && bumpSelected ? bumpPrice : 0);
const formattedTotal = formatWholeOrCents(total, currencySymbol);
const formattedBase = formatWholeOrCents(basePrice, currencySymbol);
const formattedBump = formatWholeOrCents(bumpPrice, currencySymbol);
const dailyCost =
perDayDays > 0
? `${currencySymbol}${(total / perDayDays).toFixed(2)}`
: formattedTotal;
const perDayText = perDayTemplate
.replace("{total}", formattedTotal)
.replace("{daily}", dailyCost)
.replace("{days}", String(perDayDays));
const cardDigits = cardNumber.replace(/\D/g, "");
const detectedBrand = detectCardBrand(cardDigits);
const clearFieldError = (key: keyof FieldErrors) => {
if (state === "error" && !hasUserEditedErrorState) {
setHasUserEditedErrorState(true);
}
if (submittedErrors[key]) {
setSubmittedErrors((prev) => {
const next = { ...prev };
delete next[key];
return next;
});
}
};
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (isLocked) return;
const nextErrors: FieldErrors = {};
if (fullName.trim().length < 2) {
nextErrors.fullName = errCopy.fullNameRequired;
}
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.trim())) {
nextErrors.email = errCopy.emailInvalid;
}
if (cardDigits.length < 15 || cardDigits.length > 16) {
nextErrors.cardNumber = errCopy.cardNumberInvalid;
}
if (!isValidExpiry(expiry)) {
nextErrors.expiry = errCopy.expiryInvalid;
}
const cvcDigits = cvc.replace(/\D/g, "");
if (cvcDigits.length < 3 || cvcDigits.length > 4) {
nextErrors.cvc = errCopy.cvcInvalid;
}
setHasUserEditedErrorState(true);
setSubmittedErrors(nextErrors);
if (Object.keys(nextErrors).length > 0) return;
onSubmit?.({
fullName: fullName.trim(),
email: email.trim(),
cardLast4: cardDigits.slice(-4),
cardBrand: detectedBrand,
expiry: expiry.trim(),
bumpSelected: Boolean(orderBump && bumpSelected),
total,
});
};
const summaryPanelId = `${uid}-summary-panel`;
const fullNameId = `${uid}-full-name`;
const emailId = `${uid}-email`;
const cardNumberId = `${uid}-card-number`;
const expiryId = `${uid}-expiry`;
const cvcId = `${uid}-cvc`;
const bumpId = `${uid}-order-bump`;
const bumpAddedLabel = orderBump?.addedLabel ?? DEFAULT_BUMP.addedLabel;
const bumpRemoveLabel = orderBump?.removeLabel ?? DEFAULT_BUMP.removeLabel;
const summaryContent = (
<div className="cf-nob-summary-inner">
<div className="cf-nob-summary-head">
<h3 className="cf-nob-summary-title">{summaryHeading}</h3>
</div>
<div className="cf-nob-product">
{productImage ? (
<div className="cf-nob-product-media">
<img
src={productImage}
alt={productImageAlt}
className="cf-nob-product-img"
width={92}
height={92}
/>
</div>
) : null}
<div className="cf-nob-product-copy">
<p className="cf-nob-product-name">{productName}</p>
{productMeta ? (
<p className="cf-nob-product-meta">{productMeta}</p>
) : null}
</div>
</div>
{lineItems.length > 0 ? (
<ul className="cf-nob-included">
{lineItems.map((item) => (
<li key={item.title} className="cf-nob-included-item">
<span className="cf-nob-check-badge" aria-hidden="true">
<Check size={12} strokeWidth={3} />
</span>
<div className="cf-nob-included-copy">
<span className="cf-nob-included-title">{item.title}</span>
{item.detail ? (
<span className="cf-nob-included-detail">{item.detail}</span>
) : null}
</div>
</li>
))}
</ul>
) : null}
<div className="cf-nob-ledger" aria-label={summaryItemsLabel}>
<div className="cf-nob-ledger-row">
<span className="cf-nob-ledger-label">{productName}</span>
<span className="cf-nob-ledger-price">{formattedBase}</span>
</div>
<AnimatePresence initial={false}>
{orderBump && bumpSelected ? (
<motion.div
key="bump-line"
className="cf-nob-ledger-row cf-nob-ledger-row--bump"
initial={prefersReducedMotion ? false : { opacity: 0, height: 0 }}
animate={{ opacity: 1, height: "auto" }}
exit={prefersReducedMotion ? undefined : { opacity: 0, height: 0 }}
transition={{ duration: prefersReducedMotion ? 0 : 0.22 }}
>
<div className="cf-nob-ledger-bump-info">
<span className="cf-nob-ledger-label">
{orderBump.summaryTitle || orderBump.title}
</span>
{!isLocked ? (
<button
type="button"
className="cf-nob-remove-link"
onClick={() => setBumpSelected(false)}
>
{bumpRemoveLabel}
</button>
) : null}
</div>
<span className="cf-nob-ledger-price">+{formattedBump}</span>
</motion.div>
) : null}
</AnimatePresence>
</div>
<div className="cf-nob-total-box">
<div className="cf-nob-total-row">
<span className="cf-nob-total-label">{summaryTotalLabel}</span>
<span className="cf-nob-total-amount">{formattedTotal}</span>
</div>
<p className="cf-nob-per-day">{perDayText}</p>
</div>
</div>
);
return (
<section
className={["cf-nob", className].filter(Boolean).join(" ")}
aria-labelledby={`${uid}-headline`}
data-state={state}
>
<style>{CSS}</style>
<div className="cf-nob-stage" style={FX_HOST}>
{sceneImage ? (
<img
src={sceneImage}
alt={sceneImageAlt}
className="cf-nob-stage-photo"
aria-hidden={sceneImageAlt === "" ? true : undefined}
/>
) : null}
<div className="cf-nob-stage-scrim" aria-hidden="true" />
<Spotlight />
<div className="cf-nob-stage-inner">
<h2 id={`${uid}-headline`} className="cf-nob-headline">
{headline}
</h2>
{(lead || leadAside) ? (
<p className="cf-nob-lead">
{lead}
{lead && leadAside ? " " : null}
{leadAside ? (
<span className="cf-nob-aside">{leadAside}</span>
) : null}
</p>
) : null}
</div>
</div>
<div className="cf-nob-lower">
<div className="cf-nob-card-wrap">
<div className="cf-nob-card">
{/* Mobile collapsible summary bar above the form */}
<div className="cf-nob-mobile-summary">
<button
type="button"
className="cf-nob-mobile-toggle"
aria-expanded={mobileSummaryOpen}
aria-controls={summaryPanelId}
onClick={() => setMobileSummaryOpen((open) => !open)}
>
<span className="cf-nob-mobile-toggle-left">
{productImage ? (
<img
src={productImage}
alt=""
aria-hidden="true"
className="cf-nob-mobile-thumb"
width={40}
height={40}
/>
) : null}
<span className="cf-nob-mobile-toggle-text">
<span className="cf-nob-mobile-toggle-label">
{mobileSummaryOpen
? summaryToggleHideLabel
: summaryToggleShowLabel}
</span>
<ChevronDown
size={18}
strokeWidth={2.5}
aria-hidden="true"
className={[
"cf-nob-chevron",
mobileSummaryOpen ? "cf-nob-chevron--open" : "",
]
.filter(Boolean)
.join(" ")}
/>
</span>
</span>
<span className="cf-nob-mobile-total">{formattedTotal}</span>
</button>
<AnimatePresence initial={false}>
{mobileSummaryOpen ? (
<motion.div
id={summaryPanelId}
className="cf-nob-mobile-drawer"
initial={
prefersReducedMotion ? false : { opacity: 0, height: 0 }
}
animate={{ opacity: 1, height: "auto" }}
exit={
prefersReducedMotion
? undefined
: { opacity: 0, height: 0 }
}
transition={{ duration: prefersReducedMotion ? 0 : 0.24 }}
>
{summaryContent}
</motion.div>
) : null}
</AnimatePresence>
</div>
<div className="cf-nob-grid">
{/* Main checkout form column */}
<form
className="cf-nob-form"
onSubmit={handleSubmit}
noValidate
aria-busy={isProcessing}
>
{hasAnyError ? (
<div className="cf-nob-error-banner" role="alert">
<AlertCircle
size={18}
strokeWidth={2.5}
aria-hidden="true"
className="cf-nob-error-banner-icon"
/>
<span>{errCopy.banner}</span>
</div>
) : null}
<fieldset className="cf-nob-fieldset" disabled={isLocked}>
<legend className="cf-nob-group-heading">
{contactHeading}
</legend>
<div className="cf-nob-row-2">
<div className="cf-nob-field">
<label htmlFor={fullNameId} className="cf-nob-label">
{fieldCopy.fullNameLabel}
</label>
<input
id={fullNameId}
name="fullName"
type="text"
autoComplete="name"
placeholder={fieldCopy.fullNamePlaceholder}
value={fullName}
onChange={(e) => {
setFullName(e.target.value);
clearFieldError("fullName");
}}
aria-invalid={Boolean(activeErrors.fullName)}
aria-describedby={
activeErrors.fullName
? `${fullNameId}-err`
: undefined
}
className={[
"cf-nob-input",
activeErrors.fullName ? "cf-nob-input--error" : "",
]
.filter(Boolean)
.join(" ")}
/>
{activeErrors.fullName ? (
<p
id={`${fullNameId}-err`}
className="cf-nob-field-error"
role="alert"
>
{activeErrors.fullName}
</p>
) : null}
</div>
<div className="cf-nob-field">
<label htmlFor={emailId} className="cf-nob-label">
{fieldCopy.emailLabel}
</label>
<input
id={emailId}
name="email"
type="email"
autoComplete="email"
placeholder={fieldCopy.emailPlaceholder}
value={email}
onChange={(e) => {
setEmail(e.target.value);
clearFieldError("email");
}}
aria-invalid={Boolean(activeErrors.email)}
aria-describedby={
activeErrors.email ? `${emailId}-err` : undefined
}
className={[
"cf-nob-input",
activeErrors.email ? "cf-nob-input--error" : "",
]
.filter(Boolean)
.join(" ")}
/>
{activeErrors.email ? (
<p
id={`${emailId}-err`}
className="cf-nob-field-error"
role="alert"
>
{activeErrors.email}
</p>
) : null}
</div>
</div>
</fieldset>
<fieldset className="cf-nob-fieldset" disabled={isLocked}>
<div className="cf-nob-payment-head">
<legend className="cf-nob-group-heading">
{paymentHeading}
</legend>
{paymentBadge ? (
<span className="cf-nob-secure-tag">
<Lock
size={16}
strokeWidth={2.5}
aria-hidden="true"
className="cf-nob-inline-icon"
/>
{paymentBadge}
</span>
) : null}
</div>
<div className="cf-nob-field">
<label htmlFor={cardNumberId} className="cf-nob-label">
{fieldCopy.cardNumberLabel}
</label>
<div className="cf-nob-input-wrap">
<input
id={cardNumberId}
name="cardNumber"
type="text"
inputMode="numeric"
autoComplete="cc-number"
placeholder={fieldCopy.cardNumberPlaceholder}
value={cardNumber}
onChange={(e) => {
setCardNumber(formatCardNumber(e.target.value));
clearFieldError("cardNumber");
}}
aria-invalid={Boolean(activeErrors.cardNumber)}
aria-describedby={
activeErrors.cardNumber
? `${cardNumberId}-err`
: undefined
}
className={[
"cf-nob-input cf-nob-input--card",
activeErrors.cardNumber ? "cf-nob-input--error" : "",
]
.filter(Boolean)
.join(" ")}
/>
<span
className="cf-nob-card-icon"
aria-hidden="true"
>
<CreditCard size={18} strokeWidth={2.5} />
</span>
</div>
{activeErrors.cardNumber ? (
<p
id={`${cardNumberId}-err`}
className="cf-nob-field-error"
role="alert"
>
{activeErrors.cardNumber}
</p>
) : null}
</div>
<div className="cf-nob-row-2 cf-nob-row-2--tight">
<div className="cf-nob-field">
<label htmlFor={expiryId} className="cf-nob-label">
{fieldCopy.expiryLabel}
</label>
<input
id={expiryId}
name="expiry"
type="text"
inputMode="numeric"
autoComplete="cc-exp"
placeholder={fieldCopy.expiryPlaceholder}
value={expiry}
onChange={(e) => {
setExpiry(formatExpiry(e.target.value));
clearFieldError("expiry");
}}
aria-invalid={Boolean(activeErrors.expiry)}
aria-describedby={
activeErrors.expiry ? `${expiryId}-err` : undefined
}
className={[
"cf-nob-input",
activeErrors.expiry ? "cf-nob-input--error" : "",
]
.filter(Boolean)
.join(" ")}
/>
{activeErrors.expiry ? (
<p
id={`${expiryId}-err`}
className="cf-nob-field-error"
role="alert"
>
{activeErrors.expiry}
</p>
) : null}
</div>
<div className="cf-nob-field">
<label htmlFor={cvcId} className="cf-nob-label">
{fieldCopy.cvcLabel}
</label>
<input
id={cvcId}
name="cvc"
type="text"
inputMode="numeric"
autoComplete="cc-csc"
placeholder={fieldCopy.cvcPlaceholder}
value={cvc}
onChange={(e) => {
setCvc(e.target.value.replace(/\D/g, "").slice(0, 4));
clearFieldError("cvc");
}}
aria-invalid={Boolean(activeErrors.cvc)}
aria-describedby={
activeErrors.cvc ? `${cvcId}-err` : undefined
}
className={[
"cf-nob-input",
activeErrors.cvc ? "cf-nob-input--error" : "",
]
.filter(Boolean)
.join(" ")}
/>
{activeErrors.cvc ? (
<p
id={`${cvcId}-err`}
className="cf-nob-field-error"
role="alert"
>
{activeErrors.cvc}
</p>
) : null}
</div>
</div>
</fieldset>
{orderBump ? (
<div
className={[
"cf-nob-bump",
bumpSelected ? "cf-nob-bump--checked" : "",
isLocked ? "cf-nob-bump--disabled" : "",
]
.filter(Boolean)
.join(" ")}
>
<label htmlFor={bumpId} className="cf-nob-bump-strip">
<input
id={bumpId}
type="checkbox"
className="cf-nob-bump-checkbox"
checked={bumpSelected}
disabled={isLocked}
onChange={(e) => setBumpSelected(e.target.checked)}
/>
<span className="cf-nob-bump-check" aria-hidden="true">
{bumpSelected ? (
<Check size={14} strokeWidth={3} />
) : null}
</span>
<span className="cf-nob-bump-title">
{orderBump.title}
</span>
<span
className={[
"cf-nob-bump-tag",
bumpSelected ? "cf-nob-bump-tag--added" : "",
]
.filter(Boolean)
.join(" ")}
>
{bumpSelected
? bumpAddedLabel
: orderBump.addPriceLabel || `+${formattedBump}`}
</span>
</label>
<p className="cf-nob-bump-body">
{orderBump.leadIn ? (
<strong className="cf-nob-bump-leadin">
{orderBump.leadIn}{" "}
</strong>
) : null}
{orderBump.pitch}
</p>
</div>
) : null}
<div className="cf-nob-actions">
<button
type="submit"
disabled={isLocked}
data-cta-state={state}
className="cf-nob-submit"
>
{isProcessing ? (
<span className="cf-nob-submit-loading">
<Loader2
size={20}
strokeWidth={2.5}
aria-hidden="true"
className="cf-nob-spinner"
/>
<span>{processingLabel}</span>
</span>
) : (
<span>
{buttonLabel} — {formattedTotal}
</span>
)}
</button>
{guaranteeText ? (
<p className="cf-nob-guarantee">
<ShieldCheck
size={16}
strokeWidth={2.5}
aria-hidden="true"
className="cf-nob-guarantee-icon"
/>
{guaranteeText}
</p>
) : null}
<div
className="cf-nob-cards"
role="group"
aria-label={cardsLabel}
>
<span
className={[
"cf-nob-card-mark",
detectedBrand === "visa"
? "cf-nob-card-mark--active"
: "",
]
.filter(Boolean)
.join(" ")}
>
<Visa
width={40}
height={26}
aria-label={cardNetworkLabels.visa}
/>
</span>
<span
className={[
"cf-nob-card-mark",
detectedBrand === "mastercard"
? "cf-nob-card-mark--active"
: "",
]
.filter(Boolean)
.join(" ")}
>
<Mastercard
width={40}
height={26}
aria-label={cardNetworkLabels.mastercard}
/>
</span>
<span
className={[
"cf-nob-card-mark",
detectedBrand === "amex"
? "cf-nob-card-mark--active"
: "",
]
.filter(Boolean)
.join(" ")}
>
<AmericanExpress
width={40}
height={26}
aria-label={cardNetworkLabels.amex}
/>
</span>
<span
className={[
"cf-nob-card-mark",
detectedBrand === "discover"
? "cf-nob-card-mark--active"
: "",
]
.filter(Boolean)
.join(" ")}
>
<Discover
width={40}
height={26}
aria-label={cardNetworkLabels.discover}
/>
</span>
</div>
</div>
</form>
{/* Desktop summary rail inside the card as a quiet neutral well */}
<aside className="cf-nob-summary-rail" aria-label={summaryHeading}>
{summaryContent}
</aside>
</div>
</div>
</div>
</div>
</section>
);
}
export default NeonOrderBlock;
function formatWholeOrCents(amount: number, symbol: string): string {
const isWhole = Math.abs(amount - Math.round(amount)) < 0.005;
return isWhole
? `${symbol}${Math.round(amount)}`
: `${symbol}${amount.toFixed(2)}`;
}
function formatCardNumber(raw: string): string {
const digits = raw.replace(/\D/g, "").slice(0, 16);
return digits.replace(/(.{4})/g, "$1 ").trim();
}
function formatExpiry(raw: string): string {
const digits = raw.replace(/\D/g, "").slice(0, 4);
if (digits.length <= 2) return digits;
return `${digits.slice(0, 2)} / ${digits.slice(2)}`;
}
function isValidExpiry(value: string): boolean {
const digits = value.replace(/\D/g, "");
if (digits.length !== 4) return false;
const month = Number(digits.slice(0, 2));
return month >= 1 && month <= 12;
}
function detectCardBrand(
digits: string
): "visa" | "mastercard" | "amex" | "discover" | "unknown" {
if (digits.startsWith("4")) return "visa";
if (/^(5[1-5]|2[2-7])/.test(digits)) return "mastercard";
if (/^3[47]/.test(digits)) return "amex";
if (/^(6011|65|64[4-9])/.test(digits)) return "discover";
return "unknown";
}
const CSS = `
.cf-nob {
position: relative;
width: 100%;
background: var(--surface, oklch(1 0 none));
color: var(--ink, oklch(0.21 0.034 263));
font-family: var(--font-body, 'Open Sans', Arial, sans-serif);
overflow-x: clip;
}
.cf-nob *,
.cf-nob *::before,
.cf-nob *::after {
box-sizing: border-box;
}
/* Upper full-bleed dark photo stage with Spotlight */
.cf-nob-stage {
position: relative;
width: 100%;
background: var(--band, oklch(0.27 0.067 256));
color: var(--band-ink, oklch(1 0 none));
padding: clamp(56px, 7.5vw, 96px) clamp(16px, 5vw, 48px) clamp(132px, 14vw, 176px);
overflow: hidden;
}
.cf-nob-stage-photo {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center 42%;
pointer-events: none;
z-index: 0;
}
.cf-nob-stage-scrim {
position: absolute;
inset: 0;
background: linear-gradient(
180deg,
oklch(from var(--band, oklch(0.27 0.067 256)) calc(l - 0.04) c h / 0.78) 0%,
oklch(from var(--band, oklch(0.27 0.067 256)) calc(l - 0.05) c h / 0.88) 65%,
var(--band, oklch(0.27 0.067 256)) 100%
);
pointer-events: none;
z-index: 0;
}
.cf-nob-stage-inner {
position: relative;
z-index: 2;
max-width: 780px;
margin: 0 auto;
text-align: center;
}
.cf-nob-headline {
margin: 0;
font-family: var(--font-display, 'Open Sans', Arial, sans-serif);
font-size: clamp(2rem, 4.2vw, 3.25rem);
line-height: 1.06;
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
color: var(--band-ink, oklch(1 0 none));
text-wrap: balance;
}
.cf-nob-lead {
margin: 16px auto 0;
max-width: 58ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.45;
font-weight: 500;
color: oklch(from var(--band-ink, oklch(1 0 none)) l c h / 0.9);
text-wrap: pretty;
}
.cf-nob-aside {
font-style: normal;
font-weight: 400;
color: var(--band-ink, oklch(1 0 none));
}
/* Lower surface & overlapping checkout card */
.cf-nob-lower {
position: relative;
z-index: 3;
padding: 0 clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 112px);
}
.cf-nob-card-wrap {
max-width: 1080px;
margin: calc(-1 * clamp(92px, 10vw, 128px)) auto 0;
position: relative;
}
/* Floor shadow grounding the overlapping stage card */
.cf-nob-card-wrap::after {
content: "";
position: absolute;
left: 6%;
right: 6%;
bottom: -14px;
height: 22px;
border-radius: 999px;
background: oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.2);
filter: blur(12px);
pointer-events: none;
z-index: 0;
}
.cf-nob-card {
position: relative;
z-index: 1;
background: var(--card, oklch(1 0 none));
color: var(--ink, oklch(0.21 0.034 263));
border: 1px solid var(--card-border, oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.14));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 256 / 0.22), 0 12px 24px -8px oklch(0.22 0.03 256 / 0.32)));
overflow: hidden;
}
.cf-nob-grid {
display: grid;
grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.88fr);
align-items: stretch;
}
/* Form column */
.cf-nob-form {
padding: clamp(24px, 3.2vw, 36px);
display: flex;
flex-direction: column;
gap: 24px;
min-width: 0;
}
.cf-nob-error-banner {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 12px 16px;
border-radius: var(--radius, 12px);
background: var(--danger-soft, oklch(0.93 0.024 27));
color: var(--danger, oklch(0.5 0.17 27));
border: 1px solid oklch(from var(--danger, oklch(0.5 0.17 27)) l c h / 0.28);
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
}
.cf-nob-error-banner-icon {
flex: 0 0 auto;
margin-top: 2px;
}
.cf-nob-fieldset {
border: 0;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 16px;
min-width: 0;
}
.cf-nob-payment-head {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: 8px 16px;
}
.cf-nob-group-heading {
padding: 0;
margin: 0;
font-family: var(--font-display, 'Open Sans', Arial, sans-serif);
font-size: clamp(1.25rem, 1.8vw, 1.5rem);
line-height: 1.18;
font-weight: 800;
letter-spacing: -0.015em;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-secure-tag {
font-size: 0.875rem;
line-height: 1.3;
font-weight: 600;
color: var(--muted, oklch(0.45 0.03 258));
}
.cf-nob-inline-icon {
display: inline-block;
vertical-align: -0.18em;
margin-inline-end: 0.35em;
color: var(--success, oklch(0.5 0.138 150));
}
.cf-nob-row-2 {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.cf-nob-field {
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
}
.cf-nob-label {
font-size: 1rem;
line-height: 1.25;
font-weight: 700;
color: var(--label-ink, var(--ink, oklch(0.21 0.034 263)));
}
.cf-nob-input-wrap {
position: relative;
}
.cf-nob-input {
width: 100%;
height: 56px;
padding: 0 16px;
border-radius: var(--field-radius, var(--radius, 12px));
border: 1px solid var(--field-border, color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 22%, transparent));
background: var(--field, oklch(1 0 none));
color: var(--field-ink, oklch(0.21 0.034 263));
font-family: var(--font-body, 'Open Sans', Arial, sans-serif);
font-size: 1.0625rem;
line-height: 1.2;
font-weight: 500;
font-variant-numeric: tabular-nums;
transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cf-nob-input--card {
padding-inline-end: 46px;
}
.cf-nob-card-icon {
position: absolute;
right: 14px;
top: 50%;
transform: translateY(-50%);
color: color-mix(in oklch, var(--field-ink, oklch(0.21 0.034 263)) 52%, var(--field, oklch(1 0 none)));
pointer-events: none;
display: inline-flex;
}
.cf-nob-input::placeholder {
color: color-mix(in oklch, var(--field-ink, oklch(0.21 0.034 263)) 65%, var(--field, oklch(1 0 none)));
opacity: 1;
}
.cf-nob-input:focus-visible {
outline: none;
border-color: var(--field-focus, var(--accent, oklch(0.5 0.17 257)));
box-shadow: 0 0 0 3px oklch(from var(--field-focus, var(--accent, oklch(0.5 0.17 257))) l c h / 0.35);
}
.cf-nob-input--error {
border-color: var(--danger, oklch(0.5 0.17 27));
}
.cf-nob-input--error:focus-visible {
border-color: var(--danger, oklch(0.5 0.17 27));
box-shadow: 0 0 0 3px oklch(from var(--danger, oklch(0.5 0.17 27)) l c h / 0.3);
}
.cf-nob-input:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.cf-nob-field-error {
margin: 0;
font-size: 0.875rem;
line-height: 1.35;
font-weight: 600;
color: var(--danger, oklch(0.5 0.17 27));
}
/* Order bump panel: classic DR yellow tokens */
.cf-nob-bump {
border-radius: var(--radius, 12px);
background: var(--bump, oklch(0.975 0.04 95));
color: var(--bump-ink, oklch(0.21 0.034 263));
border: 2px solid oklch(from var(--bump-ink, oklch(0.21 0.034 263)) l c h / 0.28);
overflow: hidden;
transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cf-nob-bump--checked {
border-color: var(--success, oklch(0.5 0.138 150));
}
.cf-nob-bump--disabled {
opacity: 0.6;
}
.cf-nob-bump-strip {
position: relative;
display: flex;
align-items: center;
gap: 12px;
min-height: 52px;
padding: 12px 16px;
background: var(--bump-strip, oklch(0.93 0.111 95));
color: var(--bump-ink, oklch(0.21 0.034 263));
cursor: pointer;
user-select: none;
}
.cf-nob-bump--disabled .cf-nob-bump-strip {
cursor: not-allowed;
}
.cf-nob-bump-checkbox {
position: absolute;
opacity: 0;
width: 1px;
height: 1px;
margin: 0;
}
.cf-nob-bump-check {
flex: 0 0 auto;
width: 22px;
height: 22px;
border-radius: 6px;
background: var(--field, oklch(1 0 none));
border: 2px solid oklch(from var(--bump-ink, oklch(0.21 0.034 263)) l c h / 0.5);
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--card, oklch(1 0 none));
transition: background-color 0.16s ease, border-color 0.16s ease;
}
.cf-nob-bump-checkbox:checked + .cf-nob-bump-check {
background: var(--success, oklch(0.5 0.138 150));
border-color: var(--success, oklch(0.5 0.138 150));
}
.cf-nob-bump-checkbox:focus-visible + .cf-nob-bump-check {
outline: 3px solid oklch(from var(--field-focus, var(--accent, oklch(0.5 0.17 257))) l c h / 0.45);
outline-offset: 1px;
}
.cf-nob-bump-title {
flex: 1 1 auto;
font-family: var(--font-display, 'Open Sans', Arial, sans-serif);
font-size: 1rem;
line-height: 1.25;
font-weight: 800;
color: var(--bump-ink, oklch(0.21 0.034 263));
}
.cf-nob-bump-tag {
flex: 0 0 auto;
padding: 4px 12px;
border-radius: 999px;
font-size: 0.875rem;
line-height: 1.2;
font-weight: 800;
font-variant-numeric: tabular-nums;
background: oklch(from var(--bump-ink, oklch(0.21 0.034 263)) l c h / 0.1);
color: var(--bump-ink, oklch(0.21 0.034 263));
}
.cf-nob-bump-tag--added {
background: var(--success, oklch(0.5 0.138 150));
color: var(--card, oklch(1 0 none));
}
.cf-nob-bump-body {
margin: 0;
padding: 14px 16px 16px;
font-size: 0.9375rem;
line-height: 1.5;
color: var(--bump-ink, oklch(0.21 0.034 263));
text-wrap: pretty;
}
.cf-nob-bump-leadin {
font-weight: 800;
}
/* Primary Belcher submit button & trust row */
.cf-nob-actions {
display: flex;
flex-direction: column;
gap: 16px;
}
.cf-nob-submit {
width: 100%;
min-height: 68px;
padding: 14px 28px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l + 0.04) c h),
var(--button-bg-2, oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.05) c h))
);
color: var(--button-ink, var(--cta-ink, oklch(1 0 none)));
font-family: var(--button-font, var(--font-display, 'Open Sans', Arial, sans-serif));
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-variant-numeric: tabular-nums;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(
--button-shadow,
inset 0 1px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.28),
0 8px 16px -6px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.36)
);
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-nob-submit:hover:not(:disabled),
.cf-nob-submit[data-cta-state="hover"]:not(:disabled) {
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.01) c h),
oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.09) c h)
);
transform: translateY(-1px);
box-shadow: var(
--button-shadow,
inset 0 1px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l + 0.12) c h / 0.65),
inset 0 -3px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.18) c h),
0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.3),
0 12px 20px -6px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.42)
);
}
.cf-nob-submit:active:not(:disabled),
.cf-nob-submit[data-cta-state="active"]:not(:disabled) {
transform: translateY(1px);
background: linear-gradient(
180deg,
oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.06) c h),
oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.12) c h)
);
box-shadow:
inset 0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.28),
inset 0 -1px 0 oklch(from var(--button-bg, var(--cta, oklch(0.58 0.21 29))) calc(l - 0.18) c h),
0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.24);
}
.cf-nob-submit:focus-visible {
outline: none;
box-shadow:
0 0 0 3px var(--card, oklch(1 0 none)),
0 0 0 6px var(--field-focus, var(--accent, oklch(0.5 0.17 257)));
}
.cf-nob-submit:disabled {
opacity: 0.62;
cursor: not-allowed;
transform: none;
box-shadow: var(--shadow-sm, 0 1px 2px oklch(0.22 0.03 256 / 0.18));
}
.cf-nob-submit-loading {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
}
.cf-nob-spinner {
animation: cf-nob-spin 0.8s linear infinite;
}
@keyframes cf-nob-spin {
to {
transform: rotate(360deg);
}
}
.cf-nob-guarantee {
margin: 0;
text-align: center;
font-size: 0.9375rem;
line-height: 1.45;
font-weight: 500;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
.cf-nob-guarantee-icon {
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: 0.4em;
color: var(--success, oklch(0.5 0.138 150));
}
.cf-nob-cards {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 8px;
}
.cf-nob-card-mark {
display: inline-flex;
align-items: center;
border-radius: 5px;
opacity: 0.86;
transition: opacity 0.16s ease, transform 0.16s ease;
}
.cf-nob-card-mark--active {
opacity: 1;
transform: translateY(-1px);
}
/* Desktop summary rail (quiet neutral well, never card-in-a-card) */
.cf-nob-summary-rail {
background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 4%, var(--card, oklch(1 0 none)));
border-left: 1px solid oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.1);
padding: clamp(24px, 3.2vw, 36px);
display: flex;
flex-direction: column;
min-width: 0;
}
.cf-nob-summary-inner {
display: flex;
flex-direction: column;
gap: 24px;
}
.cf-nob-summary-title {
margin: 0;
font-family: var(--font-display, 'Open Sans', Arial, sans-serif);
font-size: clamp(1.25rem, 1.8vw, 1.5rem);
line-height: 1.18;
font-weight: 800;
letter-spacing: -0.015em;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-product {
display: flex;
align-items: flex-start;
gap: 16px;
}
.cf-nob-product-media {
flex: 0 0 auto;
width: 88px;
height: 88px;
display: flex;
align-items: center;
justify-content: center;
}
.cf-nob-product-img {
width: 100%;
height: 100%;
object-fit: contain;
border-radius: 0;
filter:
drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.25))
drop-shadow(0 10px 14px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.2));
}
.cf-nob-product-copy {
flex: 1 1 auto;
min-width: 0;
}
.cf-nob-product-name {
margin: 0;
font-family: var(--font-display, 'Open Sans', Arial, sans-serif);
font-size: 1.125rem;
line-height: 1.25;
font-weight: 800;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-product-meta {
margin: 6px 0 0;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--muted, oklch(0.45 0.03 258));
}
.cf-nob-included {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 12px;
}
.cf-nob-included-item {
display: flex;
align-items: flex-start;
gap: 12px;
}
.cf-nob-check-badge {
flex: 0 0 auto;
width: 20px;
height: 20px;
margin-top: 2px;
border-radius: 999px;
background: var(--success, oklch(0.5 0.138 150));
color: var(--card, oklch(1 0 none));
display: inline-flex;
align-items: center;
justify-content: center;
}
.cf-nob-included-copy {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.cf-nob-included-title {
font-size: 0.9375rem;
line-height: 1.35;
font-weight: 700;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-included-detail {
font-size: 0.875rem;
line-height: 1.4;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
.cf-nob-ledger {
display: flex;
flex-direction: column;
gap: 12px;
padding-top: 16px;
border-top: 1px solid oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.12);
}
.cf-nob-ledger-row {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
overflow: hidden;
}
.cf-nob-ledger-bump-info {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.cf-nob-ledger-label {
font-size: 0.9375rem;
line-height: 1.35;
font-weight: 600;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-ledger-price {
flex: 0 0 auto;
font-size: 0.9375rem;
line-height: 1.35;
font-weight: 800;
font-variant-numeric: tabular-nums;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-remove-link {
border: 0;
padding: 0;
background: transparent;
font-family: inherit;
font-size: 0.875rem;
font-weight: 600;
color: var(--ink, oklch(0.21 0.034 263));
text-decoration: underline;
text-decoration-color: oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.45);
text-underline-offset: 0.18em;
cursor: pointer;
}
.cf-nob-remove-link:hover {
text-decoration-color: currentColor;
}
.cf-nob-total-box {
padding: 16px;
border-radius: 10px;
background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 5%, var(--card, oklch(1 0 none)));
}
.cf-nob-total-row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.cf-nob-total-label {
font-size: 1rem;
line-height: 1.25;
font-weight: 700;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-total-amount {
font-family: var(--font-display, 'Open Sans', Arial, sans-serif);
font-size: clamp(2rem, 3vw, 2.5rem);
line-height: 1;
font-weight: 800;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-per-day {
margin: 12px 0 0;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
/* Mobile collapsible summary bar */
.cf-nob-mobile-summary {
display: none;
}
@media (max-width: 860px) {
.cf-nob-stage {
padding: 48px 16px 112px;
}
.cf-nob-card-wrap {
margin-top: -76px;
}
.cf-nob-grid {
grid-template-columns: minmax(0, 1fr);
}
.cf-nob-summary-rail {
display: none;
}
.cf-nob-mobile-summary {
display: block;
background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 4%, var(--card, oklch(1 0 none)));
border-bottom: 1px solid oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.12);
}
.cf-nob-mobile-toggle {
width: 100%;
min-height: 60px;
padding: 12px 20px;
border: 0;
background: transparent;
color: var(--ink, oklch(0.21 0.034 263));
font-family: var(--font-body, 'Open Sans', Arial, sans-serif);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
cursor: pointer;
text-align: left;
}
.cf-nob-mobile-toggle:focus-visible {
outline: 2px solid var(--field-focus, var(--accent, oklch(0.5 0.17 257)));
outline-offset: -2px;
}
.cf-nob-mobile-toggle-left {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.cf-nob-mobile-thumb {
flex: 0 0 auto;
width: 40px;
height: 40px;
object-fit: contain;
border-radius: 0;
filter: drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 256)) l c h / 0.25));
}
.cf-nob-mobile-toggle-text {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.9375rem;
font-weight: 700;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-chevron {
flex: 0 0 auto;
transition: transform 0.2s ease;
}
.cf-nob-chevron--open {
transform: rotate(180deg);
}
.cf-nob-mobile-total {
flex: 0 0 auto;
font-family: var(--font-display, 'Open Sans', Arial, sans-serif);
font-size: 1.25rem;
font-weight: 800;
font-variant-numeric: tabular-nums;
color: var(--ink, oklch(0.21 0.034 263));
}
.cf-nob-mobile-drawer {
overflow: hidden;
border-top: 1px solid oklch(from var(--ink, oklch(0.21 0.034 263)) l c h / 0.1);
}
.cf-nob-mobile-drawer .cf-nob-summary-inner {
padding: 20px;
}
.cf-nob-mobile-drawer .cf-nob-summary-head {
display: none;
}
.cf-nob-form {
padding: 20px;
}
}
@media (max-width: 560px) {
.cf-nob-row-2:not(.cf-nob-row-2--tight) {
grid-template-columns: minmax(0, 1fr);
}
.cf-nob-bump-strip {
flex-wrap: wrap;
gap: 8px 10px;
}
.cf-nob-bump-tag {
margin-inline-start: 32px;
}
}
@media (prefers-reduced-motion: reduce) {
.cf-nob-submit,
.cf-nob-input,
.cf-nob-bump,
.cf-nob-bump-check,
.cf-nob-card-mark,
.cf-nob-chevron {
transition: none;
}
.cf-nob-spinner {
animation: none;
}
}
`;
pieces/checkout/neon-order-block/specimen.tsx 78 lines
import __studioImage5b035d91 from "../assets/4f0933b7044fc0ca.webp";
import __studioImage8e48d628 from "../assets/730a2fa2eb3c9028.webp";
import React from "react";
import NeonOrderBlock, { type NeonOrderState } from "../neon-order-block";
import { slot } from "../../slots";
import defaults from "../../studio-defaults.json";
export const states = [
"default",
"hover",
"active",
"disabled",
"error",
"processing",
] as const;
export default function NeonOrderBlockSpecimen({
state = "default",
}: {
state?: NeonOrderState;
}) {
const productImage = slot(
"product",
__studioImage5b035d91
);
const sceneImage = slot(
"scene",
__studioImage8e48d628
);
return (
<NeonOrderBlock
headline="Start speaking real Spanish in 90 days"
lead="Unlock 60 short video lessons and weekly speaking drills designed for busy adults."
leadAside="(Yes, even if high-school Spanish left you frozen mid-sentence.)"
productName="90-Day Speaking Course"
productMeta="Tessera Spanish · Instant digital access"
productImage={productImage}
productImageAlt="Tessera Spanish 90-Day Speaking Course digital lessons and studio headphones"
sceneImage={sceneImage}
sceneImageAlt=""
currencySymbol="$"
basePrice={197}
perDayDays={90}
perDayTemplate="{total} once — about {daily} a day for {days} days"
lineItems={[
{
title: "60 short video lessons",
detail: "Focused 8-minute sessions built around everyday conversations",
},
{
title: "Weekly speaking drills",
detail: "Guided call-and-response practice to build automatic recall",
},
]}
orderBump={{
title: "Add the Pronunciation Drill Pack",
leadIn: "One-time offer:",
pitch:
"Add 18 native-speed audio shadowing tracks to sharpen your accent and rhythm during daily walks or commutes.",
price: 27,
summaryTitle: "Pronunciation Drill Pack",
addedLabel: "Added to order",
addPriceLabel: "+$27 one-time",
removeLabel: "Remove",
}}
contactHeading="Where should we send your course login?"
paymentHeading="Finish your enrollment"
paymentBadge="256-bit encrypted checkout"
summaryHeading="Your 90-day speaking kit"
summaryTotalLabel="Total due today"
buttonLabel="Complete my order"
guaranteeText={`Protected by our ${defaults.sample.guarantee.toLowerCase()} — try the lessons and email us if it’s not right for you.`}
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalNeonOrderBlock |
React.ReactNode |
Default "Start speaking real Spanish in 90 days"
|
lead OptionalNeonOrderBlock |
React.ReactNode |
Default "Get 60 short video lessons and weekly speaking drills built for busy adults."
|
leadAside OptionalNeonOrderBlock |
string |
Default "(Yes, even if high-school Spanish left you frozen mid-sentence.)"
|
productName OptionalNeonOrderBlock |
string |
Default "90-Day Speaking Course"
|
productMeta OptionalNeonOrderBlock |
string |
Default "Instant digital access · Lifetime updates"
|
productImage OptionalNeonOrderBlock |
string |
|
productImageAlt OptionalNeonOrderBlock |
string |
Default "Course digital workbook and studio audio kit"
|
sceneImage OptionalNeonOrderBlock |
string |
|
sceneImageAlt OptionalNeonOrderBlock |
string |
Default ""
|
currencySymbol OptionalNeonOrderBlock |
string |
Default "$"
|
basePrice OptionalNeonOrderBlock |
number |
Default 197
|
perDayDays OptionalNeonOrderBlock |
number |
Default 90
|
perDayTemplate OptionalNeonOrderBlock |
string |
Default "{total} once — about {daily} a day for {days} days"
|
lineItems OptionalNeonOrderBlock |
NeonOrderLineItem[] |
Default DEFAULT_LINE_ITEMS
|
orderBump OptionalNeonOrderBlock |
NeonOrderBump |
Default DEFAULT_BUMP
|
defaultBumpSelected OptionalNeonOrderBlock |
boolean |
Default false
|
contactHeading OptionalNeonOrderBlock |
string |
Default "Where should we send your course login?"
|
paymentHeading OptionalNeonOrderBlock |
string |
Default "Finish your enrollment"
|
paymentBadge OptionalNeonOrderBlock |
string |
Default "256-bit encrypted checkout"
|
summaryHeading OptionalNeonOrderBlock |
string |
Default "Your 90-day speaking kit"
|
summaryItemsLabel OptionalNeonOrderBlock |
string |
Default "Order items"
|
summaryTotalLabel OptionalNeonOrderBlock |
string |
Default "Total due today"
|
summaryToggleShowLabel OptionalNeonOrderBlock |
string |
Default "Show order summary"
|
summaryToggleHideLabel OptionalNeonOrderBlock |
string |
Default "Hide order summary"
|
fields OptionalNeonOrderBlock |
NeonOrderFieldCopy |
|
errorsCopy OptionalNeonOrderBlock |
NeonOrderErrorCopy |
|
buttonLabel OptionalNeonOrderBlock |
string |
Default "Complete my order"
|
processingLabel OptionalNeonOrderBlock |
string |
Default "Processing your order…"
|
guaranteeText OptionalNeonOrderBlock |
string |
Default "Protected by our 30-day money-back guarantee — try the lessons and email us if it’s not right for you."
|
cardsLabel OptionalNeonOrderBlock |
string |
Default "Accepted payment cards"
|
cardLabels OptionalNeonOrderBlock |
NeonOrderCardLabels |
|
state OptionalNeonOrderBlock |
NeonOrderState |
Default "default"
|
onSubmit OptionalNeonOrderBlock |
(payload: NeonOrderSubmitPayload) => void |
|
className OptionalNeonOrderBlock |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--card-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).
scene- A wide atmosphere photo behind or beside the copy.
-
4f0933b7044fc0ca.webp
image/webp · 46.7 KB
-
730a2fa2eb3c9028.webp
image/webp · 44 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB