Vip Pass Upgrade 7
Turns a saved free seat into a VIP upgrade: the free ticket on the dark half, the complete kit with its price and one clear action on the light half.
Use it in a prompt
Use offer/vip-pass-upgrade-7 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-7.tsx. - Import it and pass your copy and images (Props tab):
import { VipPassUpgrade7 } from "@/components/funneldna/offer/vip-pass-upgrade-7"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/vip-pass-upgrade-7/component.tsx 528 lines
// Turns a saved free seat into a VIP upgrade: the free ticket on the dark half, the complete kit with its price and one clear action on the light half.
'use client'
import * as React from 'react'
import { AlertCircle, Check, CheckCircle2, Crown, Loader2, MonitorPlay, ShieldCheck, Ticket, Zap } from 'lucide-react'
export type VipPassUpgrade7Props = {
/** Supporting labels and plain-text templates; named placeholders are documented below. */
copy?: Partial<VipPassUpgrade7Copy>
/** First headline sentence (what they already have). */
headline?: string
/** Words before the emphasised phrase in the second sentence. */
headlinePre?: string
/** Phrase set in italic on the dark half. */
headlineEmphasis?: string
/** Words after the emphasised phrase. Defaults to "for {price}." */
headlineTail?: string
lead?: React.ReactNode
/** Free ticket (the dark half). */
freeLabel?: string
eventName?: string
eventHeadline?: string
freeMeta?: string[]
/** Status text; also the alt text of the stamp image. */
freeStatus?: string
/** Optional texture slot image, shown at low opacity behind the dark half. */
textureImage?: string
/** stampImage is the canonical slot image; freeStampImage is retained for compatibility. */
stampImage?: string
freeStampImage?: string
keepNote?: string
/** VIP pass (the light half). */
vipLabel?: string
vipTitle?: string
vipIntro?: string
/** Generated gold foil seal on a transparent background. */
/** vipStampImage is the canonical slot image; vipSealImage is retained for compatibility. */
vipStampImage?: string
vipSealImage?: string
vipSealAlt?: string
items?: VipPassItem[]
totalValueLabel?: string
totalValue?: string
price?: string
priceLabel?: string
priceNote?: string
saveLabel?: 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
/** Deprecated: ignored. The builder wires what happens after the action. */
successNote?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
activeLabel?: 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
disabled?: boolean
/** Studio / preview state. */
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 VipPassUpgrade7({
headline = 'Your free seat is saved.',
headlinePre = 'Add the',
headlineEmphasis = 'complete kit',
headlineTail,
lead = 'You’re registered for the Funnel Starter Workshop. Go VIP and add the planning guide, copy workbook, and launch checklist to work from as you watch.',
freeLabel = 'Free ticket',
eventName = 'Funnel Starter Workshop',
eventHeadline = 'Map out your first funnel',
freeMeta = ['Free on-demand workshop', 'Watch online'],
freeStatus = 'Seat saved',
textureImage,
freeStampImage: legacyFreeStampImage,
stampImage: freeStampImage = legacyFreeStampImage,
keepNote = 'Your free seat stays saved either way.',
vipLabel = 'VIP · All-Access Pass',
vipTitle = 'Workshop + Starter Kit',
vipIntro = 'Everything on your free ticket, plus The Funnel Starter Kit:',
vipSealImage: legacyVipSealImage,
vipStampImage: vipSealImage = legacyVipSealImage,
vipSealAlt = '',
items: suppliedItems = DEFAULT_ITEMS,
totalValueLabel = 'Total value',
totalValue,
price = '$47',
priceLabel = 'Your VIP upgrade today',
priceNote,
saveLabel = 'You save',
label = 'Yes! Upgrade My Pass',
loadingLabel = 'Upgrading your pass…',
reassurance = [],
declineLabel = 'No thanks, keep my free ticket',
errorText = 'We couldn’t upgrade your pass. Please try again.',
disabled = false,
state = 'default',
onUpgrade,
onAction = onUpgrade,
onDecline,
className,
id,
copy,
}: VipPassUpgrade7Props) {
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 btnRef = React.useRef<HTMLButtonElement>(null)
const focusNext = React.useRef(false)
React.useEffect(() => {
if (!focusNext.current) return
focusNext.current = false
btnRef.current?.focus()
}, [phase])
const headingId = React.useId()
const passId = React.useId()
const errorId = React.useId()
const isDisabled = disabled || state === 'disabled'
const force = !isDisabled && (state === 'hover' || state === 'active') ? state : undefined
const loading = phase === 'loading'
const save = savingsOf(totalValue, price)
const tail = headlineTail ?? (price ? copyText(text.headlineTail, { price }) : '')
const handleUpgrade = async () => {
if (isDisabled || loading || !onAction) return
setPhase('loading')
try {
await onAction()
if (mounted.current) setPhase('idle')
} catch {
if (!mounted.current) return
focusNext.current = true
setPhase('error')
}
}
const handleDecline = () => {
if (loading) return
onDecline?.()
}
return (
<section
id={id}
className={['cf-vip-pass-upgrade-7', className].filter(Boolean).join(' ')}
style={textureImage ? ({ '--vp7-texture': `url(${JSON.stringify(textureImage)})` } as React.CSSProperties) : undefined}
aria-labelledby={headingId}
data-phase={phase}
>
<style>{CSS}</style>
<div className='vp7-split'>
<div className='vp7-dark'>
<div className='vp7-dark-in'>
<h2 id={headingId} className='vp7-h'>
<span className='vp7-h-a'>{headline}</span>{' '}
<span className='vp7-h-b'>
{headlinePre ? headlinePre + ' ' : null}
{headlineEmphasis ? <em className='vp7-em'>{headlineEmphasis}</em> : null}
{tail ? ' ' + tail : null}
</span>
</h2>
{lead ? <p className='vp7-lead'>{lead}</p> : null}
<article className='vp7-free' aria-label={copyText(text.freeAria, { label: freeLabel, event: eventName })}>
{freeLabel ? <p className='vp7-free-kicker'>{freeLabel}</p> : null}
<h3 className='vp7-free-title'>{eventName}</h3>
{eventHeadline ? <p className='vp7-free-sub'>{eventHeadline}</p> : null}
<div className='vp7-free-foot'>
{freeMeta.length ? (
<ul className='vp7-free-meta'>
{freeMeta.map((m) => {
const Icon = /watch|online|stream|replay/i.test(m) ? MonitorPlay : Ticket
return (
<li key={m}>
<Icon aria-hidden='true' />
<span>{m}</span>
</li>
)
})}
</ul>
) : (
<span />
)}
{freeStampImage ? (
<img className='vp7-stamp' src={freeStampImage} alt={freeStatus} width={176} height={176} loading='lazy' decoding='async' />
) : (
<span className='vp7-status'>
<CheckCircle2 aria-hidden='true' />
{freeStatus}
</span>
)}
</div>
</article>
{keepNote ? (
<p className='vp7-keep'>
<span className='vp7-badge' aria-hidden='true'>
<Check />
</span>
{keepNote}
</p>
) : null}
</div>
</div>
<div className='vp7-light'>
<article className='vp7-pass' aria-labelledby={passId}>
<div className='vp7-body'>
{vipLabel ? (
<p className='vp7-chip'>
<Crown aria-hidden='true' />
<span>{vipLabel}</span>
</p>
) : null}
<div className='vp7-head' data-seal={vipSealImage ? '' : undefined}>
{vipSealImage ? (
<img className='vp7-seal' src={vipSealImage} alt={vipSealAlt} width={176} height={176} loading='lazy' decoding='async' />
) : null}
<h3 id={passId} className='vp7-pass-title'>{vipTitle}</h3>
{vipIntro ? <p className='vp7-intro'>{vipIntro}</p> : null}
</div>
{items.length ? (
<ul className='vp7-items'>
{items.map((it) => (
<li className='vp7-item' key={it.name}>
{it.image ? (
<img className='vp7-thumb' src={it.image} alt={it.imageAlt ?? it.name} width={72} height={72} loading='lazy' decoding='async' />
) : (
<span className='vp7-tick' aria-hidden='true'>
<Check />
</span>
)}
<div>
<p className='vp7-item-name'>{it.name}</p>
{it.detail ? <p className='vp7-item-detail'>{it.detail}</p> : null}
</div>
{it.value ? (
<p className='vp7-item-val'>
<strong>{it.value}</strong>
<span>{text.itemValue}</span>
</p>
) : (
<span />
)}
</li>
))}
</ul>
) : null}
{price ? (
<div className='vp7-price'>
{priceLabel ? <p className='vp7-price-label'>{priceLabel}</p> : null}
<div className='vp7-price-row'>
<span className='vp7-now'>{price}</span>
{totalValue || save ? (
<span className='vp7-price-side'>
{totalValue ? (
<span className='vp7-was'>
{totalValueLabel} <s>{totalValue}</s>
</span>
) : null}
{save ? (
<span className='vp7-save'>
{saveLabel} {save}
</span>
) : null}
</span>
) : null}
</div>
{priceNote ? <p className='vp7-price-note'>{priceNote}</p> : null}
</div>
) : null}
<div className='vp7-action'>
{phase === 'error' ? (
<p id={errorId} className='vp7-error' role='alert'>
<AlertCircle aria-hidden='true' />
<span>{errorText}</span>
</p>
) : null}
<button
ref={btnRef}
type='button'
className='vp7-btn'
data-force={force}
onClick={handleUpgrade}
disabled={isDisabled || loading}
aria-busy={loading ? 'true' : undefined}
aria-describedby={phase === 'error' ? errorId : undefined}
>
{loading ? <Loader2 className='vp7-spin' aria-hidden='true' /> : null}
<span>{loading ? loadingLabel : label}</span>
</button>
{reassurance.length ? (
<ul className='vp7-assure'>
{reassurance.map((line) => {
const { Icon, tone } = assure(line)
return (
<li key={line}>
<Icon className={tone} aria-hidden='true' />
{line}
</li>
)
})}
</ul>
) : null}
{declineLabel ? (
<button type='button' className='vp7-decline' onClick={handleDecline} disabled={loading}>
{declineLabel}
</button>
) : null}
</div>
</div>
</article>
</div>
</div>
</section>
)
}
export default VipPassUpgrade7
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 amount(v?: string): number | null {
if (!v) return null
const n = Number(v.replace(/[^0-9.]/g, ''))
return Number.isFinite(n) && n > 0 ? n : null
}
function savingsOf(total?: string, price?: string): string | null {
const t = amount(total)
const p = amount(price)
if (t === null || p === null || t <= p || !price) return null
const symbol = price.trim().match(/^[^0-9]*/)?.[0] || '$'
const d = t - p
return symbol + (Number.isInteger(d) ? String(d) : d.toFixed(2))
}
function phaseFor(state?: VipPassState): Phase {
return state === 'error' ? 'error' : 'idle'
}
function assure(line: string) {
if (/guarantee|refund|money/i.test(line)) return { Icon: ShieldCheck, tone: 'vp7-ic-shield' }
if (/instant|access|download/i.test(line)) return { Icon: Zap, tone: 'vp7-ic-zap' }
return { Icon: Check, tone: 'vp7-ic-shield' }
}
const R = '.cf-vip-pass-upgrade-7'
// House recipes only: flat bands, one card, one featured card, grey well, Belcher button. The white glyph in solid status badges is the documented exception.
// The decline control stays a quiet underlined link (DR exception) but reads the secondary-button border role, so a theme that outlines secondary buttons can reach it.
const CSS = `
${R}{--vp-shadow:var(--shadow,oklch(0.22 0.03 260));--vp-hair:oklch(from var(--ink,#101828) l c h / 0.12);--vp-cta:var(--button-bg,var(--cta,#d92d20));--vp-cta-2:var(--button-bg-2,var(--cta-2,#b42318));position:relative;isolation:isolate;overflow:hidden;background:var(--surface,#ffffff);color:var(--ink,#101828);font-family:var(--font-body,system-ui,sans-serif);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;-webkit-font-smoothing:antialiased}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} :where(h2,h3,p,ul){margin:0}
${R} ul{padding:0;list-style:none}
${R} img{display:block;max-width:100%;height:auto}
${R} :where(p,li){text-wrap:pretty}
${R} svg{flex:none;stroke-width:2.5}
${R} .vp7-split{display:grid;grid-template-columns:minmax(0,1fr)}
${R} .vp7-dark,${R} .vp7-light{position:relative;isolation:isolate;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
${R} .vp7-dark{background:var(--band,#0f2747);color:var(--band-ink,#ffffff)}
${R} .vp7-dark::before{content:'';position:absolute;inset:0;z-index:-1;background-image:var(--vp7-texture,none);background-size:cover;background-position:center;opacity:.1;pointer-events:none}
${R} .vp7-light{background:color-mix(in oklch,var(--ink,#101828) 3%,var(--surface,#ffffff))}
${R} .vp7-dark-in{width:min(100%,34rem);margin-inline:auto}
${R} .vp7-h{color:var(--band-ink,#ffffff);font-family:var(--font-display,inherit);font-size:clamp(2.25rem,4vw,3.5rem);font-weight:var(--display-weight,800);line-height:1.04;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance}
${R} .vp7-em{font-style:italic;font-weight:inherit}
${R} .vp7-lead{max-width:34rem;margin-top:16px;color:var(--band-ink,#ffffff);font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4}
${R} .vp7-free{max-width:30rem;margin-top:clamp(32px,4vw,48px);padding:clamp(20px,3vw,28px);border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));background:var(--card,#ffffff);color:var(--ink,#101828);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)))}
${R} .vp7-free-kicker{margin-bottom:12px;color:var(--muted,#4a5565);font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase}
${R} .vp7-free-title{font-family:var(--font-display,inherit);font-size:clamp(1.3125rem,1.8vw,1.625rem);font-weight:var(--display-weight,800);line-height:1.15;letter-spacing:-0.01em;text-transform:var(--display-case,none);text-wrap:balance}
${R} .vp7-free-sub{margin-top:8px;color:var(--muted,#4a5565);font-size:1rem;font-weight:500;line-height:1.45}
${R} .vp7-free-foot{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 16px;margin-top:20px;padding-top:16px;border-top:1px solid var(--vp-hair)}
${R} .vp7-free-meta{display:grid;gap:8px}
${R} .vp7-free-meta li{display:flex;align-items:flex-start;gap:8px;font-size:.9375rem;font-weight:600;line-height:1.4}
${R} .vp7-free-meta svg{width:18px;height:18px;margin-top:1px;color:var(--accent,#0f5fc2)}
${R} .vp7-stamp{width:clamp(5.25rem,8vw,6.75rem);margin-block:-8px;transform:rotate(-6deg)}
${R} .vp7-status{display:inline-flex;align-items:center;gap:6px;justify-self:end;min-height:32px;padding:4px 12px;border-radius:999px;background:var(--success-soft);color:var(--success);font-size:.875rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
${R} .vp7-status svg{width:16px;height:16px}
${R} .vp7-keep{margin-top:24px;color:var(--band-ink,#ffffff);font-size:1rem;font-weight:600;line-height:1.4}
${R} .vp7-badge{display:inline-grid;place-items:center;width:22px;height:22px;margin-inline-end:10px;vertical-align:-5px;border-radius:50%;background:var(--success);color:var(--status-glyph,#ffffff)}
${R} .vp7-badge svg{width:14px;height:14px;stroke-width:3}
${R} .vp7-pass{position:relative;width:min(100%,36rem);margin-inline:auto;border:1px solid color-mix(in oklch,var(--accent-fill,var(--accent,#0f5fc2)) 30%,var(--card,#ffffff));border-radius:var(--card-radius,var(--radius,14px));background:var(--card,#ffffff);color:var(--ink,#101828);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)))}
${R} .vp7-body{padding:clamp(20px,3vw,32px)}
${R} .vp7-chip{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 12px;border-radius:999px;background:var(--accent-fill,var(--accent,#0f5fc2));color:var(--accent-fill-ink,var(--card,#ffffff));font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase}
${R} .vp7-chip svg{width:16px;height:16px}
${R} .vp7-chip + .vp7-head{margin-top:16px}
${R} .vp7-head{position:relative}
${R} .vp7-head[data-seal]{min-height:clamp(4.5rem,8vw,6rem);padding-right:clamp(5rem,9vw,6.75rem)}
${R} .vp7-seal{position:absolute;top:-8px;right:-4px;width:clamp(4.5rem,8vw,6rem);transform:rotate(9deg);filter:drop-shadow(0 2px 3px oklch(from var(--vp-shadow) l c h / 0.3)) drop-shadow(0 8px 10px oklch(from var(--vp-shadow) l c h / 0.18))}
${R} .vp7-pass-title{color:var(--ink,#101828);font-family:var(--font-display,inherit);font-size:clamp(1.75rem,2.6vw,2.25rem);font-weight:var(--display-weight,800);line-height:1.08;letter-spacing:var(--display-tracking,-0.02em);text-transform:var(--display-case,none);text-wrap:balance}
${R} .vp7-intro{margin-top:12px;color:var(--muted,#4a5565);font-size:1rem;font-weight:500;line-height:1.45}
${R} .vp7-items{margin-top:16px}
${R} .vp7-item{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:start;gap:16px;padding:16px 0}
${R} .vp7-item + .vp7-item{border-top:1px solid var(--vp-hair)}
${R} .vp7-thumb{width:64px;height:64px;object-fit:cover;border-radius:8px;filter:drop-shadow(0 1px 2px oklch(from var(--vp-shadow) l c h / 0.25)) drop-shadow(0 4px 6px oklch(from var(--vp-shadow) l c h / 0.14))}
${R} .vp7-tick{display:grid;place-items:center;width:32px;height:32px;margin:4px auto 0;border-radius:50%;background:var(--success);color:var(--status-glyph,#ffffff)}
${R} .vp7-tick svg{width:18px;height:18px;stroke-width:3}
${R} .vp7-item-name{color:var(--ink,#101828);font-family:var(--font-display,inherit);font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:var(--display-weight,800);line-height:1.25;text-transform:var(--display-case,none)}
${R} .vp7-item-detail{margin-top:4px;color:var(--muted,#4a5565);font-size:.9375rem;line-height:1.45}
${R} .vp7-item-val{display:grid;justify-items:end;gap:4px;line-height:1.1;text-align:right}
${R} .vp7-item-val strong{color:var(--ink,#101828);font-family:var(--font-display,inherit);font-size:1.125rem;font-weight:800;font-variant-numeric:tabular-nums}
${R} .vp7-item-val span{color:var(--muted,#4a5565);font-size:.875rem;font-weight:600}
${R} .vp7-price{margin-top:16px;padding:clamp(20px,3vw,24px);border-radius:10px;background:color-mix(in oklch,var(--ink,#101828) 4%,var(--card,#ffffff))}
${R} .vp7-price-label{margin-bottom:12px;color:var(--muted,#4a5565);font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase}
${R} .vp7-price-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px}
${R} .vp7-now{color:var(--ink,#101828);font-family:var(--font-display,inherit);font-size:clamp(2.5rem,4.2vw,3.75rem);font-weight:var(--display-weight,800);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;text-transform:var(--display-case,none)}
${R} .vp7-price-side{display:grid;gap:4px}
${R} .vp7-was{color:var(--muted,#4a5565);font-size:.9375rem;font-weight:600;line-height:1.3}
${R} .vp7-was s{color:var(--ink,#101828);text-decoration-color:var(--danger);text-decoration-thickness:2px}
${R} .vp7-save{color:var(--success);font-size:.9375rem;font-weight:800;line-height:1.3}
${R} .vp7-price-note{margin-top:12px;color:var(--ink,#101828);font-size:.9375rem;font-weight:600;line-height:1.4}
${R} .vp7-action{display:grid;justify-items:center;gap:12px;margin-top:24px}
${R} .vp7-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;padding:12px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l + 0.04) c h),var(--button-bg-2,var(--cta-2,#b42318)));color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display,inherit));font-size:clamp(1.125rem,1.55vw,1.375rem);font-weight:var(--button-weight,800);line-height:1.15;letter-spacing:-0.005em;text-align:center;text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);text-wrap:balance;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--vp-cta) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--vp-cta) calc(l - 0.16) c h),0 1px 2px oklch(from var(--vp-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--vp-shadow) l c h / 0.45));cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
${R} .vp7-btn:hover:not(:disabled),${R} .vp7-btn[data-force='hover']{background:linear-gradient(oklch(from var(--vp-cta) calc(l - 0.01) c h),oklch(from var(--vp-cta-2) calc(l - 0.05) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--vp-cta) calc(l + 0.1) c h / 0.7),inset 0 -3px 0 oklch(from var(--vp-cta) calc(l - 0.2) c h),0 1px 2px oklch(from var(--vp-shadow) l c h / 0.34),0 12px 20px -6px oklch(from var(--vp-shadow) l c h / 0.52))}
${R} .vp7-btn:active:not(:disabled),${R} .vp7-btn[data-force='active']{background:linear-gradient(oklch(from var(--vp-cta) calc(l - 0.06) c h),oklch(from var(--vp-cta-2) calc(l - 0.08) c h));transform:translateY(1px);box-shadow:var(--button-shadow,inset 0 2px 4px oklch(from var(--vp-cta) calc(l - 0.22) c h / 0.5),inset 0 -2px 0 oklch(from var(--vp-cta) calc(l - 0.2) c h),0 1px 1px oklch(from var(--vp-shadow) l c h / 0.3))}
${R} .vp7-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent,#0f5fc2));outline-offset:3px}
${R} .vp7-btn[aria-busy='true']{cursor:progress}
${R} .vp7-btn:disabled:not([aria-busy='true']){background:var(--button-2-bg,var(--secondary,#e8ebf1));color:var(--button-2-ink,var(--secondary-ink,#101828));text-shadow:none;box-shadow:var(--button-2-shadow, var(--shadow-sm));cursor:not-allowed;transform:none}
${R} .vp7-btn svg{width:20px;height:20px}
${R} .vp7-assure{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 20px;text-align:center}
${R} .vp7-assure li{color:var(--ink,#101828);font-size:.9375rem;font-weight:500;line-height:1.4}
${R} .vp7-assure svg{display:inline-block;width:16px;height:16px;margin-inline-end:.4em;vertical-align:-0.15em}
${R} .vp7-ic-shield{color:var(--success)}
${R} .vp7-ic-zap{color:var(--accent,#0f5fc2)}
${R} .vp7-decline{min-height:44px;padding:8px 12px;border:0 solid var(--button-2-border,transparent);border-radius:8px;background:none;color:var(--muted,#4a5565);font-family:var(--font-body,inherit);font-size:.9375rem;font-weight:600;line-height:1.3;text-decoration:underline;text-decoration-color:oklch(from var(--muted,#4a5565) l c h / 0.5);text-decoration-thickness:1px;text-underline-offset:.2em;text-wrap:balance;cursor:pointer;transition:color .16s ease,text-decoration-color .16s ease}
${R} .vp7-decline:hover:not(:disabled){color:var(--ink,#101828);text-decoration-color:currentColor}
${R} .vp7-decline:focus-visible{outline:3px solid var(--field-focus,var(--accent,#0f5fc2));outline-offset:2px}
${R} .vp7-decline:disabled{opacity:.6;cursor:not-allowed}
${R} .vp7-error{display:flex;align-items:flex-start;gap:10px;width:100%;padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:600;line-height:1.4}
${R} .vp7-error svg{width:18px;height:18px;margin-top:1px}
@media (min-width:64rem){
${R} .vp7-split{grid-template-columns:minmax(0,5fr) minmax(0,6fr)}
${R} .vp7-dark-in{margin-inline:auto 0}
${R} .vp7-pass{margin-inline:0 auto}
}
@media (max-width:30rem){
${R} .vp7-item{grid-template-columns:52px minmax(0,1fr) auto;gap:12px}
${R} .vp7-thumb{width:52px;height:52px}
${R} .vp7-btn{padding-inline:20px}
${R} .vp7-price-row{column-gap:16px}
}
@media (prefers-reduced-motion:no-preference){
${R} .vp7-free{animation:vp7-rise .45s cubic-bezier(.2,.7,.2,1) both}
${R} .vp7-pass{animation:vp7-rise .45s .07s cubic-bezier(.2,.7,.2,1) both}
${R} .vp7-error{animation:vp7-rise .45s cubic-bezier(.2,.7,.2,1) both}
${R} .vp7-spin{animation:vp7-spin .8s linear infinite}
}
@keyframes vp7-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes vp7-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
${R} *,${R} *::before,${R} *::after{animation:none!important;transition-duration:.01ms!important}
${R} .vp7-btn:hover:not(:disabled),${R} .vp7-btn[data-force='hover'],${R} .vp7-btn:active:not(:disabled),${R} .vp7-btn[data-force='active']{transform:none}
}
@media (forced-colors:active){
${R} .vp7-btn,${R} .vp7-pass,${R} .vp7-free,${R} .vp7-price,${R} .vp7-chip{border:2px solid ButtonText}
}
`
type VipPassUpgrade7Copy = {
itemValue: string
/** Uses {label} and {event}. */
freeAria: string
/** Uses {price}; headlineTail still takes precedence. */
headlineTail: string
}
const DEFAULT_COPY: VipPassUpgrade7Copy = {
itemValue: 'value',
freeAria: '{label}: {event}',
headlineTail: 'for {price}.',
}
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-7/specimen.tsx 55 lines
import __studioImagef5ea1ea3 from '../assets/214fea3408a69c46.webp'
import __studioImage940460a5 from '../assets/8752a565f72d8126.webp'
import * as React from 'react'
import { slot } from '../../slots'
import defaults from '../../studio-defaults.json'
import { VipPassUpgrade7, type VipPassState } from '../vip-pass-upgrade-7'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
const sample = defaults.sample
const reg = sample.registration
export default function VipPassUpgrade7Specimen({ state = 'default' }: { state?: string }) {
const s = (states.includes(state) ? state : 'default') as VipPassState
const watch = reg.sublabel.split('·').pop()?.trim() || 'Watch online'
return (
<div>
<VipPassUpgrade7
textureImage={slot('texture', '')}
state={s}
disabled={s === 'disabled'}
headline='Your free seat is saved.'
headlinePre='Add the'
headlineEmphasis='complete kit'
price={sample.price}
lead={`You’re registered for the ${reg.name}. Go VIP and add ${sample.name}: the guide, workbook, and checklist to work from as you watch.`}
freeLabel='Free ticket'
eventName={reg.name}
eventHeadline={reg.headline}
freeMeta={[reg.eyebrow, watch]}
freeStatus='Seat saved'
stampImage={slot('stamp', __studioImagef5ea1ea3)}
vipLabel='VIP · All-Access Pass'
vipTitle='Workshop + Starter Kit'
vipIntro={`Everything on your free ticket, plus ${sample.name}:`}
vipStampImage={slot('stamp', __studioImage940460a5)}
items={sample.items.map((item, i) => ({
name: item.name,
detail: item.detail,
value: item.value,
itemImage: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
totalValue={sample.regularPrice}
priceLabel='Your VIP upgrade today'
priceNote={sample.note}
label='Yes! Upgrade My Pass'
reassurance={sample.reassurance}
declineLabel='No thanks, keep my free ticket'
/>
</div>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalVipPassUpgrade7 |
Partial<VipPassUpgrade7Copy> |
|
headline OptionalVipPassUpgrade7 |
string |
Default 'Your free seat is saved.'
|
headlinePre OptionalVipPassUpgrade7 |
string |
Default 'Add the'
|
headlineEmphasis OptionalVipPassUpgrade7 |
string |
Default 'complete kit'
|
headlineTail OptionalVipPassUpgrade7 |
string |
|
lead OptionalVipPassUpgrade7 |
React.ReactNode |
Default 'You’re registered for the Funnel Starter Workshop. Go VIP and add the planning guide, copy workbook, and launch checklist to work from as you watch.'
|
freeLabel OptionalVipPassUpgrade7 |
string |
Default 'Free ticket'
|
eventName OptionalVipPassUpgrade7 |
string |
Default 'Funnel Starter Workshop'
|
eventHeadline OptionalVipPassUpgrade7 |
string |
Default 'Map out your first funnel'
|
freeMeta OptionalVipPassUpgrade7 |
string[] |
Default ['Free on-demand workshop', 'Watch online']
|
freeStatus OptionalVipPassUpgrade7 |
string |
Default 'Seat saved'
|
textureImage OptionalVipPassUpgrade7 |
string |
|
stampImage OptionalVipPassUpgrade7 |
string |
Default legacyFreeStampImage
|
freeStampImage OptionalVipPassUpgrade7 |
string |
|
keepNote OptionalVipPassUpgrade7 |
string |
Default 'Your free seat stays saved either way.'
|
vipLabel OptionalVipPassUpgrade7 |
string |
Default 'VIP · All-Access Pass'
|
vipTitle OptionalVipPassUpgrade7 |
string |
Default 'Workshop + Starter Kit'
|
vipIntro OptionalVipPassUpgrade7 |
string |
Default 'Everything on your free ticket, plus The Funnel Starter Kit:'
|
vipStampImage OptionalVipPassUpgrade7 |
string |
Default legacyVipSealImage
|
vipSealImage OptionalVipPassUpgrade7 |
string |
|
vipSealAlt OptionalVipPassUpgrade7 |
string |
Default ''
|
items OptionalVipPassUpgrade7 |
VipPassItem[] |
Default DEFAULT_ITEMS
|
totalValueLabel OptionalVipPassUpgrade7 |
string |
Default 'Total value'
|
totalValue OptionalVipPassUpgrade7 |
string |
|
price OptionalVipPassUpgrade7 |
string |
Default '$47'
|
priceLabel OptionalVipPassUpgrade7 |
string |
Default 'Your VIP upgrade today'
|
priceNote OptionalVipPassUpgrade7 |
string |
|
saveLabel OptionalVipPassUpgrade7 |
string |
Default 'You save'
|
label OptionalVipPassUpgrade7 |
string |
Default 'Yes! Upgrade My Pass'
|
loadingLabel OptionalVipPassUpgrade7 |
string |
Default 'Upgrading your pass…'
|
reassurance OptionalVipPassUpgrade7 |
string[] |
Default []
|
declineLabel OptionalVipPassUpgrade7 |
string |
Default 'No thanks, keep my free ticket'
|
successTitle OptionalVipPassUpgrade7 |
string |
|
successText OptionalVipPassUpgrade7 |
string |
|
successNote OptionalVipPassUpgrade7 |
string |
|
activeLabel OptionalVipPassUpgrade7 |
string |
|
errorText OptionalVipPassUpgrade7 |
string |
Default 'We couldn’t upgrade your pass. Please try again.'
|
declinedTitle OptionalVipPassUpgrade7 |
string |
|
declinedText OptionalVipPassUpgrade7 |
string |
|
reconsiderLabel OptionalVipPassUpgrade7 |
string |
|
disabled OptionalVipPassUpgrade7 |
boolean |
Default false
|
state OptionalVipPassUpgrade7 |
VipPassState |
Default 'default'
|
onAction OptionalVipPassUpgrade7 |
() => void | Promise<void> |
Default onUpgrade
|
onUpgrade OptionalVipPassUpgrade7 |
() => void | Promise<void> |
|
onDecline OptionalVipPassUpgrade7 |
() => void |
|
className OptionalVipPassUpgrade7 |
string |
|
id OptionalVipPassUpgrade7 |
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.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
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.
stamp- A stamp or badge graphic, on a transparent background.
texture- A subtle background texture.
-
214fea3408a69c46.webp
image/webp · 138 KB
-
8752a565f72d8126.webp
image/webp · 302 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB