Vip Pass Upgrade 1
Offers a VIP kit upgrade beside the buyer’s saved free ticket.
Use it in a prompt
Use offer/vip-pass-upgrade 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/vip-pass-upgrade.tsx. - Import it and pass your copy and images (Props tab):
import { VipPassUpgrade } from "@/components/funneldna/offer/vip-pass-upgrade"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/vip-pass-upgrade/component.tsx 640 lines
// Offers a VIP kit upgrade beside the buyer’s saved free ticket.
'use client'
import * as React from "react"
import {
AlertCircle,
BadgePercent,
Check,
Crown,
Loader2,
MonitorPlay,
ShieldCheck,
Sparkles,
Ticket,
Zap,
} from "lucide-react"
export type VipPassUpgradeProps = {
/** Supporting labels and plain-text templates; named placeholders are documented below. */
copy?: Partial<VipPassUpgradeCopy>
/** Headline text before the marker-highlighted phrase. */
headline?: string
/** The phrase that gets the marker stroke at the end of the headline. */
headlineEmphasis?: string
lead?: string
eventName?: string
freeLabel?: string
freeStatus?: string
freeMeta?: string
freeIncludes?: string[]
freePriceLabel?: string
freePrice?: string
vipLabel?: string
vipTitle?: string
vipIntro?: string
items?: VipPassItem[]
/** Struck total value; shown (with the calculated saving) only when supplied. */
totalValue?: string
price?: string
priceLabel?: string
priceNote?: string
label?: string
loadingLabel?: string
reassurance?: string[]
declineLabel?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
successTitle?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
successText?: string
errorText?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
declinedTitle?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
declinedText?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
reconsiderLabel?: string
/** Product shot of what the VIP pass adds (shown under the free ticket on wide screens). */
/** productImage is the canonical slot image; kitImage is retained for compatibility. */
productImage?: string
kitImage?: string
kitImageAlt?: string
kitCaption?: string
/** Subtle event photo behind the band (kept under a solid band-colour scrim). */
/** sceneImage is the canonical slot image; backdropImage is retained for compatibility. */
sceneImage?: string
backdropImage?: string
disabled?: boolean
/** Studio / preview state. Interactive states also run locally. */
state?: VipPassState
/** Called on upgrade. While its promise is pending the button shows loadingLabel; a rejection shows errorText. */
onAction?: () => void | Promise<void>
/** Legacy alias for onAction; the canonical callback takes precedence. */
onUpgrade?: () => void | Promise<void>
onDecline?: () => void
className?: string
id?: string
}
export function VipPassUpgrade({
headline = "Your free seat is saved. Now make it",
headlineEmphasis = "all-access.",
lead = "Go VIP and get The Funnel Starter Kit to work through while you watch: the planning guide, the copy workbook and the launch checklist.",
eventName = "Funnel Starter Workshop",
freeLabel = "Free ticket",
freeStatus = "Seat saved",
freeMeta = "Free workshop · Watch online",
freeIncludes = ["Watch the full workshop online", "Walk through your offer, page copy, and next steps"],
freePriceLabel = "Your price",
freePrice = "Free",
vipLabel = "VIP All-Access Pass",
vipTitle = "The Funnel Starter Kit",
vipIntro = "Everything in your free ticket, plus:",
items: suppliedItems = DEFAULT_ITEMS,
totalValue,
price = "$47",
priceLabel = "Your VIP upgrade today",
priceNote,
label = "Yes! Upgrade Me To VIP",
loadingLabel = "Upgrading your pass…",
reassurance = [],
declineLabel = "No thanks, I’ll keep my free ticket",
errorText = "We couldn’t upgrade your pass. Please try again.",
kitImage: legacyKitImage,
productImage: kitImage = legacyKitImage,
kitImageAlt,
kitCaption,
backdropImage: legacyBackdropImage,
sceneImage: backdropImage = legacyBackdropImage,
disabled = false,
state = "default",
onUpgrade,
onAction = onUpgrade,
onDecline,
className,
id,
copy,
}: VipPassUpgradeProps) {
const text = { ...DEFAULT_COPY, ...copy }
const items = suppliedItems.map(item => ({ ...item, image: item.itemImage === undefined ? item.image : item.itemImage }))
const [phase, setPhase] = React.useState<Phase>(() => phaseFor(state))
React.useEffect(() => {
setPhase(phaseFor(state))
}, [state])
const mounted = React.useRef(true)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const headingId = React.useId()
const isDisabled = disabled || state === "disabled"
const force = state === "hover" || state === "active" ? state : undefined
const loading = phase === "loading"
const save = savings(totalValue, price)
const pct = savingsPct(totalValue, price)
const cardRef = React.useRef<HTMLElement>(null)
const tiltOk = React.useRef(false)
const resetTilt = () => {
const el = cardRef.current
if (!el) return
el.style.setProperty("--rx", "0deg")
el.style.setProperty("--ry", "0deg")
}
React.useEffect(() => {
if (typeof window === "undefined" || !window.matchMedia) return
const mq = window.matchMedia("(hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference)")
const sync = () => {
tiltOk.current = mq.matches
if (!mq.matches) resetTilt()
}
sync()
mq.addEventListener?.("change", sync)
return () => mq.removeEventListener?.("change", sync)
}, [])
const onTilt = (e: React.PointerEvent<HTMLElement>) => {
const el = cardRef.current
if (!el || !tiltOk.current || e.pointerType !== "mouse") return
const r = el.getBoundingClientRect()
const x = (e.clientX - r.left) / r.width - 0.5
const y = (e.clientY - r.top) / r.height - 0.5
el.style.setProperty("--ry", `${(x * 4).toFixed(2)}deg`)
el.style.setProperty("--rx", `${(-y * 3).toFixed(2)}deg`)
}
const upgrade = async () => {
if (isDisabled || loading || !onAction) return
setPhase("loading")
try {
await onAction()
if (mounted.current) setPhase("idle")
} catch {
if (mounted.current) setPhase("error")
}
}
const decline = () => {
if (loading) return
onDecline?.()
}
return (
<section
id={id}
className={["cf-vip-pass-upgrade", className].filter(Boolean).join(" ")}
data-phase={phase}
aria-labelledby={headingId}
>
<style>{css}</style>
<div className="vpu-bg" aria-hidden="true">
{backdropImage ? <img src={backdropImage} alt="" width={1600} height={900} decoding="async" /> : null}
</div>
<div className="vpu-inner">
<header className="vpu-head">
<h2 id={headingId} className="vpu-title">
{headline}{" "}
<span className="vpu-em">{headlineEmphasis}</span>
</h2>
{lead ? <p className="vpu-lead">{lead}</p> : null}
</header>
<div className="vpu-stage">
<div className="vpu-free">
<article className="vpu-pass vpu-freecard" aria-label={copyText(text.freeAria, { label: freeLabel, event: eventName })}>
<span className="vpu-slot" aria-hidden="true" />
<div className="vpu-freehead">
<span className="vpu-passlabel">
<Ticket aria-hidden="true" />
{freeLabel}
</span>
<span className="vpu-chip vpu-chip-ok">
<Check aria-hidden="true" />
{freeStatus}
</span>
</div>
<div className="vpu-freebody">
<h3 className="vpu-event">{eventName}</h3>
{freeMeta ? (
<p className="vpu-meta">
<MonitorPlay aria-hidden="true" />
{freeMeta}
</p>
) : null}
{freeIncludes.length ? (
<ul className="vpu-freelist">
{freeIncludes.map((line) => (
<li key={line}>
<Check aria-hidden="true" />
<span>{line}</span>
</li>
))}
</ul>
) : null}
<div className="vpu-freeprice">
<span>{freePriceLabel}</span>
<strong>{freePrice}</strong>
</div>
</div>
</article>
{kitImage ? (
<figure className="vpu-kit">
<div className="vpu-kit-img">
<img
src={kitImage}
alt={kitImageAlt ?? copyText(text.productAlt, { title: vipTitle })}
width={800}
height={600}
loading="lazy"
decoding="async"
/>
</div>
<figcaption>
<strong>{vipTitle}</strong>
{kitCaption ? <span>{kitCaption}</span> : null}
</figcaption>
</figure>
) : null}
</div>
<div className="vpu-vip">
<div className="vpu-hang">
<span className="vpu-strap vpu-strap-l" aria-hidden="true" />
<span className="vpu-strap vpu-strap-r" aria-hidden="true" />
<span className="vpu-clip" aria-hidden="true" />
<article
ref={cardRef}
className="vpu-pass vpu-vipcard"
data-force={force}
aria-label={copyText(text.vipAria, { label: vipLabel, event: eventName, title: vipTitle })}
onPointerMove={onTilt}
onPointerLeave={resetTilt}
>
<span className="vpu-slot" aria-hidden="true" />
<div className="vpu-viphead">
<span className="vpu-passlabel">
<span className="vpu-crown">
<Crown aria-hidden="true" />
</span>
{vipLabel}
</span>
<span className="vpu-chip vpu-chip-vip">
<Sparkles aria-hidden="true" />
{text.upgrade}
</span>
</div>
<div className="vpu-vipbody">
<h3 className="vpu-event">{eventName}</h3>
<p className="vpu-plus">
<span aria-hidden="true">{text.plus}</span>
{vipTitle}
</p>
{vipIntro ? <p className="vpu-intro">{vipIntro}</p> : null}
<ul className="vpu-items">
{items.map((item) => (
<li key={item.name} className={item.image ? undefined : "vpu-noimg"}>
{item.image ? (
<img src={item.image} alt={item.imageAlt ?? item.name} width={120} height={120} loading="lazy" decoding="async" />
) : (
<span className="vpu-tick">
<Check aria-hidden="true" />
</span>
)}
<div className="vpu-itemtext">
<strong>{item.name}</strong>
{item.detail ? <span>{item.detail}</span> : null}
</div>
{item.value ? <span className="vpu-value">{item.value} {text.itemValue}</span> : null}
</li>
))}
</ul>
<div className="vpu-price">
<div className="vpu-price-copy">
<p className="vpu-today">{priceLabel}</p>
{priceNote ? <p className="vpu-pnote">{priceNote}</p> : null}
</div>
<div className="vpu-tag">
{totalValue ? (
<p className="vpu-was">
<span>{text.totalValue}</span>
<s>{totalValue}</s>
</p>
) : null}
<p className="vpu-amount">
<span className="vpu-sr">{text.today}</span>
{price}
</p>
{save ? (
<p className="vpu-save">
<BadgePercent aria-hidden="true" />
{copyText(text.savings, { amount: save })}
{pct ? copyText(text.savingsPercent, { percent: pct }) : ""}
</p>
) : null}
</div>
</div>
</div>
</article>
</div>
</div>
<div className="vpu-action" aria-live="polite">
<button
type="button"
className="vpu-btn"
data-force={force}
disabled={isDisabled}
aria-busy={loading || undefined}
onClick={upgrade}
>
{loading ? (
<>
<Loader2 className="vpu-spin" aria-hidden="true" />
<span className="vpu-btn-label">{loadingLabel}</span>
</>
) : (
<>
<Crown className="vpu-btn-ico" aria-hidden="true" />
<span className="vpu-btn-label">{label}</span>
<span className="vpu-btn-pad" aria-hidden="true" />
</>
)}
</button>
{phase === "error" ? (
<p className="vpu-alert" role="alert">
<AlertCircle aria-hidden="true" />
{errorText}
</p>
) : null}
{reassurance.length ? (
<ul className="vpu-assure">
{reassurance.map((line) => {
const Icon = assureIcon(line)
return (
<li key={line}>
<Icon aria-hidden="true" />
{line}
</li>
)
})}
</ul>
) : null}
<button type="button" className="vpu-decline" onClick={decline} disabled={loading}>
{declineLabel}
</button>
</div>
</div>
</div>
</section>
)
}
export default VipPassUpgrade
export type VipPassItem = {
name: string
detail?: string
value?: string
/** Image for this item’s item-N slot; takes precedence over legacy image. */
itemImage?: string
image?: string
imageAlt?: string
}
export type VipPassState = "default" | "hover" | "active" | "disabled" | "error" | "success"
type Phase = "idle" | "loading" | "error"
const DEFAULT_ITEMS: VipPassItem[] = [
{ name: "Funnel Planning Guide", detail: "Map your offer and the pages your funnel needs." },
{ name: "Page Copy Workbook", detail: "Draft your headline, offer, and call to action." },
{ name: "Launch Checklist", detail: "Review the links, forms, and next steps before launch." },
]
function toAmount(value?: string): number | null {
if (!value) return null
const n = Number(value.replace(/[^0-9.]/g, ""))
return Number.isFinite(n) && n > 0 ? n : null
}
function savings(total?: string, price?: string): string | null {
const t = toAmount(total)
const p = toAmount(price)
if (t === null || p === null || t <= p || !price) return null
const symbol = (price.match(/^[^0-9]*/)?.[0] ?? "").trim() || "$"
const diff = t - p
return `${symbol}${Number.isInteger(diff) ? diff : diff.toFixed(2)}`
}
function savingsPct(total?: string, price?: string): number | null {
const t = toAmount(total)
const p = toAmount(price)
if (t === null || p === null || t <= p) return null
const pct = Math.round(((t - p) / t) * 100)
return pct > 0 ? pct : null
}
function phaseFor(state?: VipPassState): Phase {
return state === "error" ? "error" : "idle"
}
function assureIcon(line: string) {
if (/guarantee|refund|money/i.test(line)) return ShieldCheck
if (/instant|access|download/i.test(line)) return Zap
return Check
}
// Designed images, the default marker yellow and the white glyph in a solid status badge retain their approved colours.
const css = `
.cf-vip-pass-upgrade{--vpu-sh:var(--shadow, oklch(0.22 0.03 260));--vpu-marker:var(--marker, #fae37c);--vpu-fill:var(--accent-fill, var(--accent));--vpu-fill-ink:var(--accent-fill-ink, var(--card));--vpu-well:color-mix(in oklch,var(--ink) 4%,var(--card));--vpu-pad:clamp(20px,2.6vw,28px);--vpu-hang:3.5rem;position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body,Arial,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);-webkit-font-smoothing:antialiased}
.cf-vip-pass-upgrade *,.cf-vip-pass-upgrade *::before,.cf-vip-pass-upgrade *::after{box-sizing:border-box}
.cf-vip-pass-upgrade svg{stroke-width:2.5}
:where(.cf-vip-pass-upgrade) .vpu-bg{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
:where(.cf-vip-pass-upgrade) .vpu-bg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 30%;opacity:.7;filter:saturate(.85)}
:where(.cf-vip-pass-upgrade) .vpu-bg::after{content:"";position:absolute;inset:0;background:oklch(from var(--band) l c h / 0.85)}
:where(.cf-vip-pass-upgrade) .vpu-inner{position:relative;max-width:70rem;margin:0 auto}
:where(.cf-vip-pass-upgrade) .vpu-head{max-width:52rem;margin:0 auto;text-align:center}
:where(.cf-vip-pass-upgrade) .vpu-title{margin:0;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(2.25rem,1.35rem + 3.4vw,4rem);font-weight:var(--display-weight, 800);line-height:1.04;letter-spacing:var(--display-tracking, -0.025em);text-transform:var(--display-case, none);color:var(--band-ink);text-wrap:balance}
:where(.cf-vip-pass-upgrade) .vpu-em{white-space:nowrap;color:var(--ink);padding:0 .14em;margin-right:-.04em;border-radius:.28em .5em .34em .44em;background:linear-gradient(180deg,transparent 7%,var(--vpu-marker) 7%,var(--vpu-marker) 97%,transparent 97%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
:where(.cf-vip-pass-upgrade) .vpu-lead{max-width:40rem;margin:clamp(16px,1.6vw,20px) auto 0;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.45;color:var(--band-ink);text-wrap:pretty}
:where(.cf-vip-pass-upgrade) .vpu-stage{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);align-items:start;column-gap:clamp(32px,5vw,64px);margin:clamp(24px,3.5vw,40px) auto 0}
:where(.cf-vip-pass-upgrade) .vpu-free{grid-column:1;grid-row:1/span 2;padding-top:var(--vpu-hang);animation:vpu-rise .45s cubic-bezier(.2,.7,.2,1) both}
:where(.cf-vip-pass-upgrade) .vpu-vip{grid-column:2;grid-row:1}
:where(.cf-vip-pass-upgrade) .vpu-action{grid-column:2;grid-row:2;width:100%;max-width:34rem;justify-self:center;margin-top:clamp(28px,3vw,36px);text-align:center;animation:vpu-rise .45s cubic-bezier(.2,.7,.2,1) .14s both}
:where(.cf-vip-pass-upgrade) .vpu-pass{position:relative;overflow:hidden;border:1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius, var(--radius, 14px));background:var(--card);color:var(--ink)}
:where(.cf-vip-pass-upgrade) .vpu-slot{position:absolute;top:12px;left:50%;z-index:1;width:3.25rem;height:.625rem;margin-left:-1.625rem;border-radius:999px;background:var(--band);box-shadow:inset 0 2px 3px oklch(from var(--vpu-sh) l c h / 0.55)}
:where(.cf-vip-pass-upgrade) .vpu-passlabel{display:inline-flex;align-items:center;gap:10px;font-family:var(--font-body,Arial,sans-serif);font-size:.9375rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase}
:where(.cf-vip-pass-upgrade) .vpu-passlabel > svg{flex:none;width:20px;height:20px}
:where(.cf-vip-pass-upgrade) .vpu-chip{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:4px 12px;border-radius:999px;font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
:where(.cf-vip-pass-upgrade) .vpu-chip svg{flex:none;width:16px;height:16px}
:where(.cf-vip-pass-upgrade) .vpu-chip-ok{background:var(--success-soft);color:var(--success)}
:where(.cf-vip-pass-upgrade) .vpu-chip-vip{background:var(--vpu-fill-ink);color:var(--vpu-fill)}
:where(.cf-vip-pass-upgrade) .vpu-event{margin:0;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.3125rem,1.8vw,1.625rem);font-weight:var(--display-weight, 800);line-height:1.15;letter-spacing:var(--display-tracking, -0.01em);text-transform:var(--display-case, none);color:var(--ink);text-wrap:balance}
:where(.cf-vip-pass-upgrade) .vpu-freecard{box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-vip-pass-upgrade) .vpu-freehead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:36px var(--vpu-pad) 16px;background:color-mix(in oklch,var(--ink) 5%,var(--card));border-bottom:1px solid oklch(from var(--ink) l c h / 0.09);color:var(--ink)}
:where(.cf-vip-pass-upgrade) .vpu-freehead .vpu-passlabel > svg{color:var(--muted)}
:where(.cf-vip-pass-upgrade) .vpu-freebody{padding:20px var(--vpu-pad) var(--vpu-pad)}
:where(.cf-vip-pass-upgrade) .vpu-meta{margin:12px 0 0;color:var(--muted);font-size:.9375rem;font-weight:700;line-height:1.4;text-wrap:pretty}
:where(.cf-vip-pass-upgrade) .vpu-meta svg{display:inline-block;width:18px;height:18px;vertical-align:-.22em;margin-inline-end:.45em}
:where(.cf-vip-pass-upgrade) .vpu-freelist{display:grid;gap:10px;margin:16px 0 0;padding:0;list-style:none}
:where(.cf-vip-pass-upgrade) .vpu-freelist li{display:flex;align-items:flex-start;gap:10px;font-size:1.0625rem;line-height:1.45;color:var(--ink);text-wrap:pretty}
:where(.cf-vip-pass-upgrade) .vpu-freelist svg{flex:none;width:18px;height:18px;margin-top:.2em;color:var(--success)}
:where(.cf-vip-pass-upgrade) .vpu-freeprice{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px;padding:12px 16px;border-radius:10px;background:var(--vpu-well)}
:where(.cf-vip-pass-upgrade) .vpu-freeprice span{color:var(--muted);font-size:.9375rem;font-weight:700}
:where(.cf-vip-pass-upgrade) .vpu-freeprice strong{font-family:var(--font-display,Arial,sans-serif);font-size:1.625rem;font-weight:var(--display-weight, 800);line-height:1;letter-spacing:var(--display-tracking, -0.01em);text-transform:var(--display-case, none);color:var(--ink)}
:where(.cf-vip-pass-upgrade) .vpu-kit{margin:24px 0 0}
:where(.cf-vip-pass-upgrade) .vpu-kit-img{aspect-ratio:4/3;overflow:hidden;border-radius:12px;filter:drop-shadow(0 2px 3px oklch(from var(--vpu-sh) l c h / 0.3)) drop-shadow(0 12px 16px oklch(from var(--vpu-sh) l c h / 0.35))}
:where(.cf-vip-pass-upgrade) .vpu-kit-img img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%;border-radius:12px}
:where(.cf-vip-pass-upgrade) .vpu-kit figcaption{display:grid;gap:4px;padding:16px 8px 0;text-align:center}
:where(.cf-vip-pass-upgrade) .vpu-kit figcaption strong{font-family:var(--font-display,Arial,sans-serif);font-size:1.125rem;font-weight:var(--display-weight, 800);line-height:1.2;text-transform:var(--display-case, none);color:var(--band-ink)}
:where(.cf-vip-pass-upgrade) .vpu-kit figcaption span{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
:where(.cf-vip-pass-upgrade) .vpu-hang{position:relative;padding-top:var(--vpu-hang);transform-origin:50% 0;animation:vpu-swing 1.1s cubic-bezier(.33,.66,.35,1) .05s both}
:where(.cf-vip-pass-upgrade) .vpu-strap{position:absolute;top:-8px;left:50%;width:18px;height:3.9rem;margin-left:-9px;transform-origin:50% 100%;border-radius:3px;background:linear-gradient(90deg,oklch(from var(--vpu-fill) calc(l - 0.1) c h) 0 2px,var(--vpu-fill) 2px calc(100% - 2px),oklch(from var(--vpu-fill) calc(l - 0.1) c h) calc(100% - 2px));box-shadow:0 1px 2px oklch(from var(--vpu-sh) l c h / 0.35)}
:where(.cf-vip-pass-upgrade) .vpu-strap-l{transform:translateX(-14px) rotate(-16deg)}
:where(.cf-vip-pass-upgrade) .vpu-strap-r{transform:translateX(14px) rotate(16deg)}
:where(.cf-vip-pass-upgrade) .vpu-clip{position:absolute;top:2.6rem;left:50%;z-index:3;width:2.4rem;height:1.85rem;margin-left:-1.2rem;border-radius:8px 8px 12px 12px;background:linear-gradient(180deg,oklch(from var(--band-ink) calc(l - 0.04) 0 0),oklch(from var(--band-ink) calc(l - 0.32) 0 0));box-shadow:inset 0 1px 0 oklch(from var(--band-ink) l 0 0 / 0.8),inset 0 -2px 0 oklch(from var(--vpu-sh) l c h / 0.25),0 1px 2px oklch(from var(--vpu-sh) l c h / 0.4),0 4px 8px -2px oklch(from var(--vpu-sh) l c h / 0.35)}
:where(.cf-vip-pass-upgrade) .vpu-clip::after{content:"";position:absolute;left:9px;right:9px;top:8px;height:9px;border-radius:5px;background:var(--band);box-shadow:inset 0 1px 2px oklch(from var(--vpu-sh) l c h / 0.6)}
:where(.cf-vip-pass-upgrade) .vpu-vipcard{transform:perspective(1100px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .3s cubic-bezier(.2,.7,.2,1),box-shadow .16s ease;border-color:color-mix(in oklch,var(--vpu-fill) 55%,var(--card));box-shadow:var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / 0.22), 0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)))}
:where(.cf-vip-pass-upgrade) .vpu-vipcard:hover,:where(.cf-vip-pass-upgrade) .vpu-vipcard[data-force]{box-shadow:var(--card-shadow, 0 2px 4px oklch(from var(--vpu-sh) l c h / 0.28), 0 18px 32px -10px oklch(from var(--vpu-sh) l c h / 0.45))}
:where(.cf-vip-pass-upgrade) .vpu-viphead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:36px var(--vpu-pad) 16px;background:var(--vpu-fill);color:var(--vpu-fill-ink);box-shadow:inset 0 1px 0 oklch(from var(--vpu-fill) calc(l + 0.1) c h / 0.6),inset 0 -1px 0 oklch(from var(--vpu-fill) calc(l - 0.12) c h)}
:where(.cf-vip-pass-upgrade) .vpu-crown{display:inline-grid;flex:none;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--vpu-fill-ink);color:var(--vpu-fill)}
:where(.cf-vip-pass-upgrade) .vpu-crown svg{width:18px;height:18px}
:where(.cf-vip-pass-upgrade) .vpu-vipbody{padding:24px var(--vpu-pad) var(--vpu-pad);container-type:inline-size}
:where(.cf-vip-pass-upgrade) .vpu-plus{margin:8px 0 0;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.125rem,1.4vw,1.3125rem);font-weight:var(--display-weight, 800);line-height:1.2;letter-spacing:var(--display-tracking, -0.01em);text-transform:var(--display-case, none);color:var(--ink);text-wrap:balance}
:where(.cf-vip-pass-upgrade) .vpu-plus > span{color:var(--accent)}
:where(.cf-vip-pass-upgrade) .vpu-intro{margin:20px 0 0;font-size:1rem;font-weight:700;line-height:1.4;color:var(--ink)}
:where(.cf-vip-pass-upgrade) .vpu-items{display:grid;gap:8px;margin:12px 0 0;padding:0;list-style:none}
:where(.cf-vip-pass-upgrade) .vpu-items li{display:grid;grid-template-columns:3.5rem minmax(0,1fr) auto;align-items:start;gap:14px;padding:12px 14px 12px 12px;border-radius:10px;background:var(--vpu-well)}
:where(.cf-vip-pass-upgrade) .vpu-items li.vpu-noimg{grid-template-columns:auto minmax(0,1fr) auto}
:where(.cf-vip-pass-upgrade) .vpu-items img{display:block;width:3.5rem;height:3.5rem;object-fit:cover;border-radius:8px;filter:drop-shadow(0 2px 3px oklch(from var(--vpu-sh) l c h / 0.3))}
:where(.cf-vip-pass-upgrade) .vpu-tick{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--success);color:var(--vpu-tick-ink, #ffffff)}
:where(.cf-vip-pass-upgrade) .vpu-tick svg{width:16px;height:16px;stroke-width:3}
:where(.cf-vip-pass-upgrade) .vpu-itemtext strong{display:block;font-size:1.0625rem;font-weight:800;line-height:1.25;color:var(--ink)}
:where(.cf-vip-pass-upgrade) .vpu-itemtext span{display:block;margin-top:4px;font-size:.9375rem;line-height:1.45;color:var(--muted);text-wrap:pretty}
:where(.cf-vip-pass-upgrade) .vpu-value{align-self:start;padding:4px 12px;border-radius:999px;background:var(--card);color:var(--ink);box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / 0.14);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
:where(.cf-vip-pass-upgrade) .vpu-price{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px 24px;margin-top:16px;padding:20px 24px;border-radius:12px;background:color-mix(in oklch,var(--ink) 6%,var(--card))}
:where(.cf-vip-pass-upgrade) .vpu-price-copy{min-width:0}
:where(.cf-vip-pass-upgrade) .vpu-today{margin:0;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.3125rem,1.8vw,1.625rem);font-weight:var(--display-weight, 800);line-height:1.15;letter-spacing:var(--display-tracking, -0.01em);text-transform:var(--display-case, none);color:var(--ink);text-wrap:balance}
:where(.cf-vip-pass-upgrade) .vpu-pnote{margin:8px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
:where(.cf-vip-pass-upgrade) .vpu-tag{display:grid;grid-template-areas:"was" "amount" "save";justify-items:end;gap:6px;text-align:right}
:where(.cf-vip-pass-upgrade) .vpu-was{grid-area:was;display:flex;align-items:baseline;gap:8px;margin:0;font-size:.9375rem;font-weight:600;line-height:1.2;color:var(--muted);white-space:nowrap}
:where(.cf-vip-pass-upgrade) .vpu-was s{font-size:1.0625rem;font-weight:800;color:var(--danger);text-decoration-color:var(--danger);text-decoration-thickness:2px}
:where(.cf-vip-pass-upgrade) .vpu-amount{grid-area:amount;margin:0;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(2.5rem,4.2vw,3.75rem);font-weight:var(--display-weight, 800);line-height:1;letter-spacing:-.03em;text-transform:var(--display-case, none);color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
:where(.cf-vip-pass-upgrade) .vpu-save{grid-area:save;margin:0;font-size:.9375rem;font-weight:800;line-height:1.3;color:var(--success);white-space:nowrap}
:where(.cf-vip-pass-upgrade) .vpu-save svg{display:inline-block;width:16px;height:16px;vertical-align:-.18em;margin-inline-end:.35em}
:where(.cf-vip-pass-upgrade) .vpu-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:where(.cf-vip-pass-upgrade) .vpu-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:72px;padding:12px 28px;border:1px solid oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.04) c h);border-radius:var(--button-radius, var(--radius, 12px));background:linear-gradient(180deg,oklch(from var(--button-bg, var(--cta)) calc(l + 0.04) c h),oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.02) c h));color:var(--button-ink, var(--cta-ink));font-family:var(--button-font, var(--font-display,Arial,sans-serif));font-size:clamp(1.125rem,1.55vw,1.375rem);font-weight:var(--button-weight, 800);line-height:1.15;letter-spacing:-.005em;text-transform:var(--button-case, none);text-shadow:var(--button-text-shadow, none);cursor:pointer;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--vpu-sh) l c h / 0.35), 0 8px 16px -6px oklch(from var(--vpu-sh) l c h / 0.5));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
:where(.cf-vip-pass-upgrade) .vpu-btn > svg{flex:none;width:22px;height:22px}
:where(.cf-vip-pass-upgrade) .vpu-btn-label{text-wrap:balance}
:where(.cf-vip-pass-upgrade) .vpu-btn-pad{flex:none;width:22px;height:22px}
:where(.cf-vip-pass-upgrade) .vpu-btn:not(:disabled):not([aria-busy="true"]):hover,:where(.cf-vip-pass-upgrade) .vpu-btn[data-force="hover"]:not(:disabled){transform:translateY(-1px);background:linear-gradient(180deg,oklch(from var(--button-bg, var(--cta)) calc(l - 0.01) c h),oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.07) c h));box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.1) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h), 0 2px 3px oklch(from var(--vpu-sh) l c h / 0.4), 0 12px 20px -6px oklch(from var(--vpu-sh) l c h / 0.55))}
:where(.cf-vip-pass-upgrade) .vpu-btn:not(:disabled):not([aria-busy="true"]):active,:where(.cf-vip-pass-upgrade) .vpu-btn[data-force="active"]:not(:disabled){transform:translateY(1px);background:linear-gradient(180deg,oklch(from var(--button-bg, var(--cta)) calc(l - 0.04) c h),oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.08) c h));box-shadow:var(--button-shadow, inset 0 2px 3px oklch(from var(--button-bg, var(--cta)) calc(l - 0.22) c h / 0.45), inset 0 -2px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.18) c h), 0 1px 1px oklch(from var(--vpu-sh) l c h / 0.3))}
:where(.cf-vip-pass-upgrade) .vpu-btn:disabled{cursor:not-allowed;transform:none;border-color:var(--button-2-border, transparent);background:var(--button-2-bg, var(--secondary));color:var(--button-2-ink, var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow, var(--shadow-sm))}
:where(.cf-vip-pass-upgrade) .vpu-btn[aria-busy="true"]{cursor:progress}
:where(.cf-vip-pass-upgrade) .vpu-spin{animation:vpu-spin .8s linear infinite}
:where(.cf-vip-pass-upgrade) .vpu-alert{margin:16px 0 0;padding:12px 16px;border:1px solid var(--danger);border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:1rem;font-weight:700;line-height:1.4;text-align:left;text-wrap:pretty;animation:vpu-pop .3s ease both}
:where(.cf-vip-pass-upgrade) .vpu-alert svg{display:inline-block;width:18px;height:18px;vertical-align:-.22em;margin-inline-end:.45em}
:where(.cf-vip-pass-upgrade) .vpu-assure{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 20px;margin:16px 0 0;padding:0;list-style:none}
:where(.cf-vip-pass-upgrade) .vpu-assure li{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
:where(.cf-vip-pass-upgrade) .vpu-assure svg{display:inline-block;width:16px;height:16px;vertical-align:-.18em;margin-inline-end:.4em;color:var(--band-ink)}
:where(.cf-vip-pass-upgrade) .vpu-decline{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;padding:6px 8px;border:0;border-radius:var(--button-radius, var(--radius, 12px));background:transparent;color:var(--band-ink);font-family:var(--font-body,Arial,sans-serif);font-size:.9375rem;font-weight:600;line-height:1.3;text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / 0.5);text-decoration-thickness:1px;text-underline-offset:.22em;cursor:pointer;text-wrap:balance;transition:text-decoration-color .16s ease}
:where(.cf-vip-pass-upgrade) .vpu-decline:hover{text-decoration-color:currentColor}
:where(.cf-vip-pass-upgrade) .vpu-decline:disabled{cursor:not-allowed}
.cf-vip-pass-upgrade .vpu-btn:focus-visible,.cf-vip-pass-upgrade .vpu-decline:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
@keyframes vpu-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes vpu-swing{0%{transform:rotate(-2.4deg)}40%{transform:rotate(1.3deg)}70%{transform:rotate(-.5deg)}100%{transform:rotate(0)}}
@keyframes vpu-pop{from{opacity:.6;transform:scale(.97)}to{opacity:1;transform:none}}
@keyframes vpu-spin{to{transform:rotate(360deg)}}
@media (max-width:52rem){
:where(.cf-vip-pass-upgrade) .vpu-stage{grid-template-columns:minmax(0,1fr);row-gap:16px;max-width:34rem}
:where(.cf-vip-pass-upgrade) .vpu-free,:where(.cf-vip-pass-upgrade) .vpu-vip,:where(.cf-vip-pass-upgrade) .vpu-action{grid-column:1;grid-row:auto}
:where(.cf-vip-pass-upgrade) .vpu-free{padding-top:0}
:where(.cf-vip-pass-upgrade) .vpu-kit{display:none}
:where(.cf-vip-pass-upgrade) .vpu-action{margin-top:16px}
}
@media (max-width:30rem){
.cf-vip-pass-upgrade{--vpu-pad:20px}
:where(.cf-vip-pass-upgrade) .vpu-viphead .vpu-chip-vip{display:none}
:where(.cf-vip-pass-upgrade) .vpu-items li{grid-template-columns:3.25rem minmax(0,1fr);gap:8px 12px}
:where(.cf-vip-pass-upgrade) .vpu-items li.vpu-noimg{grid-template-columns:auto minmax(0,1fr)}
:where(.cf-vip-pass-upgrade) .vpu-items img,:where(.cf-vip-pass-upgrade) .vpu-items .vpu-tick{grid-row:1/span 2}
:where(.cf-vip-pass-upgrade) .vpu-items img{width:3.25rem;height:3.25rem}
:where(.cf-vip-pass-upgrade) .vpu-items .vpu-value{grid-column:2;justify-self:start}
:where(.cf-vip-pass-upgrade) .vpu-btn{min-height:64px;padding:12px 20px;font-size:1.125rem}
:where(.cf-vip-pass-upgrade) .vpu-btn .vpu-btn-ico,:where(.cf-vip-pass-upgrade) .vpu-btn .vpu-btn-pad{display:none}
}
@container (max-width:26rem){
:where(.cf-vip-pass-upgrade) .vpu-price{grid-template-columns:minmax(0,1fr);gap:14px;padding:18px}
:where(.cf-vip-pass-upgrade) .vpu-tag{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"was amount" "save amount";justify-items:start;align-items:center;column-gap:16px;row-gap:6px;text-align:left}
:where(.cf-vip-pass-upgrade) .vpu-amount{justify-self:end;font-size:2.75rem}
:where(.cf-vip-pass-upgrade) .vpu-save{white-space:normal;text-wrap:pretty}
}
@media (prefers-reduced-motion:reduce){
.cf-vip-pass-upgrade *,.cf-vip-pass-upgrade *::before,.cf-vip-pass-upgrade *::after{animation:none!important;transition:none!important}
:where(.cf-vip-pass-upgrade) .vpu-vipcard{transform:none!important}
:where(.cf-vip-pass-upgrade) .vpu-btn{transform:none!important}
}
@media (forced-colors:active){
:where(.cf-vip-pass-upgrade) .vpu-pass,:where(.cf-vip-pass-upgrade) .vpu-btn,:where(.cf-vip-pass-upgrade) .vpu-price,:where(.cf-vip-pass-upgrade) .vpu-alert{border:2px solid CanvasText}
:where(.cf-vip-pass-upgrade) .vpu-em{background:Mark;color:MarkText}
}
`
type VipPassUpgradeCopy = {
itemValue: string
/** Uses {label} and {event}. */
freeAria: string
upgraded: string
active: string
upgrade: string
plus: string
/** Uses {amount}. */
savings: string
/** Uses {percent}. */
savingsPercent: string
totalValue: string
today: string
/** Uses {title}. */
productAlt: string
/** Uses {label}, {event} and {title}. */
vipAria: string
/** Uses {event}. */
declined: string
}
const DEFAULT_COPY: VipPassUpgradeCopy = {
"itemValue": "value",
"freeAria": "{label}: {event}",
"upgraded": "Upgraded",
"active": "Active",
"upgrade": "Upgrade",
"plus": "+ ",
"savings": "You save {amount}",
"savingsPercent": " ({percent}%)",
"totalValue": "Total value",
"today": "Today: ",
"productAlt": "{title}: guide, workbook and checklist",
"vipAria": "{label}: {event} plus {title}",
"declined": "You’re all set for the {event}."
}
function copyText(template: string, values: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => Object.hasOwn(values, key) ? String(values[key]) : match)
}
pieces/offer/vip-pass-upgrade/specimen.tsx 33 lines
import __studioImage7933ff92 from "../assets/c292a501e3241844.webp";
import __studioImageffbd48f9 from "../assets/44c9598bcce71b1d.webp";
import * as React from "react"
import { slot } from "../../slots"
import defaults from "../../studio-defaults.json"
import { VipPassUpgrade, type VipPassState } from "../vip-pass-upgrade"
export const states = ["default", "hover", "active", "disabled", "error"]
const sample = defaults.sample
const workshop = sample.registration
export default function VipPassUpgradeSpecimen({ state = "default" }: { state?: VipPassState }) {
return (
<VipPassUpgrade
state={state}
eventName={workshop.name}
freeMeta={workshop.sublabel}
vipTitle={sample.name}
lead={`Go VIP and get ${sample.name} to work through while you watch: the planning guide, the copy workbook and the launch checklist.`}
items={sample.items.map((item, i) => ({ ...item, itemImage: slot(`item-${i + 1}`, item.image) }))}
totalValue={sample.regularPrice}
price={sample.price}
priceNote={sample.note}
reassurance={sample.reassurance}
productImage={slot("product", __studioImage7933ff92)}
kitImageAlt={`${sample.name}: the planning guide, copy workbook and launch checklist`}
kitCaption="Unlocks instantly with your VIP pass"
sceneImage={slot("scene", __studioImageffbd48f9)}
/>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalVipPassUpgrade |
Partial<VipPassUpgradeCopy> |
|
headline OptionalVipPassUpgrade |
string |
Default "Your free seat is saved. Now make it"
|
headlineEmphasis OptionalVipPassUpgrade |
string |
Default "all-access."
|
lead OptionalVipPassUpgrade |
string |
Default "Go VIP and get The Funnel Starter Kit to work through while you watch: the planning guide, the copy workbook and the launch checklist."
|
eventName OptionalVipPassUpgrade |
string |
Default "Funnel Starter Workshop"
|
freeLabel OptionalVipPassUpgrade |
string |
Default "Free ticket"
|
freeStatus OptionalVipPassUpgrade |
string |
Default "Seat saved"
|
freeMeta OptionalVipPassUpgrade |
string |
Default "Free workshop · Watch online"
|
freeIncludes OptionalVipPassUpgrade |
string[] |
Default ["Watch the full workshop online", "Walk through your offer, page copy, and next steps"]
|
freePriceLabel OptionalVipPassUpgrade |
string |
Default "Your price"
|
freePrice OptionalVipPassUpgrade |
string |
Default "Free"
|
vipLabel OptionalVipPassUpgrade |
string |
Default "VIP All-Access Pass"
|
vipTitle OptionalVipPassUpgrade |
string |
Default "The Funnel Starter Kit"
|
vipIntro OptionalVipPassUpgrade |
string |
Default "Everything in your free ticket, plus:"
|
items OptionalVipPassUpgrade |
VipPassItem[] |
Default DEFAULT_ITEMS
|
totalValue OptionalVipPassUpgrade |
string |
|
price OptionalVipPassUpgrade |
string |
Default "$47"
|
priceLabel OptionalVipPassUpgrade |
string |
Default "Your VIP upgrade today"
|
priceNote OptionalVipPassUpgrade |
string |
|
label OptionalVipPassUpgrade |
string |
Default "Yes! Upgrade Me To VIP"
|
loadingLabel OptionalVipPassUpgrade |
string |
Default "Upgrading your pass…"
|
reassurance OptionalVipPassUpgrade |
string[] |
Default []
|
declineLabel OptionalVipPassUpgrade |
string |
Default "No thanks, I’ll keep my free ticket"
|
successTitle OptionalVipPassUpgrade |
string |
|
successText OptionalVipPassUpgrade |
string |
|
errorText OptionalVipPassUpgrade |
string |
Default "We couldn’t upgrade your pass. Please try again."
|
declinedTitle OptionalVipPassUpgrade |
string |
|
declinedText OptionalVipPassUpgrade |
string |
|
reconsiderLabel OptionalVipPassUpgrade |
string |
|
productImage OptionalVipPassUpgrade |
string |
Default legacyKitImage
|
kitImage OptionalVipPassUpgrade |
string |
|
kitImageAlt OptionalVipPassUpgrade |
string |
|
kitCaption OptionalVipPassUpgrade |
string |
|
sceneImage OptionalVipPassUpgrade |
string |
Default legacyBackdropImage
|
backdropImage OptionalVipPassUpgrade |
string |
|
disabled OptionalVipPassUpgrade |
boolean |
Default false
|
state OptionalVipPassUpgrade |
VipPassState |
Default "default"
|
onAction OptionalVipPassUpgrade |
() => void | Promise<void> |
Default onUpgrade
|
onUpgrade OptionalVipPassUpgrade |
() => void | Promise<void> |
|
onDecline OptionalVipPassUpgrade |
() => void |
|
className OptionalVipPassUpgrade |
string |
|
id OptionalVipPassUpgrade |
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-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--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).
scene- A wide atmosphere photo behind or beside the copy.
-
44c9598bcce71b1d.webp
image/webp · 24 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
c292a501e3241844.webp
image/webp · 50 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB