Price Justification 1
Price justification: answers "Why only $47?" down a numbered rail (what each piece costs on its own, why the kit costs less today, the guarantee) beside one decision card with a commit tick and the buy button.
Use it in a prompt
Use offer/price-justification 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/price-justification.tsx. - Import it and pass your copy and images (Props tab):
import { PriceJustification } from "@/components/funneldna/offer/price-justification"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/price-justification/component.tsx 431 lines
// layout: number-rail
// Price justification: answers "Why only $47?" down a numbered rail (what each piece costs on its own, why the kit costs less today, the guarantee) beside one decision card with a commit tick and the buy button.
import * as React from "react"
import { Check, CircleAlert, Lock, ShieldCheck } from "lucide-react"
export type PriceJustificationItem = {
name: string
detail?: string
/** What this piece costs on its own: supplied values only. */
value?: string
/** Thumbnail from the item-n image slot. */
image?: string
imageAlt?: string
}
/** Every visible word. Placeholders: {price} in label, {guarantee} in commit. */
export type PriceJustificationCopy = {
kitTitle: string
priceTitle: string
aloneLabel: string
togetherLabel: string
versus: string
guaranteeTitle: string
guaranteeText: string
commit: string
commitError: string
label: string
reassurance: string
}
export type PriceJustificationProps = {
/** Headline; {price} is replaced and carries the marker stroke. */
headline?: string
subhead?: React.ReactNode
price?: string
/** Supplied combined value of the pieces bought on their own; empty hides the comparison. */
regularPrice?: string
productName?: string
note?: string
/** Why the price is lower today. */
reason?: React.ReactNode
/** Supplied guarantee; empty hides the guarantee step and the commit tick. */
guarantee?: string
items?: PriceJustificationItem[]
/** Product composite from the product slot (transparent background). */
productImage?: string
productImageAlt?: string
copy?: Partial<PriceJustificationCopy>
href?: string
onAction?: () => void
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
const DEFAULT_COPY: PriceJustificationCopy = {
kitTitle: "Everything you need to build your first funnel",
priceTitle: "Get the whole kit for less than the pieces alone",
aloneLabel: "Each piece on its own",
togetherLabel: "The complete kit today",
versus: "vs.",
guaranteeTitle: "Try it for 30 days, risk-free",
guaranteeText: "Use the whole kit for 30 days. If it isn’t right for you, you get your money back.",
commit: "I understand I’m covered by the {guarantee}.",
commitError: "Tick the box to confirm, then tap the button again.",
label: "Send Me The Kit For {price}",
reassurance: "Secure checkout · Instant download",
}
const DEFAULT_ITEMS: PriceJustificationItem[] = [
{ name: "Funnel Planning Guide", detail: "Map your offer and the pages your funnel needs.", value: "$49" },
{ name: "Page Copy Workbook", detail: "Draft your headline, offer, and call to action.", value: "$29" },
{ name: "Launch Checklist", detail: "Review the links, forms, and next steps before launch.", value: "$19" },
]
type Step = { key: string; title: string; body: React.ReactNode }
export function PriceJustification({
headline = "Why only {price}?",
subhead = "Here’s what each piece costs on its own, and why the whole kit costs less today.",
price = "$47",
regularPrice = "$97",
productName = "The Funnel Starter Kit",
note = "One payment · Lifetime access",
reason = "Get the guide, workbook, and checklist in one download. One payment. Yours to keep.",
guarantee = "30-day money-back guarantee",
items = DEFAULT_ITEMS,
productImage,
productImageAlt = "",
copy,
href,
onAction,
state = "default",
className,
}: PriceJustificationProps) {
const c = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const headId = `${uid}-head`
const errorId = `${uid}-error`
const noteId = `${uid}-note`
const hasGuarantee = guarantee.trim().length > 0
const disabled = state === "disabled"
const [agreed, setAgreed] = React.useState(state !== "error")
const [showError, setShowError] = React.useState(state === "error")
const boxRef = React.useRef<HTMLInputElement>(null)
React.useEffect(() => {
setAgreed(state !== "error")
setShowError(state === "error")
}, [state])
const values = { price, guarantee, product: productName }
const errorOn = hasGuarantee && showError
const handleAction = (event: React.MouseEvent<HTMLElement>) => {
if (disabled) {
event.preventDefault()
return
}
if (hasGuarantee && !agreed) {
event.preventDefault()
setShowError(true)
boxRef.current?.focus()
return
}
onAction?.()
}
const steps: Step[] = []
if (items.length > 0) {
steps.push({
key: "kit",
title: c.kitTitle,
body: (
<ul className="pj-items">
{items.map((item, index) => (
<li className={item.image ? "pj-item" : "pj-item pj-item--plain"} key={`${item.name}-${index}`}>
{item.image ? (
<img
className="pj-thumb"
src={item.image}
alt={item.imageAlt ?? item.name}
width={64}
height={64}
loading="lazy"
decoding="async"
/>
) : null}
<div className="pj-item-text">
<p className="pj-item-name">{item.name}</p>
{item.detail ? <p className="pj-item-detail">{item.detail}</p> : null}
</div>
{item.value ? <p className="pj-item-value">{item.value}</p> : null}
</li>
))}
</ul>
),
})
}
steps.push({
key: "price",
title: c.priceTitle,
body: (
<>
<div className={regularPrice ? "pj-compare" : "pj-compare pj-compare--single"}>
{regularPrice ? (
<>
<div className="pj-tile pj-tile--alone">
<span className="pj-tile-label">{c.aloneLabel}</span>
<span className="pj-tile-price">{regularPrice}</span>
</div>
<span className="pj-vs">{c.versus}</span>
</>
) : null}
<div className="pj-tile pj-tile--kit">
<span className="pj-tile-label">{c.togetherLabel}</span>
<span className="pj-tile-price">{price}</span>
</div>
</div>
{reason ? <p className="pj-reason">{reason}</p> : null}
</>
),
})
if (hasGuarantee) {
steps.push({
key: "guarantee",
title: c.guaranteeTitle,
body: (
<div className="pj-guarantee">
<ShieldCheck className="pj-shield" aria-hidden="true" />
<p>{c.guaranteeText}</p>
</div>
),
})
}
const btnClass = [
"pj-btn",
!disabled && state === "hover" ? "is-hover" : "",
!disabled && state === "active" ? "is-active" : "",
]
.filter(Boolean)
.join(" ")
const describedBy = errorOn ? `${errorId} ${noteId}` : noteId
const buttonLabel = <span className="pj-btn-label">{fill(c.label, values)}</span>
const commitClass = ["pj-commit", agreed ? "is-on" : "", errorOn ? "is-error" : ""].filter(Boolean).join(" ")
return (
<section className={["cf-price-justification", className].filter(Boolean).join(" ")} aria-labelledby={headId}>
<style>{css}</style>
<header className="pj-head">
<h2 id={headId} className="pj-title">
{withNode(headline, "price", <span className="pj-mark">{price}</span>, values)}
</h2>
{subhead ? <p className="pj-sub">{subhead}</p> : null}
</header>
<div className="pj-layout">
<ol className="pj-rail">
{steps.map((step, index) => (
<li className="pj-step" key={step.key} style={{ "--i": index } as React.CSSProperties}>
<div className="pj-num-col" aria-hidden="true">
<span className="pj-num">{String(index + 1).padStart(2, "0")}</span>
{index < steps.length - 1 ? <span className="pj-line" /> : null}
</div>
<div className="pj-step-body">
<h3 className="pj-step-title">{step.title}</h3>
{step.body}
</div>
</li>
))}
</ol>
<aside className="pj-aside" aria-label={productName}>
<div className="pj-card">
{productImage ? (
<img
className="pj-card-img"
src={productImage}
alt={productImageAlt}
width={320}
height={180}
decoding="async"
/>
) : null}
<p className="pj-card-name">{productName}</p>
{note ? <p className="pj-card-note">{note}</p> : null}
{hasGuarantee ? (
<label className={commitClass}>
<span className="pj-box">
<input
ref={boxRef}
type="checkbox"
checked={agreed}
onChange={(event) => {
setAgreed(event.target.checked)
if (event.target.checked) setShowError(false)
}}
aria-invalid={errorOn || undefined}
aria-describedby={errorOn ? errorId : undefined}
/>
<Check className="pj-tick" aria-hidden="true" />
</span>
<span className="pj-commit-text">
{withNode(c.commit, "guarantee", <strong>{guarantee}</strong>, values)}
</span>
</label>
) : null}
{errorOn ? (
<p id={errorId} className="pj-error" role="alert">
<CircleAlert aria-hidden="true" />
{c.commitError}
</p>
) : null}
{href && !disabled ? (
<a className={btnClass} href={href} onClick={handleAction} aria-describedby={describedBy}>
{buttonLabel}
</a>
) : (
<button
type="button"
className={btnClass}
onClick={handleAction}
disabled={disabled}
aria-describedby={describedBy}
>
{buttonLabel}
</button>
)}
<p className="pj-reassure" id={noteId}>
<Lock aria-hidden="true" />
{c.reassurance}
</p>
</div>
</aside>
</div>
</section>
)
}
export default PriceJustification
function fill(template: string, values: Record<string, string>): string {
return Object.keys(values).reduce((text, key) => text.split(`{${key}}`).join(values[key]), template)
}
function withNode(
template: string,
key: string,
node: React.ReactNode,
values: Record<string, string>
): React.ReactNode {
const token = `{${key}}`
const at = template.indexOf(token)
if (at < 0) return fill(template, values)
return (
<>
{fill(template.slice(0, at), values)}
{node}
{fill(template.slice(at + token.length), values)}
</>
)
}
const css = `
.cf-price-justification{--pj-shadow:var(--shadow, oklch(0.22 0.03 260));--pj-hair:oklch(from var(--ink) l c h / 0.13);--pj-marker:var(--marker, oklch(0.92 0.13 95 / 0.85));container:pj-root / inline-size;width:100%;max-width:72rem;margin-inline:auto;color:var(--ink);font-family:var(--font-body);font-size:1rem;line-height:1.5}
.cf-price-justification,.cf-price-justification *,.cf-price-justification *::before,.cf-price-justification *::after{box-sizing:border-box}
.cf-price-justification :where(h2,h3,p,ul,ol){margin:0}
.cf-price-justification :where(ul,ol){padding:0;list-style:none}
.cf-price-justification .pj-head{margin-bottom:2.25rem}
.cf-price-justification .pj-title{font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);letter-spacing:var(--display-tracking, -0.03em);font-size:clamp(2.5rem, 1.25rem + 6cqi, 4.75rem);line-height:1.02;color:var(--ink);text-wrap:balance}
.cf-price-justification .pj-mark{background-image:linear-gradient(transparent 56%, var(--pj-marker) 56%, var(--pj-marker) 94%, transparent 94%);padding-inline:0.06em;border-radius:0.1em 0.2em 0.12em 0.24em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-price-justification .pj-sub{margin-top:clamp(0.875rem, 0.5rem + 1.5cqi, 1.375rem);max-width:44rem;font-size:clamp(1.125rem, 1rem + 0.5cqi, 1.3125rem);font-weight:500;line-height:1.45;color:var(--muted);text-wrap:pretty}
.cf-price-justification .pj-layout{--pj-num:3rem;--pj-gap:0.875rem;display:grid;gap:2.25rem}
.cf-price-justification .pj-step{display:grid;grid-template-columns:var(--pj-num) minmax(0, 1fr);column-gap:var(--pj-gap)}
.cf-price-justification .pj-num-col{display:flex;flex-direction:column;align-items:center}
.cf-price-justification .pj-num{font-family:var(--font-display);font-weight:var(--display-weight, 800);font-size:2.75rem;line-height:0.9;letter-spacing:-0.04em;color:var(--accent);font-variant-numeric:tabular-nums lining-nums}
.cf-price-justification .pj-line{position:relative;flex:1 1 auto;width:3px;min-height:2rem;margin-block:0.75rem 0.5rem;border-radius:3px;background:var(--pj-hair);overflow:hidden}
.cf-price-justification .pj-line::after{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--accent-fill,var(--accent));transform-origin:top}
.cf-price-justification .pj-step-body{min-width:0;padding-bottom:2.5rem}
.cf-price-justification .pj-step:last-child .pj-step-body{padding-bottom:0}
.cf-price-justification .pj-step-title{margin-bottom:1rem;padding-top:0.3rem;font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);font-size:1.375rem;line-height:1.2;letter-spacing:-0.015em;color:var(--ink);text-wrap:balance}
.cf-price-justification .pj-item{display:grid;grid-template-columns:3.5rem minmax(0, 1fr) auto;column-gap:0.875rem;align-items:start;padding-block:0.875rem}
.cf-price-justification .pj-item.pj-item--plain{grid-template-columns:minmax(0, 1fr) auto}
.cf-price-justification .pj-item:first-child{padding-top:0}
.cf-price-justification .pj-item + .pj-item{border-top:1px solid var(--pj-hair)}
.cf-price-justification .pj-thumb{display:block;width:3.5rem;height:3.5rem;border-radius:0.625rem;object-fit:cover;object-position:center;outline:1px solid oklch(from var(--ink) l c h / 0.08);outline-offset:-1px}
.cf-price-justification .pj-item-name{font-size:1.0625rem;font-weight:700;line-height:1.3;color:var(--ink);text-wrap:pretty}
.cf-price-justification .pj-item-detail{margin-top:0.25rem;font-size:0.9375rem;line-height:1.45;color:var(--muted);text-wrap:pretty}
.cf-price-justification .pj-item-value{padding-left:0.5rem;font-family:var(--font-display);font-weight:var(--display-weight, 800);font-size:1.25rem;line-height:1.2;color:var(--ink);font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}
.cf-price-justification .pj-compare{display:grid;grid-template-columns:minmax(0, 1fr);gap:0.625rem}
.cf-price-justification .pj-tile{display:flex;flex-direction:column;justify-content:center;gap:0.5rem;min-width:0;padding:1rem 1.25rem;border-radius:var(--radius, 12px)}
.cf-price-justification .pj-tile--alone{background:color-mix(in oklch, var(--ink) 4%, var(--surface))}
.cf-price-justification .pj-tile--kit{background:color-mix(in oklch, var(--accent-fill, var(--accent)) 10%, var(--card));box-shadow:inset 0 0 0 1.5px oklch(from var(--accent-fill, var(--accent)) l c h / 0.4)}
.cf-price-justification .pj-tile-label{font-size:0.9375rem;font-weight:700;line-height:1.3;color:var(--muted);text-wrap:balance}
.cf-price-justification .pj-tile--kit .pj-tile-label{color:var(--ink)}
.cf-price-justification .pj-tile-price{font-family:var(--font-display);font-weight:var(--display-weight, 800);font-size:2rem;line-height:1;letter-spacing:-0.03em;color:var(--muted);font-variant-numeric:tabular-nums lining-nums}
.cf-price-justification .pj-tile--kit .pj-tile-price{font-size:2.75rem;color:var(--ink)}
.cf-price-justification .pj-vs{position:relative;z-index:1;display:grid;place-items:center;justify-self:center;align-self:center;min-width:2.75rem;height:2.75rem;margin-block:-1.25rem;padding-inline:0.75rem;border-radius:999px;background:var(--secondary, color-mix(in oklch, var(--ink) 8%, var(--card)));color:var(--secondary-ink, var(--ink));font-size:0.9375rem;font-weight:800;line-height:1;outline:4px solid var(--surface)}
.cf-price-justification .pj-reason{margin-top:1rem;max-width:60ch;font-size:1.0625rem;line-height:1.55;color:var(--ink);text-wrap:pretty}
.cf-price-justification .pj-guarantee{display:grid;grid-template-columns:auto minmax(0, 1fr);gap:0.75rem;align-items:start}
.cf-price-justification .pj-shield{width:1.75rem;height:1.75rem;color:var(--success);stroke-width:2.25}
.cf-price-justification .pj-guarantee p{max-width:56ch;font-size:1.0625rem;line-height:1.55;color:var(--ink);text-wrap:pretty}
.cf-price-justification .pj-aside{min-width:0}
.cf-price-justification .pj-card{position:relative;padding:1.5rem 1.25rem 1.25rem;border:1px solid var(--card-border, color-mix(in oklch, var(--ink) 12%, transparent));border-radius:var(--card-radius, calc(var(--radius, 12px) + 4px));background:var(--card);color:var(--ink);text-align:center;box-shadow:var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--pj-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--pj-shadow) l c h / 0.32)))}
.cf-price-justification .pj-card-img{display:block;width:100%;max-width:16rem;height:9rem;margin:0 auto 1rem;object-fit:contain;object-position:center;filter:drop-shadow(0 2px 2px oklch(from var(--pj-shadow) l c h / 0.22)) drop-shadow(0 10px 10px oklch(from var(--pj-shadow) l c h / 0.18))}
.cf-price-justification .pj-card-name{font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);font-size:1.5rem;line-height:1.15;letter-spacing:-0.02em;color:var(--ink);text-wrap:balance}
.cf-price-justification .pj-card-note{margin-top:0.5rem;font-size:1rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-price-justification .pj-commit{display:grid;grid-template-columns:auto minmax(0, 1fr);gap:0.75rem;align-items:start;margin-top:1.25rem;padding:0.875rem 1rem;border-radius:calc(var(--radius, 12px) * 0.75);background:color-mix(in oklch, var(--ink) 4%, var(--card));text-align:left;cursor:pointer}
.cf-price-justification .pj-commit.is-on{background:var(--success-soft, color-mix(in oklch, var(--success) 14%, var(--card)))}
.cf-price-justification .pj-commit.is-error{background:var(--danger-soft, color-mix(in oklch, var(--danger) 14%, var(--card)));box-shadow:inset 0 0 0 1.5px var(--danger)}
.cf-price-justification .pj-commit-text{font-size:1rem;line-height:1.45;color:var(--ink);text-wrap:pretty}
.cf-price-justification .pj-commit-text strong{font-weight:700}
.cf-price-justification .pj-box{position:relative;display:grid;width:1.5rem;height:1.5rem;margin-top:0.0625rem}
.cf-price-justification .pj-box input{-webkit-appearance:none;appearance:none;width:100%;height:100%;margin:0;border:2px solid oklch(from var(--ink) l c h / 0.45);border-radius:0.4rem;background:var(--field, var(--card));cursor:pointer}
.cf-price-justification .pj-box input:checked{border-color:var(--success);background:var(--success)}
.cf-price-justification .pj-commit.is-error .pj-box input{border-color:var(--danger)}
.cf-price-justification .pj-box input:focus-visible{outline:3px solid var(--field-focus, var(--accent));outline-offset:2px}
.cf-price-justification .pj-tick{position:absolute;left:0.1875rem;top:0.1875rem;width:1.125rem;height:1.125rem;color:var(--card);stroke-width:3.25;pointer-events:none;opacity:0;transform:scale(0.6)}
.cf-price-justification .pj-box input:checked + .pj-tick{opacity:1;transform:none}
.cf-price-justification .pj-error{display:flex;align-items:flex-start;gap:0.5rem;margin-top:0.625rem;font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-align:left;text-wrap:pretty}
.cf-price-justification .pj-error svg{flex:none;width:1.125rem;height:1.125rem;margin-top:0.1rem}
.cf-price-justification .pj-btn{--pj-btn:var(--button-bg, var(--cta));--pj-btn-2:var(--button-bg-2, var(--cta-2));position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;justify-content:center;width:100%;min-height:3.75rem;margin-top:1rem;padding:0.875rem 1rem;border:0;border-radius:var(--button-radius, var(--radius, 12px));background:linear-gradient(180deg, oklch(from var(--pj-btn) calc(l + 0.03) c h), var(--pj-btn-2));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:1.0625rem;line-height:1.15;letter-spacing:-0.005em;text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow, none);text-wrap:balance;cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--pj-btn) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--pj-btn-2) calc(l - 0.12) c h), 0 1px 2px oklch(from var(--pj-shadow) l c h / 0.35), 0 6px 12px -4px oklch(from var(--pj-shadow) l c h / 0.45))}
.cf-price-justification .pj-btn::before{content:"";position:absolute;top:0;bottom:0;left:-40%;z-index:-1;width:35%;background:linear-gradient(100deg, transparent, oklch(from var(--pj-btn) calc(l + 0.2) c h / 0.35), transparent);opacity:0;pointer-events:none}
.cf-price-justification .pj-btn-label{position:relative}
.cf-price-justification .pj-btn:not(:disabled):hover,.cf-price-justification .pj-btn.is-hover{background:linear-gradient(180deg, oklch(from var(--pj-btn) calc(l - 0.02) c h), oklch(from var(--pj-btn-2) calc(l - 0.04) c h));transform:translateY(-1px)}
.cf-price-justification .pj-btn:not(:disabled):active,.cf-price-justification .pj-btn.is-active{background:linear-gradient(180deg, var(--pj-btn-2), oklch(from var(--pj-btn-2) calc(l - 0.05) c h));transform:translateY(1px);box-shadow:inset 0 2px 3px oklch(from var(--pj-btn-2) calc(l - 0.18) c h / 0.5), inset 0 -1px 0 oklch(from var(--pj-btn-2) calc(l - 0.12) c h), 0 1px 1px oklch(from var(--pj-shadow) l c h / 0.3)}
.cf-price-justification .pj-btn:focus-visible{outline:3px solid var(--field-focus, var(--accent));outline-offset:3px}
.cf-price-justification .pj-btn:disabled{cursor:not-allowed;opacity:0.55;filter:saturate(0.5);transform:none}
.cf-price-justification .pj-reassure{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0.375rem;margin-top:0.875rem;font-size:0.9375rem;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-price-justification .pj-reassure svg{flex:none;width:1rem;height:1rem}
@container pj-root (min-width: 600px){
.cf-price-justification .pj-layout{--pj-num:5.5rem;--pj-gap:1.5rem}
.cf-price-justification .pj-num{font-size:4.5rem}
.cf-price-justification .pj-step-title{padding-top:0.875rem;font-size:1.5rem}
.cf-price-justification .pj-step-body{padding-bottom:3rem}
.cf-price-justification .pj-item{grid-template-columns:4rem minmax(0, 1fr) auto;column-gap:1rem}
.cf-price-justification .pj-thumb{width:4rem;height:4rem}
.cf-price-justification .pj-compare{grid-template-columns:minmax(0, 1fr) auto minmax(0, 1.15fr)}
.cf-price-justification .pj-compare.pj-compare--single{grid-template-columns:minmax(0, 22rem)}
.cf-price-justification .pj-vs{margin-block:0;margin-inline:-1.25rem}
.cf-price-justification .pj-tile{min-height:7.5rem;padding:1.25rem 1.5rem}
.cf-price-justification .pj-tile--kit .pj-tile-price{font-size:3.25rem}
.cf-price-justification .pj-aside{padding-left:calc(var(--pj-num) + var(--pj-gap))}
.cf-price-justification .pj-card{max-width:30rem;padding:1.75rem 1.5rem 1.5rem}
.cf-price-justification .pj-btn{font-size:1.1875rem}
}
@container pj-root (min-width: 880px){
.cf-price-justification .pj-layout{grid-template-columns:minmax(0, 1fr) 23.5rem;column-gap:3rem;align-items:start}
.cf-price-justification .pj-aside{position:sticky;top:1.5rem;align-self:start;padding-left:0}
.cf-price-justification .pj-card{max-width:none}
}
@media (prefers-reduced-motion: no-preference){
.cf-price-justification .pj-step{animation:cf-pj-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;animation-delay:calc(var(--i, 0) * 70ms)}
.cf-price-justification .pj-card{animation:cf-pj-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.14s both}
.cf-price-justification .pj-commit{transition:background-color 0.2s ease, box-shadow 0.2s ease}
.cf-price-justification .pj-tick{transition:opacity 0.15s ease, transform 0.22s cubic-bezier(0.3, 1.6, 0.5, 1)}
.cf-price-justification .pj-btn{transition:transform 0.14s ease, box-shadow 0.14s ease}
.cf-price-justification .pj-btn:not(:disabled):hover::before,.cf-price-justification .pj-btn.is-hover::before{animation:cf-pj-sheen 0.8s ease-out 1}
}
@supports (animation-timeline: view()){
@media (prefers-reduced-motion: no-preference){
.cf-price-justification .pj-line::after{animation:cf-pj-fill linear both;animation-timeline:view();animation-range:entry 10% cover 60%}
}
}
@keyframes cf-pj-rise{from{opacity:0.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-pj-fill{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes cf-pj-sheen{0%{opacity:0;transform:translateX(0)}20%{opacity:1}100%{opacity:0;transform:translateX(480%)}}
`
pieces/offer/price-justification/specimen.tsx 34 lines
import __studioImage085900f9 from "../assets/7b94aeb96b6e55d6.webp";
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { PriceJustification, type PriceJustificationProps } from "../price-justification"
export const states = ["default", "hover", "active", "disabled", "error"]
export default function PriceJustificationSpecimen({ state }: { state?: PriceJustificationProps["state"] }) {
const sample = defaults.sample
return (
<PriceJustification
state={state}
price={sample.price}
regularPrice={sample.regularPrice}
productName={sample.name}
note={sample.note}
reason={sample.reason}
guarantee={sample.guarantee}
items={sample.items.map((item, index) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot(`item-${index + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
productImage={slot(
"product",
__studioImage085900f9
)}
productImageAlt="The Funnel Starter Kit: planning guide, page copy workbook and launch checklist"
copy={{ reassurance: sample.sublabel }}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalPriceJustification |
string |
Default "Why only {price}?"
|
subhead OptionalPriceJustification |
React.ReactNode |
Default "Here’s what each piece costs on its own, and why the whole kit costs less today."
|
price OptionalPriceJustification |
string |
Default "$47"
|
regularPrice OptionalPriceJustification |
string |
Default "$97"
|
productName OptionalPriceJustification |
string |
Default "The Funnel Starter Kit"
|
note OptionalPriceJustification |
string |
Default "One payment · Lifetime access"
|
reason OptionalPriceJustification |
React.ReactNode |
Default "Get the guide, workbook, and checklist in one download. One payment. Yours to keep."
|
guarantee OptionalPriceJustification |
string |
Default "30-day money-back guarantee"
|
items OptionalPriceJustification |
PriceJustificationItem[] |
Default DEFAULT_ITEMS
|
productImage OptionalPriceJustification |
string |
|
productImageAlt OptionalPriceJustification |
string |
Default ""
|
copy OptionalPriceJustification |
Partial<PriceJustificationCopy> |
|
href OptionalPriceJustification |
string |
|
onAction OptionalPriceJustification |
() => void |
|
state OptionalPriceJustification |
"default" | "hover" | "active" | "disabled" | "error" |
Default "default"
|
className OptionalPriceJustification |
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-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.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
product- The main product shot or cover (ebook, kit, bottle).
-
7b94aeb96b6e55d6.webp
image/webp · 110 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB