OTO Result Hero 1
OTO result hero: the first screen after the upsell decision. It confirms exactly what is in the order and what was charged (accepted or declined), shows checkout is finished, and gives one next action, so the buyer leaves certain and calm.
Use it in a prompt
Use hero/oto-result-hero 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/hero/oto-result-hero.tsx. - Import it and pass your copy and images (Props tab):
import { OtoResultHero } from "@/components/funneldna/hero/oto-result-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/oto-result-hero/component.tsx 768 lines
// layout: split-contrast
// OTO result hero: the first screen after the upsell decision. It confirms exactly what is in the order and what was charged (accepted or declined), shows checkout is finished, and gives one next action, so the buyer leaves certain and calm.
import React, { useId } from "react";
import { CalendarDays, Check, Clock, Mail, Minus, Package, Receipt, ShieldCheck, Truck } from "lucide-react";
import type { LucideIcon } from "lucide-react";
export type OtoResultItem = {
/** Item name exactly as it appears on the order. */
name: string;
/** Short name used in the start button, e.g. "your skillet" (falls back to name). */
short?: string;
detail?: React.ReactNode;
/** Amount charged for this item, as supplied (e.g. "$29"). */
amount?: string;
/** Small grey chip after the name, e.g. "Just added". */
tag?: string;
};
export type OtoResultExpectation = {
icon?: "mail" | "truck" | "clock" | "package" | "calendar" | "receipt";
/** What arrives, when and from whom: supplied facts only. */
text: React.ReactNode;
};
export type OtoResultHeroCopy = {
progressLabel: string;
stepOrder: string;
stepUpgrade: string;
/** Middle step label when the upgrade was declined. */
stepSkipped: string;
stepAccess: string;
srDone: string;
srSkipped: string;
srCurrent: string;
headlineOne: string;
headlineTwo: string;
/** {count} is replaced with the number of items. */
headlineMany: string;
highlightAccepted: string;
headlineDeclined: string;
highlightDeclined: string;
leadAccepted: string;
/** The plain reassurance that no further offers follow. */
leadDeclined: string;
itemsLabel: string;
totalLabel: string;
/** {item} is replaced with the first item's short name. */
startLabel: string;
startFallback: string;
/** {items} is replaced with the item names joined by " + ". */
caption: string;
changeMind: string;
};
export type OtoResultHeroProps = {
/** Which way the upsell went; the whole hero follows it. */
decision?: "accepted" | "declined";
/** Everything now in the order, first item first. */
items?: OtoResultItem[];
/** Total charged, as supplied (e.g. "$118"). Hidden when empty. */
total?: string;
/** Overrides the decision headline. */
headline?: React.ReactNode;
/** Phrase inside a string headline that gets the marker stroke. */
highlight?: string;
/** Overrides the line under the headline; pass "" to hide it. */
lead?: React.ReactNode;
/** Photo of exactly what is in this order (flat-lay when accepted, core product when declined). */
image?: string;
imageAlt?: string;
/** Where the start button goes. */
href?: string;
onAction?: () => void;
/** Overrides the generated "Start with {item}" label. */
startLabel?: string;
/** One short line under the button. */
startNote?: React.ReactNode;
expectations?: OtoResultExpectation[];
/** Guarantee line, only if the offer has one. */
guarantee?: React.ReactNode;
/** Returnable offer URL; shows the "Changed your mind?" link on declined only. */
changeMindHref?: string;
copy?: Partial<OtoResultHeroCopy>;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function OtoResultHero(props: OtoResultHeroProps) {
const {
decision = "accepted",
items = [],
total,
headline,
highlight,
lead,
image,
imageAlt = "",
href,
onAction,
startLabel,
startNote,
expectations = [],
guarantee,
changeMindHref,
state = "default",
className,
} = props;
const copy: OtoResultHeroCopy = { ...DEFAULT_COPY, ...props.copy };
const titleId = useId();
const declined = decision === "declined";
const disabled = state === "disabled";
const defaultHeadline = declined
? copy.headlineDeclined
: items.length > 2
? fill(copy.headlineMany, { count: String(items.length) })
: items.length === 2
? copy.headlineTwo
: copy.headlineOne;
const headlineNode = headline ?? defaultHeadline;
const phrase = highlight ?? (headline === undefined ? (declined ? copy.highlightDeclined : copy.highlightAccepted) : undefined);
const isLong = typeof headlineNode === "string" && headlineNode.length > 26;
const leadNode = lead ?? (declined ? copy.leadDeclined : copy.leadAccepted);
const first = items[0];
const label = startLabel ?? (first ? fill(copy.startLabel, { item: first.short ?? first.name }) : copy.startFallback);
const singleCharge = items.length === 1 && Boolean(total);
const caption = items.length ? fill(copy.caption, { items: items.map((item) => item.name).join(" + ") }) : "";
const steps: { label: string; status: "done" | "skipped" | "current" }[] = [
{ label: copy.stepOrder, status: "done" },
{ label: declined ? copy.stepSkipped : copy.stepUpgrade, status: declined ? "skipped" : "done" },
{ label: copy.stepAccess, status: "current" },
];
let order = 0;
const rise = (): React.CSSProperties => ({ animationDelay: `${Math.min(order++ * 0.07, 0.28).toFixed(2)}s` });
const button =
href && !disabled ? (
<a className="orh-btn" href={href} onClick={() => onAction?.()}>
{label}
</a>
) : (
<button type="button" className="orh-btn" disabled={disabled} onClick={() => onAction?.()}>
{label}
</button>
);
return (
<section
className={["cf-oto-result-hero", className].filter(Boolean).join(" ")}
data-decision={decision}
data-state={state}
aria-labelledby={titleId}
>
<style>{CSS}</style>
<div className="orh-grid">
<div className="orh-media">
<figure className="orh-frame">
<div className="orh-photo">
{image ? (
<img src={image} alt={imageAlt} width={960} height={1200} loading="eager" decoding="async" />
) : items.length ? (
<ul className="orh-names" aria-hidden="true">
{items.map((item, index) => (
<li key={index}>{item.name}</li>
))}
</ul>
) : null}
</div>
{caption ? <figcaption className="orh-caption">{caption}</figcaption> : null}
</figure>
</div>
<div className="orh-copy">
<ol className="orh-progress" aria-label={copy.progressLabel} style={rise()}>
{steps.map((step, index) => (
<li
key={index}
className={`orh-step is-${step.status}`}
aria-current={step.status === "current" ? "step" : undefined}
>
<span className="orh-dot" aria-hidden="true">
{step.status === "skipped" ? <Minus size={14} strokeWidth={3} /> : <Check size={14} strokeWidth={3} />}
</span>
<span className="orh-step-label">
{step.label}
<span className="orh-sr">
, {step.status === "skipped" ? copy.srSkipped : step.status === "current" ? copy.srCurrent : copy.srDone}
</span>
</span>
</li>
))}
</ol>
<h1 id={titleId} className={`orh-title${isLong ? " is-long" : ""}`} style={rise()}>
{typeof headlineNode === "string" ? marked(headlineNode, phrase) : headlineNode}
</h1>
{leadNode ? (
<p className="orh-lead" style={rise()}>
{leadNode}
</p>
) : null}
{items.length ? (
<ul className="orh-items" aria-label={copy.itemsLabel} style={rise()}>
{items.map((item, index) => (
<li className="orh-item" key={index}>
<span className="orh-check" aria-hidden="true">
<Check size={14} strokeWidth={3} />
</span>
<div className="orh-item-body">
<p className="orh-name">
{item.name}
{item.tag ? <span className="orh-tag">{item.tag}</span> : null}
</p>
{item.detail ? <p className="orh-detail">{item.detail}</p> : null}
</div>
{item.amount && !singleCharge ? <span className="orh-amount">{item.amount}</span> : <span />}
</li>
))}
</ul>
) : null}
{total ? (
<p className="orh-total" style={rise()}>
<span className="orh-total-label">{copy.totalLabel}</span>
<span className="orh-total-amount">{total}</span>
</p>
) : null}
<div className="orh-actions" style={rise()}>
{button}
{startNote ? <p className="orh-note">{startNote}</p> : null}
</div>
{expectations.length ? (
<ul className="orh-expect" style={rise()}>
{expectations.map((line, index) => {
const Icon = ICONS[line.icon ?? "mail"];
return (
<li key={index}>
<Icon className="orh-ico" size={18} strokeWidth={2.5} aria-hidden="true" />
{line.text}
</li>
);
})}
</ul>
) : null}
{guarantee ? (
<p className="orh-guarantee" style={rise()}>
<ShieldCheck className="orh-ico orh-ico-ok" size={16} strokeWidth={2.5} aria-hidden="true" />
{guarantee}
</p>
) : null}
{declined && changeMindHref ? (
<p className="orh-change" style={rise()}>
<a href={changeMindHref}>{copy.changeMind}</a>
</p>
) : null}
</div>
</div>
</section>
);
}
export default OtoResultHero;
const DEFAULT_COPY: OtoResultHeroCopy = {
progressLabel: "Checkout progress",
stepOrder: "Order",
stepUpgrade: "Upgrade",
stepSkipped: "No upgrade",
stepAccess: "Access",
srDone: "complete",
srSkipped: "skipped",
srCurrent: "you are here, checkout is finished",
headlineOne: "It's yours.",
headlineTwo: "Both are yours.",
headlineMany: "All {count} are yours.",
highlightAccepted: "yours",
headlineDeclined: "Your order is complete. Nothing else was added.",
highlightDeclined: "Nothing else was added.",
leadAccepted: "Here's everything in your order and the total charged.",
leadDeclined: "That was the last offer. No more pages, no more add-ons.",
itemsLabel: "Items in your order",
totalLabel: "Total charged",
startLabel: "Start with {item}",
startFallback: "Go to your order",
caption: "In your order: {items}",
changeMind: "Changed your mind? See the offer again",
};
const ICONS: Record<NonNullable<OtoResultExpectation["icon"]>, LucideIcon> = {
mail: Mail,
truck: Truck,
clock: Clock,
package: Package,
calendar: CalendarDays,
receipt: Receipt,
};
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((text, key) => text.split("{" + key + "}").join(values[key]), template);
}
function marked(text: string, phrase?: string) {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="orh-mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
// Colour notes: every colour is a token or an OKLCH recipe on one. The white glyph in the solid status
// badges (--badge-glyph, #fff) and the yellow marker fallback are the documented exceptions.
const CSS = `
.cf-oto-result-hero {
--orh-pad-top: clamp(56px, 8vw, 112px);
--orh-pad-bottom: clamp(64px, 8.5vw, 120px);
--orh-gutter: clamp(16px, 5vw, 48px);
--orh-gap: clamp(32px, 5vw, 72px);
--orh-shadow: var(--shadow, oklch(0.22 0.03 260));
position: relative;
overflow: hidden;
box-sizing: border-box;
padding: var(--orh-pad-top) var(--orh-gutter) var(--orh-pad-bottom);
background: var(--surface, #ffffff);
color: var(--ink, #1a2233);
font-family: var(--font-body);
}
.cf-oto-result-hero *,
.cf-oto-result-hero *::before,
.cf-oto-result-hero *::after { box-sizing: border-box; }
.cf-oto-result-hero .orh-grid {
position: relative;
max-width: 1120px;
margin: 0 auto;
display: grid;
grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
column-gap: var(--orh-gap);
align-items: stretch;
}
/* Left colour block: the dark band runs to the viewport edge with a straight edge in the gutter. */
.cf-oto-result-hero .orh-media { position: relative; display: flex; min-height: 480px; }
.cf-oto-result-hero .orh-media::before {
content: "";
position: absolute;
z-index: 0;
top: calc(-1 * var(--orh-pad-top));
bottom: calc(-1 * var(--orh-pad-bottom));
left: -100vw;
right: calc(-0.5 * var(--orh-gap));
background: var(--band, #1d2b4a);
}
/* The frame carries the band colour itself (not only the full-bleed ::before), so the caption
always sits on a real --band surface and reads with --band-ink under every theme. */
.cf-oto-result-hero .orh-frame {
position: relative;
z-index: 1;
flex: 1;
display: flex;
flex-direction: column;
gap: 16px;
margin: 0;
background: var(--band, #1d2b4a);
color: var(--band-ink, #ffffff);
animation: orh-rise .45s cubic-bezier(.2, .7, .2, 1) both;
}
.cf-oto-result-hero .orh-photo { position: relative; flex: 1; min-height: 380px; }
/* Third colour block: a flat accent slab offset behind the photo's corner. */
.cf-oto-result-hero .orh-photo::before {
content: "";
position: absolute;
z-index: -1;
top: -24px;
right: -24px;
width: 58%;
height: 64%;
border-radius: var(--radius, 12px);
background: var(--accent-fill, var(--accent, #2f5fd0));
}
.cf-oto-result-hero .orh-photo img,
.cf-oto-result-hero .orh-names {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border-radius: 12px;
background: color-mix(in oklch, var(--band-ink, #ffffff) 8%, var(--band, #1d2b4a));
}
.cf-oto-result-hero .orh-photo img { display: block; object-fit: cover; object-position: 50% 50%; }
.cf-oto-result-hero .orh-names {
margin: 0;
padding: clamp(20px, 3vw, 32px);
list-style: none;
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 8px;
color: var(--band-ink, #ffffff);
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
text-wrap: balance;
}
.cf-oto-result-hero .orh-caption {
margin: 0;
max-width: 60ch;
background: var(--band, #1d2b4a);
color: var(--band-ink, #ffffff);
font-size: .9375rem;
font-weight: 600;
line-height: 1.4;
text-wrap: pretty;
}
/* Right: the receipt column on the light surface. */
.cf-oto-result-hero .orh-copy { position: relative; z-index: 1; min-width: 0; padding-top: 4px; }
.cf-oto-result-hero .orh-copy > * { animation: orh-rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.cf-oto-result-hero .orh-progress {
position: relative;
list-style: none;
margin: 0 0 28px;
padding: 0;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cf-oto-result-hero .orh-progress::before,
.cf-oto-result-hero .orh-progress::after {
content: "";
position: absolute;
left: 12px;
right: 12px;
top: 10px;
height: 4px;
border-radius: 999px;
}
.cf-oto-result-hero .orh-progress::before { background: oklch(from var(--ink, #1a2233) l c h / .12); }
.cf-oto-result-hero .orh-progress::after {
background: var(--success, #2e7d4f);
transform-origin: left center;
animation: orh-fill .7s .2s cubic-bezier(.2, .7, .2, 1) both;
}
.cf-oto-result-hero .orh-step {
position: relative;
z-index: 1;
min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.cf-oto-result-hero .orh-step:first-child { align-items: flex-start; }
.cf-oto-result-hero .orh-step:last-child { align-items: flex-end; }
.cf-oto-result-hero .orh-dot {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: 999px;
background: var(--success, #2e7d4f);
color: var(--badge-glyph, #fff);
outline: 3px solid var(--surface, #ffffff);
}
.cf-oto-result-hero .is-skipped .orh-dot { background: var(--secondary, #e8ebf0); color: var(--secondary-ink, #1a2233); }
.cf-oto-result-hero .is-current .orh-dot { animation: orh-pop .3s .8s cubic-bezier(.2, .7, .2, 1) both; }
.cf-oto-result-hero .orh-step-label {
font-size: .875rem;
font-weight: 800;
line-height: 1.2;
color: var(--muted, #4a5568);
white-space: nowrap;
}
.cf-oto-result-hero .is-current .orh-step-label { color: var(--ink, #1a2233); }
.cf-oto-result-hero .orh-sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
white-space: nowrap;
}
.cf-oto-result-hero .orh-title {
margin: 0 0 .28em;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: clamp(2.5rem, 5.4vw, 4.875rem);
line-height: 1.04;
color: var(--ink, #1a2233);
text-wrap: balance;
}
.cf-oto-result-hero .orh-title.is-long { font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.06; }
.cf-oto-result-hero .orh-mark {
padding: 0 .08em;
margin: 0 -.04em;
border-radius: .1em .24em .14em .2em;
background-image: linear-gradient(
transparent 54%,
color-mix(in oklch, var(--marker, #fae37c) 70%, transparent) 54%,
color-mix(in oklch, var(--marker, #fae37c) 70%, transparent) 93%,
transparent 93%
);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-oto-result-hero .orh-lead {
margin: 0 0 28px;
max-width: 54ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
font-weight: 500;
line-height: 1.4;
color: var(--muted, #4a5568);
text-wrap: pretty;
}
.cf-oto-result-hero .orh-items { list-style: none; margin: 0 0 16px; padding: 0; }
.cf-oto-result-hero .orh-item {
display: grid;
grid-template-columns: 24px minmax(0, 1fr) auto;
column-gap: 14px;
align-items: start;
padding: 14px 0;
}
.cf-oto-result-hero .orh-item:first-child { padding-top: 0; }
.cf-oto-result-hero .orh-item + .orh-item { border-top: 1px solid oklch(from var(--ink, #1a2233) l c h / .12); }
.cf-oto-result-hero .orh-check {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
margin-top: 1px;
border-radius: 999px;
background: var(--success, #2e7d4f);
color: var(--badge-glyph, #fff);
}
.cf-oto-result-hero .orh-item-body { min-width: 0; }
/* Name and tag share a wrapping row: when the tag drops to its own line it starts flush, not indented. */
.cf-oto-result-hero .orh-name {
margin: 0;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px 10px;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
font-weight: 700;
line-height: 1.4;
color: var(--ink, #1a2233);
text-wrap: pretty;
}
.cf-oto-result-hero .orh-tag {
display: inline-flex;
align-items: center;
min-height: 28px;
padding: 4px 12px;
border-radius: 999px;
background: var(--secondary, #e8ebf0);
color: var(--secondary-ink, #1a2233);
font-size: .875rem;
font-weight: 800;
line-height: 1.2;
white-space: nowrap;
}
.cf-oto-result-hero .orh-detail {
margin: 4px 0 0;
font-size: .9375rem;
font-weight: 500;
line-height: 1.4;
color: var(--muted, #4a5568);
text-wrap: pretty;
}
.cf-oto-result-hero .orh-amount {
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.4;
font-variant-numeric: tabular-nums;
color: var(--ink, #1a2233);
white-space: nowrap;
}
.cf-oto-result-hero .orh-total {
display: flex;
align-items: baseline;
justify-content: space-between;
flex-wrap: wrap;
gap: 4px 16px;
margin: 0 0 28px;
padding: 16px 20px;
border-radius: 10px;
background: color-mix(in oklch, var(--ink, #1a2233) 5%, var(--surface, #ffffff));
}
.cf-oto-result-hero .orh-total-label {
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
font-weight: 700;
line-height: 1.4;
color: var(--ink, #1a2233);
}
.cf-oto-result-hero .orh-total-amount {
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--ink, #1a2233);
}
/* The start button spans the receipt column like the total well above it, so its centred label
lines up with the centred reassurance line under it. */
.cf-oto-result-hero .orh-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.cf-oto-result-hero .orh-btn {
--orh-bb: var(--button-bg, var(--cta, #d93a2b));
--orh-bb2: var(--button-bg-2, var(--cta-2, #b82e22));
appearance: none;
border: 0;
margin: 0;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
width: 100%;
min-height: 72px;
padding: 12px 28px;
border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
text-wrap: balance;
color: var(--button-ink, var(--cta-ink, #ffffff));
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--orh-bb) calc(l + 0.04) c h), oklch(from var(--orh-bb2) calc(l - 0.02) c h));
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--orh-bb) calc(l + 0.14) c h / .7),
inset 0 -3px 0 oklch(from var(--orh-bb) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--orh-shadow) l c h / .3),
0 8px 16px -6px oklch(from var(--orh-shadow) l c h / .42));
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-oto-result-hero .orh-btn:not(:disabled):hover,
.cf-oto-result-hero[data-state="hover"] .orh-btn {
background: linear-gradient(oklch(from var(--orh-bb) calc(l - 0.01) c h), oklch(from var(--orh-bb2) calc(l - 0.07) c h));
transform: translateY(-1px);
box-shadow:
inset 0 1px 0 oklch(from var(--orh-bb) calc(l + 0.12) c h / .7),
inset 0 -3px 0 oklch(from var(--orh-bb) calc(l - 0.2) c h),
0 1px 2px oklch(from var(--orh-shadow) l c h / .34),
0 10px 18px -6px oklch(from var(--orh-shadow) l c h / .5);
}
.cf-oto-result-hero .orh-btn:not(:disabled):active,
.cf-oto-result-hero[data-state="active"] .orh-btn {
background: linear-gradient(oklch(from var(--orh-bb) calc(l - 0.05) c h), oklch(from var(--orh-bb2) calc(l - 0.08) c h));
transform: translateY(1px);
box-shadow:
inset 0 2px 4px oklch(from var(--orh-bb) calc(l - 0.22) c h / .55),
inset 0 -2px 0 oklch(from var(--orh-bb) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--orh-shadow) l c h / .3);
}
.cf-oto-result-hero .orh-btn:focus-visible {
outline: 3px solid var(--field-focus, var(--accent, #2f5fd0));
outline-offset: 3px;
}
.cf-oto-result-hero .orh-btn:disabled {
cursor: not-allowed;
transform: none;
background: var(--secondary, #e8ebf0);
color: var(--secondary-ink, #1a2233);
text-shadow: none;
box-shadow: none;
}
.cf-oto-result-hero .orh-note {
margin: 0;
text-align: center;
font-size: .9375rem;
font-weight: 500;
line-height: 1.4;
color: var(--muted, #4a5568);
text-wrap: pretty;
}
.cf-oto-result-hero .orh-expect { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.cf-oto-result-hero .orh-expect li {
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.45;
color: var(--ink, #1a2233);
text-wrap: pretty;
}
.cf-oto-result-hero .orh-ico {
display: inline-block;
vertical-align: -0.15em;
margin-inline-end: .5em;
color: var(--accent, #2f5fd0);
}
.cf-oto-result-hero .orh-ico-ok { color: var(--success, #2e7d4f); }
.cf-oto-result-hero .orh-guarantee {
margin: 16px 0 0;
font-size: .9375rem;
font-weight: 600;
line-height: 1.4;
color: var(--ink, #1a2233);
text-wrap: pretty;
}
.cf-oto-result-hero .orh-change { margin: 20px 0 0; font-size: .9375rem; font-weight: 600; line-height: 1.4; }
.cf-oto-result-hero .orh-change a {
color: var(--link, var(--accent, #2f5fd0));
text-decoration: underline;
text-decoration-thickness: 1px;
text-decoration-color: oklch(from var(--link, var(--accent, #2f5fd0)) l c h / .45);
text-underline-offset: .18em;
}
.cf-oto-result-hero .orh-change a:hover {
color: oklch(from var(--link, var(--accent, #2f5fd0)) calc(l - 0.08) c h);
text-decoration-color: currentColor;
}
.cf-oto-result-hero .orh-change a:focus-visible {
outline: 3px solid var(--field-focus, var(--accent, #2f5fd0));
outline-offset: 2px;
border-radius: 4px;
}
@media (max-width: 959px) {
.cf-oto-result-hero .orh-grid { grid-template-columns: minmax(0, 1fr); row-gap: 72px; }
.cf-oto-result-hero .orh-media { min-height: 0; }
.cf-oto-result-hero .orh-media::before { right: -100vw; bottom: -40px; }
.cf-oto-result-hero .orh-photo { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
.cf-oto-result-hero .orh-photo::before { top: -12px; right: -12px; width: 52%; height: 60%; }
.cf-oto-result-hero .orh-btn { min-height: 64px; padding: 12px 24px; }
}
@keyframes orh-rise { from { opacity: .82; transform: translateY(8px); } }
@keyframes orh-fill { from { transform: scaleX(.5); } to { transform: scaleX(1); } }
@keyframes orh-pop { from { transform: scale(.9); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
.cf-oto-result-hero .orh-frame,
.cf-oto-result-hero .orh-copy > *,
.cf-oto-result-hero .orh-progress::after,
.cf-oto-result-hero .is-current .orh-dot { animation: none; }
.cf-oto-result-hero .orh-btn { transition: none; }
.cf-oto-result-hero .orh-btn:not(:disabled):hover,
.cf-oto-result-hero .orh-btn:not(:disabled):active,
.cf-oto-result-hero[data-state="hover"] .orh-btn,
.cf-oto-result-hero[data-state="active"] .orh-btn { transform: none; }
}
`;
pieces/hero/oto-result-hero/specimen.tsx 59 lines
import __studioImage229f2670 from "../assets/763d85bc7cdbab9b.webp";
import __studioImage006b3747 from "../assets/68799e647a21ee64.webp";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import OtoResultHero from "../oto-result-hero";
import type { OtoResultItem } from "../oto-result-hero";
export const states = ["default", "declined", "hover", "active", "disabled"];
const skillet: OtoResultItem = {
name: "Ember Peak 12-inch Cast-Iron Skillet",
short: "your skillet",
detail: "Pre-seasoned, with a pour spout and helper handle",
amount: "$89",
};
const careKit: OtoResultItem = {
name: "Seasoning & Care Kit",
detail: "Flaxseed oil, chainmail scrubber and the first-seasoning card",
amount: "$29",
tag: "Just added",
};
export default function OtoResultHeroSpecimen({ state = "default" }: { state?: string }) {
const declined = state === "declined";
const orderPhoto = slot(
"scene",
__studioImage229f2670
);
const skilletPhoto = slot(
"product",
__studioImage006b3747
);
const pieceState = state === "hover" || state === "active" || state === "disabled" ? state : "default";
return (
<OtoResultHero
decision={declined ? "declined" : "accepted"}
items={declined ? [skillet] : [skillet, careKit]}
total={declined ? "$89" : "$118"}
image={declined ? skilletPhoto : orderPhoto}
imageAlt={
declined
? "Overhead view of the Ember Peak 12-inch cast-iron skillet"
: "Overhead view of the Ember Peak skillet beside the Seasoning & Care Kit: flaxseed oil, chainmail scrubber, cloth and care card"
}
href="#first-cook"
startNote="Opens the 10-minute first-cook guide."
expectations={[
{ icon: "mail", text: "Your receipt from Ember Peak lands in your inbox within minutes." },
{ icon: "truck", text: "Ships in 1 to 2 business days. Tracking follows by email." },
]}
guarantee={`Every item is covered by our ${defaults.sample.guarantee}.`}
changeMindHref={declined ? "#seasoning-kit" : undefined}
copy={declined ? { changeMind: "Changed your mind? Add the Seasoning & Care Kit" } : undefined}
state={pieceState}
/>
);
}
| Name | Type | Details |
|---|---|---|
decision OptionalOtoResultHero |
"accepted" | "declined" |
|
items OptionalOtoResultHero |
OtoResultItem[] |
|
total OptionalOtoResultHero |
string |
|
headline OptionalOtoResultHero |
React.ReactNode |
|
highlight OptionalOtoResultHero |
string |
|
lead OptionalOtoResultHero |
React.ReactNode |
|
image OptionalOtoResultHero |
string |
|
imageAlt OptionalOtoResultHero |
string |
|
href OptionalOtoResultHero |
string |
|
onAction OptionalOtoResultHero |
() => void |
|
startLabel OptionalOtoResultHero |
string |
|
startNote OptionalOtoResultHero |
React.ReactNode |
|
expectations OptionalOtoResultHero |
OtoResultExpectation[] |
|
guarantee OptionalOtoResultHero |
React.ReactNode |
|
changeMindHref OptionalOtoResultHero |
string |
|
copy OptionalOtoResultHero |
Partial<OtoResultHeroCopy> |
|
state OptionalOtoResultHero |
"default" | "hover" | "active" | "disabled" |
|
className OptionalOtoResultHero |
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.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- 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.
product- The main product shot or cover (ebook, kit, bottle).
scene- A wide atmosphere photo behind or beside the copy.
-
68799e647a21ee64.webp
image/webp · 226 KB
-
763d85bc7cdbab9b.webp
image/webp · 134 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB