Offer Equation 1
Offer equation for upsells: what they already own (light half) + what they can add (dark half) = one named, priced system, then a guarantee tick and the action, so the add-on reads as completing their purchase, not starting a new one.
Use it in a prompt
Use offer/offer-equation 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/offer/offer-equation.tsx. - Import it and pass your copy and images (Props tab):
import { OfferEquation } from "@/components/funneldna/offer/offer-equation"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/offer-equation/component.tsx 736 lines
// layout: split-contrast
// Offer equation for upsells: what they already own (light half) + what they can add (dark half) = one named, priced system, then a guarantee tick and the action, so the add-on reads as completing their purchase, not starting a new one.
import React, { useEffect, useId, useRef, useState } from "react";
import { AlertCircle, Check, Equal, Lock, Plus } from "lucide-react";
import { FX_HOST, Spotlight } from "../fx/fx";
export type OfferEquationItem = {
/** Short status chip above the item, e.g. "Already in your order" */
tag?: string;
name: string;
/** One line on what this piece does for them */
role: string;
/** Slot item-1 / item-2: a product shot on a transparent background */
image?: string;
imageAlt?: string;
};
export type OfferEquationProps = {
headline?: React.ReactNode;
/** Phrase inside a string headline swiped with the marker highlight */
highlight?: string;
lead?: string;
/** The item they already have (light half) */
have?: OfferEquationItem;
/** The item they can add today (dark half) */
add?: OfferEquationItem;
/** The complete system the two make together */
resultName?: string;
resultLine?: string;
/** Today's price; hidden when empty */
price?: string;
priceNote?: string;
/** What the supplied alternative costs; hidden when empty */
alternativePrice?: string;
alternativeLabel?: string;
vsLabel?: string;
/** Guarantee line the visitor ticks before the action; hidden when empty */
commitLabel?: string;
/** Shown when the action is pressed with the line unticked */
commitError?: string;
buttonLabel?: string;
buttonNote?: string;
declineLabel?: string;
declineHref?: string;
onDecline?: () => void;
href?: string;
onAction?: () => void;
disabled?: boolean;
/** Accessible names for the + and = signs */
plusLabel?: string;
equalsLabel?: string;
state?: "default" | "hover" | "active" | "disabled" | "error";
className?: string;
};
export function OfferEquation({
headline = "You have the book. Now add the course that puts it to work.",
highlight = "puts it to work",
lead = "The book gives you the plan. The course walks you through it, one short lesson at a time.",
have = { tag: "Already in your order", name: "The book", role: "Your step-by-step plan." },
add = { tag: "Add it today", name: "The course", role: "Short lessons that walk you through the plan." },
resultName = "The complete system",
resultLine = "The plan and the help to follow it, together.",
price = "",
priceNote = "",
alternativePrice = "",
alternativeLabel = "",
vsLabel = "vs.",
commitLabel = "",
commitError = "Tick the box to confirm, then press the button again.",
buttonLabel = "Yes! Add It To My Order",
buttonNote = "",
declineLabel = "No thanks, I'll keep my order as it is",
declineHref,
onDecline,
href,
onAction,
disabled = false,
plusLabel = "plus",
equalsLabel = "equals",
state = "default",
className,
}: OfferEquationProps) {
const uid = useId();
const titleId = `${uid}-title`;
const errorId = `${uid}-error`;
const noteId = `${uid}-note`;
const inputRef = useRef<HTMLInputElement>(null);
const [ticked, setTicked] = useState(state !== "error");
const [showError, setShowError] = useState(state === "error");
useEffect(() => {
setTicked(state !== "error");
setShowError(state === "error");
}, [state]);
const isDisabled = disabled || state === "disabled";
const gated = Boolean(commitLabel);
const handleAction = (e: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
e.preventDefault();
return;
}
if (gated && !ticked) {
e.preventDefault();
setShowError(true);
inputRef.current?.focus();
return;
}
onAction?.();
};
const btnClass = `oe-btn${state === "hover" ? " is-hover" : ""}${state === "active" ? " is-active" : ""}`;
const describedBy = buttonNote ? noteId : undefined;
return (
<section className={["cf-offer-equation", className].filter(Boolean).join(" ")} aria-labelledby={titleId}>
<style>{CSS}</style>
<div className="oe-wrap">
<header className="oe-head">
<h2 id={titleId} className="oe-title">
{withMarker(headline, highlight)}
</h2>
{lead ? <p className="oe-lead">{lead}</p> : null}
</header>
<div className="oe-split">
<EquationHalf item={have} tone="have" index={1} />
<div className="oe-sign-cell">
<span className="oe-sign" role="img" aria-label={plusLabel}>
<Plus className="oe-sign-glyph" strokeWidth={2.5} aria-hidden="true" />
</span>
</div>
<EquationHalf item={add} tone="add" index={2} />
</div>
<div className="oe-eq-cell">
<span className="oe-sign oe-sign--eq" role="img" aria-label={equalsLabel}>
<Equal className="oe-sign-glyph" strokeWidth={2.5} aria-hidden="true" />
</span>
</div>
<div className="oe-result oe-rise" style={{ ["--i" as string]: 3 } as React.CSSProperties}>
<h3 className="oe-result-name">{resultName}</h3>
{resultLine ? <p className="oe-result-line">{resultLine}</p> : null}
{price || alternativePrice ? (
<div className={`oe-price${alternativePrice && price ? " is-compare" : ""}`}>
{alternativePrice ? (
<>
<span className="oe-alt-num">{alternativePrice}</span>
{alternativeLabel ? (
<span className="oe-price-label oe-price-label--alt">{keepSegments(alternativeLabel)}</span>
) : null}
</>
) : null}
{alternativePrice && price ? <span className="oe-vs">{vsLabel}</span> : null}
{price ? (
<>
<span className="oe-today-num">{price}</span>
{priceNote ? (
<span className="oe-price-label oe-price-label--today">{keepSegments(priceNote)}</span>
) : null}
</>
) : null}
</div>
) : null}
{gated ? (
<label className={`oe-commit${showError ? " is-error" : ""}${isDisabled ? " is-disabled" : ""}`}>
<span className="oe-check">
<input
ref={inputRef}
type="checkbox"
checked={ticked}
disabled={isDisabled}
aria-invalid={showError || undefined}
aria-describedby={showError ? errorId : undefined}
onChange={(e) => {
setTicked(e.target.checked);
if (e.target.checked) setShowError(false);
}}
/>
<span className="oe-box" aria-hidden="true">
<Check size={16} strokeWidth={3} />
</span>
</span>
<span className="oe-commit-text">{noBreakHyphens(commitLabel)}</span>
</label>
) : null}
{gated && showError ? (
<p id={errorId} className="oe-error" role="alert">
<AlertCircle size={16} strokeWidth={2.5} aria-hidden="true" />
{commitError}
</p>
) : null}
<div className="oe-action">
{href && !isDisabled ? (
<a className={btnClass} href={href} onClick={handleAction} aria-describedby={describedBy}>
<span className="oe-btn-label">{buttonLabel}</span>
</a>
) : (
<button type="button" className={btnClass} onClick={handleAction} disabled={isDisabled} aria-describedby={describedBy}>
<span className="oe-btn-label">{buttonLabel}</span>
</button>
)}
</div>
{buttonNote ? (
<p id={noteId} className="oe-note">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{buttonNote}
</p>
) : null}
{declineLabel ? (
declineHref ? (
<a className="oe-decline" href={declineHref} onClick={() => onDecline?.()}>
{declineLabel}
</a>
) : (
<button type="button" className="oe-decline" onClick={() => onDecline?.()}>
{declineLabel}
</button>
)
) : null}
</div>
</div>
</section>
);
}
export default OfferEquation;
function EquationHalf({ item, tone, index }: { item: OfferEquationItem; tone: "have" | "add"; index: number }) {
return (
<div
className={`oe-half oe-half--${tone} oe-rise`}
style={{ ...(tone === "add" ? FX_HOST : null), ["--i" as string]: index } as React.CSSProperties}
>
{tone === "add" ? <Spotlight /> : null}
{item.tag ? (
<span className="oe-tag">
{tone === "have" ? <Check className="oe-tag-icon" size={16} strokeWidth={2.5} aria-hidden="true" /> : null}
{item.tag}
</span>
) : null}
{item.image ? (
<div className="oe-shot">
<img src={item.image} alt={item.imageAlt ?? item.name} loading="lazy" decoding="async" />
</div>
) : null}
<h3 className="oe-name">{item.name}</h3>
<p className="oe-role">{item.role}</p>
</div>
);
}
function withMarker(text: React.ReactNode, phrase?: string): React.ReactNode {
if (typeof text !== "string" || !phrase) return text;
const i = text.indexOf(phrase);
if (i < 0) return text;
return (
<>
{text.slice(0, i)}
<span className="oe-mark">{phrase}</span>
{text.slice(i + phrase.length)}
</>
);
}
/** Keeps hyphenated words ("money-back", "30-day") from breaking at the hyphen. */
function noBreakHyphens(text: string): React.ReactNode {
const parts = text.split(/(\S+-\S+)/);
if (parts.length === 1) return text;
return parts.map((p, i) =>
i % 2 ? (
<span key={i} className="oe-nobr">
{p}
</span>
) : (
p
)
);
}
/** Keeps short " · " segments whole and the dot with the segment before it. */
function keepSegments(text: string): React.ReactNode {
const segs = text.split(" · ");
if (segs.length === 1) return noBreakHyphens(text);
return segs.map((seg, i) => (
<React.Fragment key={i}>
{i > 0 ? " " : null}
<span className={seg.length <= 24 ? "oe-nobr" : undefined}>
{noBreakHyphens(seg)}
{i < segs.length - 1 ? "\u00a0·" : ""}
</span>
</React.Fragment>
));
}
const CSS = `
.cf-offer-equation{
--oe-radius: var(--card-radius, var(--radius, 14px));
--oe-shadow: var(--shadow, oklch(0.22 0.03 260));
--oe-marker: var(--marker, #fae37c);
--oe-marker-ink: var(--marker-ink, oklch(from var(--oe-marker) clamp(0.18, (0.62 - l) * 100, 0.97) 0 0));
--oe-glyph: var(--status-glyph, #fff);
--oe-ease: cubic-bezier(.2,.7,.2,1);
--oe-sign: clamp(64px, 6vw, 84px);
position: relative;
background: var(--surface);
color: var(--ink);
font-family: var(--font-body);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
overflow-x: clip;
}
.cf-offer-equation *, .cf-offer-equation *::before, .cf-offer-equation *::after{ box-sizing: border-box; }
.cf-offer-equation .oe-wrap{ max-width: 1120px; margin: 0 auto; }
.cf-offer-equation .oe-head{ max-width: 46rem; margin: 0 auto; text-align: center; }
.cf-offer-equation .oe-title{
margin: 0;
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, -0.025em);
text-transform: var(--display-case, none);
color: var(--ink);
text-wrap: balance;
}
.cf-offer-equation .oe-mark{
color: var(--oe-marker-ink);
background-image: linear-gradient(180deg, transparent 0 32%, var(--oe-marker) 32% 94%, transparent 94%);
padding: 0 .1em;
margin: 0 -.04em;
border-radius: .12em .32em .18em .36em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-offer-equation .oe-lead{
margin: 16px auto 0;
max-width: 40rem;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--muted);
text-wrap: pretty;
}
.cf-offer-equation .oe-split{
margin-top: clamp(32px, 5vw, 56px);
display: grid;
grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr);
}
.cf-offer-equation .oe-half{
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: clamp(28px, 4vw, 48px) clamp(20px, 3.5vw, 48px) clamp(32px, 4vw, 48px);
}
.cf-offer-equation .oe-half--have{
background: color-mix(in oklch, var(--ink) 4%, var(--surface));
color: var(--ink);
border: 1px solid oklch(from var(--ink) l c h / .08);
border-inline-end: 0;
border-radius: var(--oe-radius) 0 0 var(--oe-radius);
padding-inline-end: calc(var(--oe-sign) / 2 + 24px);
}
.cf-offer-equation .oe-half--add{
background: var(--band);
color: var(--band-ink);
border-radius: 0 var(--oe-radius) var(--oe-radius) 0;
padding-inline-start: calc(var(--oe-sign) / 2 + 24px);
overflow: hidden;
box-shadow: inset 0 0 0 1px oklch(from var(--band-ink) l c h / .08);
}
.cf-offer-equation .oe-half .oe-tag,
.cf-offer-equation .oe-half .oe-shot,
.cf-offer-equation .oe-half .oe-name,
.cf-offer-equation .oe-half .oe-role{ position: relative; z-index: 1; }
.cf-offer-equation .oe-nobr{ white-space: nowrap; }
.cf-offer-equation .oe-tag{
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 30px;
padding: 4px 12px;
border-radius: 999px;
font-size: .875rem;
line-height: 1.2;
font-weight: 800;
white-space: nowrap;
}
.cf-offer-equation .oe-half--have .oe-tag{
background: var(--card);
color: var(--ink);
border: 1px solid oklch(from var(--ink) l c h / .12);
}
.cf-offer-equation .oe-tag-icon{ color: var(--success); flex: none; }
.cf-offer-equation .oe-half--add .oe-tag{
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
}
.cf-offer-equation .oe-shot{ margin-top: 24px; width: 100%; display: flex; justify-content: center; }
.cf-offer-equation .oe-shot img{
display: block;
width: 100%;
max-width: 300px;
height: clamp(180px, 21vw, 250px);
object-fit: contain;
object-position: center;
filter: drop-shadow(0 2px 3px oklch(from var(--oe-shadow) l c h / .28)) drop-shadow(0 14px 16px oklch(from var(--oe-shadow) l c h / .22));
}
.cf-offer-equation .oe-name{
margin: 24px 0 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: -0.01em;
text-transform: var(--display-case, none);
text-wrap: balance;
}
.cf-offer-equation .oe-role{
margin: 8px 0 0;
max-width: 34ch;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
text-wrap: pretty;
}
.cf-offer-equation .oe-half--have .oe-role{ color: var(--muted); }
.cf-offer-equation .oe-half--add .oe-role{ color: color-mix(in oklch, var(--band-ink) 84%, var(--band)); }
.cf-offer-equation .oe-sign-cell{ position: relative; z-index: 2; }
.cf-offer-equation .oe-eq-cell{ position: relative; z-index: 2; height: clamp(20px, 2.5vw, 28px); }
.cf-offer-equation .oe-sign{
position: absolute;
left: 50%;
top: 50%;
translate: -50% -50%;
width: var(--oe-sign);
height: var(--oe-sign);
border-radius: 50%;
display: grid;
place-items: center;
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
border: 6px solid var(--surface);
box-shadow: var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / .22), 0 4px 10px -2px oklch(0.22 0.03 260 / .2));
animation: oe-pop .3s var(--oe-ease) .2s both;
}
.cf-offer-equation .oe-sign-glyph{ width: 46%; height: 46%; display: block; }
.cf-offer-equation .oe-sign--eq{ animation-delay: .3s; }
.cf-offer-equation .oe-result{
position: relative;
max-width: 46rem;
margin: 0 auto;
background: var(--card);
color: var(--ink);
border: 1px solid oklch(from var(--accent) l c h / .35);
border-radius: var(--oe-radius);
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / .22), 0 12px 24px -8px oklch(0.22 0.03 260 / .32)));
padding: calc(var(--oe-sign) / 2 + 24px) clamp(20px, 3vw, 40px) clamp(28px, 3.5vw, 40px);
text-align: center;
}
.cf-offer-equation .oe-result-name{
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: -0.01em;
text-transform: var(--display-case, none);
text-wrap: balance;
}
.cf-offer-equation .oe-result-line{
margin: 8px auto 0;
max-width: 36rem;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--muted);
text-wrap: pretty;
}
.cf-offer-equation .oe-price{
display: grid;
justify-items: center;
row-gap: 12px;
max-width: 520px;
margin: 28px auto 0;
}
.cf-offer-equation .oe-price.is-compare{
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
column-gap: clamp(12px, 3vw, 32px);
}
.cf-offer-equation .oe-price.is-compare .oe-alt-num{ grid-area: 1 / 1; align-self: end; }
.cf-offer-equation .oe-price.is-compare .oe-price-label--alt{ grid-area: 2 / 1; }
.cf-offer-equation .oe-price.is-compare .oe-vs{ grid-area: 1 / 2; align-self: end; margin-bottom: 4px; }
.cf-offer-equation .oe-price.is-compare .oe-today-num{ grid-area: 1 / 3; }
.cf-offer-equation .oe-price.is-compare .oe-price-label--today{ grid-area: 2 / 3; }
.cf-offer-equation .oe-alt-num{
font-family: var(--font-display);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1;
font-weight: 800;
letter-spacing: -0.01em;
font-variant-numeric: tabular-nums;
color: var(--muted);
}
.cf-offer-equation .oe-today-num{
font-family: var(--font-display);
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1;
font-weight: 800;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--ink);
}
.cf-offer-equation .oe-price-label{
align-self: start;
text-align: center;
font-size: .9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted);
text-wrap: balance;
}
.cf-offer-equation .oe-price-label--today{ color: var(--ink); }
.cf-offer-equation .oe-vs{
flex: none;
display: inline-flex;
align-items: center;
min-height: 30px;
padding: 4px 12px;
border-radius: 999px;
background: color-mix(in oklch, var(--ink) 6%, var(--card));
color: var(--ink);
font-size: .875rem;
line-height: 1.2;
font-weight: 800;
}
.cf-offer-equation .oe-commit{
display: flex;
align-items: flex-start;
gap: 12px;
max-width: 520px;
margin: 24px auto 0;
padding: 14px 16px;
border-radius: 10px;
background: color-mix(in oklch, var(--ink) 4%, var(--card));
border: 1px solid transparent;
text-align: left;
cursor: pointer;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.4;
font-weight: 600;
color: var(--ink);
transition: background .16s ease, border-color .16s ease;
}
.cf-offer-equation .oe-commit.is-error{ background: var(--danger-soft); border-color: var(--danger); }
.cf-offer-equation .oe-commit.is-disabled{ cursor: not-allowed; }
.cf-offer-equation .oe-commit-text{ text-wrap: pretty; }
.cf-offer-equation .oe-check{ position: relative; flex: none; width: 24px; height: 24px; margin-top: 1px; }
.cf-offer-equation .oe-check input{
position: absolute;
inset: 0;
width: 100%;
height: 100%;
margin: 0;
opacity: 0;
cursor: inherit;
z-index: 1;
}
.cf-offer-equation .oe-box{
display: grid;
place-items: center;
width: 24px;
height: 24px;
border-radius: 6px;
background: var(--field);
border: 2px solid color-mix(in oklch, var(--field-ink) 55%, var(--field));
color: transparent;
transition: background .16s ease, border-color .16s ease;
}
.cf-offer-equation .oe-check input:checked + .oe-box{
background: var(--success);
border-color: var(--success);
color: var(--oe-glyph);
}
.cf-offer-equation .oe-check input:focus-visible + .oe-box{
outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / .45);
outline-offset: 2px;
}
.cf-offer-equation .oe-commit.is-error .oe-box{ border-color: var(--danger); }
.cf-offer-equation .oe-error{
max-width: 520px;
margin: 8px auto 0;
text-align: left;
font-size: .9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--danger);
text-wrap: pretty;
}
.cf-offer-equation .oe-error svg, .cf-offer-equation .oe-note svg{
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: .4em;
}
.cf-offer-equation .oe-action{ max-width: 520px; margin: 16px auto 0; }
.cf-offer-equation .oe-btn{
--oe-b: var(--button-bg, var(--cta));
--oe-b2: var(--button-bg-2, var(--cta-2, var(--oe-b)));
display: flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: 72px;
margin: 0;
padding: 12px 28px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(180deg, oklch(from var(--oe-b) calc(l + .04) c h), oklch(from var(--oe-b2) calc(l - .02) c h));
color: var(--button-ink, var(--cta-ink));
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
text-align: center;
text-decoration: none;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--oe-b) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--oe-b) calc(l - .16) c h), 0 1px 2px oklch(from var(--oe-shadow) l c h / .3), 0 8px 16px -6px oklch(from var(--oe-shadow) l c h / .45));
cursor: pointer;
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
-webkit-tap-highlight-color: transparent;
}
.cf-offer-equation .oe-btn-label{ text-wrap: balance; }
.cf-offer-equation .oe-btn:hover:not(:disabled), .cf-offer-equation .oe-btn.is-hover:not(:disabled){
background: linear-gradient(180deg, oklch(from var(--oe-b) calc(l - .01) c h), oklch(from var(--oe-b2) calc(l - .07) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--oe-b) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--oe-b) calc(l - .2) c h), 0 1px 2px oklch(from var(--oe-shadow) l c h / .32), 0 10px 18px -6px oklch(from var(--oe-shadow) l c h / .52));
transform: translateY(-1px);
}
.cf-offer-equation .oe-btn:active:not(:disabled), .cf-offer-equation .oe-btn.is-active:not(:disabled){
background: linear-gradient(180deg, oklch(from var(--oe-b) calc(l - .04) c h), oklch(from var(--oe-b2) calc(l - .08) c h));
box-shadow: inset 0 2px 4px oklch(from var(--oe-b) calc(l - .22) c h / .5), inset 0 -2px 0 oklch(from var(--oe-b) calc(l - .16) c h), 0 1px 2px oklch(from var(--oe-shadow) l c h / .3);
transform: translateY(1px);
}
.cf-offer-equation .oe-btn:focus-visible{
outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / .5);
outline-offset: 3px;
}
.cf-offer-equation .oe-btn:disabled, .cf-offer-equation .oe-btn[aria-disabled=true]{
background: var(--button-2-bg, var(--secondary));
color: var(--button-2-ink, var(--secondary-ink));
text-shadow: none;
box-shadow: none;
transform: none;
cursor: not-allowed;
}
.cf-offer-equation .oe-note{
max-width: 520px;
margin: 12px auto 0;
font-size: .9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--muted);
text-wrap: pretty;
}
.cf-offer-equation .oe-decline{
display: inline-block;
margin-top: 16px;
padding: 4px 8px;
background: none;
border: 0;
font: inherit;
font-size: .9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--muted);
text-decoration: underline;
text-decoration-color: oklch(from var(--muted) l c h / .5);
text-underline-offset: .18em;
cursor: pointer;
text-wrap: pretty;
}
.cf-offer-equation .oe-decline:hover{ color: var(--ink); text-decoration-color: currentColor; }
.cf-offer-equation .oe-decline:focus-visible{
outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / .45);
outline-offset: 2px;
border-radius: 6px;
}
.cf-offer-equation .oe-rise{
animation: oe-rise .45s var(--oe-ease) both;
animation-delay: calc(min(var(--i, 0), 4) * .07s);
}
@keyframes oe-rise{ from{ opacity: .82; transform: translateY(8px); } to{ opacity: 1; transform: none; } }
@keyframes oe-pop{ from{ scale: .9; } to{ scale: 1; } }
@media (max-width: 720px){
.cf-offer-equation .oe-split{
grid-template-columns: minmax(0, 1fr);
grid-template-rows: auto 0 auto;
}
.cf-offer-equation .oe-half--have{
border: 1px solid oklch(from var(--ink) l c h / .08);
border-bottom: 0;
border-radius: var(--oe-radius) var(--oe-radius) 0 0;
padding-inline-end: clamp(20px, 3.5vw, 48px);
padding-bottom: calc(var(--oe-sign) / 2 + 20px);
}
.cf-offer-equation .oe-half--add{
border-radius: 0 0 var(--oe-radius) var(--oe-radius);
padding-inline-start: clamp(20px, 3.5vw, 48px);
padding-top: calc(var(--oe-sign) / 2 + 20px);
}
.cf-offer-equation .oe-btn{ padding: 12px 16px; }
}
@media (max-width: 420px){
.cf-offer-equation .oe-btn{ font-size: 1.0625rem; letter-spacing: -0.005em; }
}
@media (prefers-reduced-motion: reduce){
.cf-offer-equation .oe-rise, .cf-offer-equation .oe-sign{ animation: none; }
.cf-offer-equation .oe-btn, .cf-offer-equation .oe-commit, .cf-offer-equation .oe-box{ transition: none; }
.cf-offer-equation .oe-btn:hover:not(:disabled), .cf-offer-equation .oe-btn.is-hover:not(:disabled),
.cf-offer-equation .oe-btn:active:not(:disabled), .cf-offer-equation .oe-btn.is-active:not(:disabled){ transform: none; }
}
`;
pieces/offer/offer-equation/specimen.tsx 52 lines
import __studioImage4efb5911 from "../assets/9d9ca8f1323d51c0.webp";
import __studioImageba757dd1 from "../assets/ab183d5ddbba07d0.webp";
import { OfferEquation, type OfferEquationProps } from "../offer-equation";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled", "error"];
export default function OfferEquationSpecimen({ state = "default" }: { state?: OfferEquationProps["state"] }) {
const s = defaults.sample;
const guide = s.items[0];
const workbook = s.items[1];
return (
<OfferEquation
state={state}
headline="You have the plan. Now add the words that sell it."
highlight="the words that sell it"
lead="Your guide maps every page. The workbook helps you write each one, so your funnel is ready to launch."
have={{
tag: "Already in your order",
name: guide.name,
role: guide.detail,
image: slot(
"item-1",
__studioImage4efb5911
),
imageAlt: "Funnel Planning Guide softcover book",
}}
add={{
tag: "Add it today",
name: workbook.name,
role: workbook.detail,
image: slot(
"item-2",
__studioImageba757dd1
),
imageAlt: "Page Copy Workbook, spiral-bound and open to its fill-in pages",
}}
resultName={s.name}
resultLine="The guide, the workbook and the launch checklist in one download."
alternativePrice={s.regularPrice}
alternativeLabel="Each piece bought on its own"
vsLabel="vs."
price={s.price}
priceNote={s.note}
commitLabel={`I understand I'm covered by the ${s.guarantee}.`}
buttonLabel="Yes! Add It To My Order"
buttonNote={s.sublabel}
declineLabel="No thanks, I'll write my pages on my own."
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalOfferEquation |
React.ReactNode |
Default "You have the book. Now add the course that puts it to work."
|
highlight OptionalOfferEquation |
string |
Default "puts it to work"
|
lead OptionalOfferEquation |
string |
Default "The book gives you the plan. The course walks you through it, one short lesson at a time."
|
have OptionalOfferEquation |
OfferEquationItem |
Default { tag: "Already in your order", name: "The book", role: "Your step-by-step plan." }
|
add OptionalOfferEquation |
OfferEquationItem |
Default { tag: "Add it today", name: "The course", role: "Short lessons that walk you through the plan." }
|
resultName OptionalOfferEquation |
string |
Default "The complete system"
|
resultLine OptionalOfferEquation |
string |
Default "The plan and the help to follow it, together."
|
price OptionalOfferEquation |
string |
Default ""
|
priceNote OptionalOfferEquation |
string |
Default ""
|
alternativePrice OptionalOfferEquation |
string |
Default ""
|
alternativeLabel OptionalOfferEquation |
string |
Default ""
|
vsLabel OptionalOfferEquation |
string |
Default "vs."
|
commitLabel OptionalOfferEquation |
string |
Default ""
|
commitError OptionalOfferEquation |
string |
Default "Tick the box to confirm, then press the button again."
|
buttonLabel OptionalOfferEquation |
string |
Default "Yes! Add It To My Order"
|
buttonNote OptionalOfferEquation |
string |
Default ""
|
declineLabel OptionalOfferEquation |
string |
Default "No thanks, I'll keep my order as it is"
|
declineHref OptionalOfferEquation |
string |
|
onDecline OptionalOfferEquation |
() => void |
|
href OptionalOfferEquation |
string |
|
onAction OptionalOfferEquation |
() => void |
|
disabled OptionalOfferEquation |
boolean |
Default false
|
plusLabel OptionalOfferEquation |
string |
Default "plus"
|
equalsLabel OptionalOfferEquation |
string |
Default "equals"
|
state OptionalOfferEquation |
"default" | "hover" | "active" | "disabled" | "error" |
Default "default"
|
className OptionalOfferEquation |
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- Secondary button.
--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-focus--field-ink- 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-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
9d9ca8f1323d51c0.webp
image/webp · 36.8 KB
-
ab183d5ddbba07d0.webp
image/webp · 149 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB