New Opportunity 8
Replaces a tangle of questions with a guided path to the complete offer.
Use it in a prompt
Use content/new-opportunity-8 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/content/new-opportunity-8.tsx. - Import it and pass your copy and images (Props tab):
import { NewOpportunity8 } from "@/components/funneldna/content/new-opportunity-8"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/new-opportunity-8/component.tsx 468 lines
// Replaces a tangle of questions with a guided path to the complete offer.
'use client'
import * as React from 'react'
import { AlertCircle, Check, ListChecks, Loader2, Map as MapIcon, PenLine, ShieldCheck, Zap } from 'lucide-react'
export type NewOpportunity8Props = {
headline?: string
/** Phrase inside the headline that gets one marker-highlighter stroke. */
emphasis?: string
lead?: string
/** Accessible label for the tangle; no visible comparison heading. */
oldTitle?: string
/** Accessible tangle template: {title}, {questions}. */
tangleLabel?: string
regularPriceLabel?: string
/** Retained for compatibility; no longer displayed. */
oldText?: string
questions?: (string | { text: string })[]
/** Accessible label for the steps; no visible comparison heading. */
newTitle?: string
/** Retained for compatibility; no longer displayed. */
newText?: string
turnText?: string
steps?: NewOpportunity8Step[]
valueSuffix?: string
vehicleLabel?: string
productName?: string
offerText?: string
todayLabel?: string
price?: string
/** Struck total value; with it a savings line renders. Nothing renders when omitted. */
regularPrice?: string
regularLabel?: string
saveLabel?: string
note?: string
ctaLabel?: string
/** Legacy alias for href. */
ctaHref?: string
/** Navigation destination; the button renders as a link when set. */
href?: string
loadingLabel?: string
/** @deprecated No longer rendered: the builder wires what happens after the click. */
successLabel?: string
reassurance?: (string | { text: string })[]
/** @deprecated No longer rendered: the builder wires what happens after the click. */
successMessage?: string
errorMessage?: string
/** Called on click. A returned promise shows the loading label; a rejection shows errorMessage. */
onAction?: () => void | Promise<void>
/** "success" is accepted for older callers and renders as default. */
state?: NewOpportunity8State
id?: string
className?: string
}
export function NewOpportunity8({
headline = 'Build your first funnel with a clear plan',
emphasis = 'a clear plan',
lead = 'A new way to plan your funnel, write your page copy, and check every step before you launch.',
oldTitle = 'The old way',
tangleLabel = '{title}: a tangle of questions. {questions}',
regularPriceLabel = 'Regular price ',
questions: suppliedQuestions = DEFAULT_QUESTIONS,
newTitle = 'The new way',
turnText = 'Start with a clear plan',
steps = DEFAULT_STEPS,
valueSuffix = 'value',
vehicleLabel = 'Your new vehicle:',
productName = 'The Funnel Starter Kit',
offerText = 'Guide, workbook and checklist in one download.',
todayLabel = 'Get the complete kit for',
price = '$47',
regularPrice,
regularLabel = 'total value',
saveLabel = 'You save',
note,
ctaLabel = 'Yes! Give Me Access',
ctaHref,
href = ctaHref,
loadingLabel = 'Opening your kit…',
reassurance: suppliedReassurance = [],
errorMessage = 'We couldn’t open your checkout. Please try again.',
onAction,
state = 'default',
id,
className,
}: NewOpportunity8Props) {
const reassurance = suppliedReassurance.map((entry) => typeof entry === 'string' ? entry : entry.text)
const questions = suppliedQuestions.map((entry) => typeof entry === 'string' ? entry : entry.text)
const uid = React.useId()
const headId = `${uid}-head`
const stageRef = React.useRef<HTMLDivElement>(null)
const animate = state === 'default'
const [motion, setMotion] = React.useState(false)
const [run, setRun] = React.useState(false)
useIso(() => {
if (!animate) return
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return
if (!('IntersectionObserver' in window)) return
setMotion(true)
}, [animate])
React.useEffect(() => {
if (!motion || run) return
const el = stageRef.current
if (!el) return
let raf = 0
const io = new IntersectionObserver((entries) => {
if (!entries.some((e) => e.isIntersecting)) return
io.disconnect()
raf = requestAnimationFrame(() => {
raf = requestAnimationFrame(() => setRun(true))
})
}, { threshold: 0.2 })
io.observe(el)
return () => {
io.disconnect()
cancelAnimationFrame(raf)
}
}, [motion, run])
const forced: Status | null = state === 'error' ? 'error' : null
const [status, setStatus] = React.useState<Status>(forced ?? 'idle')
const alive = React.useRef(true)
React.useEffect(() => {
setStatus(forced ?? 'idle')
}, [forced])
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
const disabled = state === 'disabled'
const busy = status === 'loading'
const handle = async (e: React.MouseEvent<HTMLElement>) => {
if (disabled || busy) {
e.preventDefault()
return
}
if (!onAction) return
try {
const result = onAction()
if (!result) return
setStatus('loading')
await result
if (alive.current) setStatus('idle')
} catch {
if (alive.current) setStatus('error')
}
}
const qs = questions.slice(0, 3)
const shots = steps.map((s) => s.item).filter((item) => Boolean((item.itemImage === undefined ? item.image : item.itemImage))).slice(0, 3)
const save = savings(price, regularPrice)
const btnClass = ['no8-btn', state === 'hover' ? 'is-hover' : '', state === 'active' ? 'is-active' : ''].filter(Boolean).join(' ')
const btnInner = (
<span className='no8-btn-in'>
{busy ? <Loader2 className='no8-spin' aria-hidden='true' /> : null}
<span>{busy ? loadingLabel : ctaLabel}</span>
</span>
)
const asLink = Boolean(href) && !disabled
return (
<section id={id} className={['cf-new-opportunity-8 no8', className].filter(Boolean).join(' ')} aria-labelledby={headId} data-motion={motion && animate ? 'on' : undefined} data-run={run && animate ? '' : undefined}>
<style>{CSS}</style>
<div className='no8-in'>
<header className='no8-head'>
<h2 id={headId} className='no8-h'><Headline text={headline} emphasis={emphasis} /></h2>
{lead ? <p className='no8-lead'>{lead}</p> : null}
</header>
<div className='no8-panel' ref={stageRef}>
<div className='no8-stage'>
<figure className='no8-tangle' role='img' aria-label={tangleLabel.split('{title}').join(oldTitle).split('{questions}').join(qs.join(' '))}>
<svg viewBox='0 0 220 220' aria-hidden='true' focusable='false'>
<path className='no8-rope' d={ROPE} pathLength={1} />
<path className='no8-rope-hi' d={ROPE} pathLength={1} />
<circle className='no8-rope-dot' cx='30' cy='176' r='9' />
</svg>
{qs.map((q, i) => <span key={`${q}-${i}`} className={`no8-q no8-q--${i + 1}`} aria-hidden='true'>{q}</span>)}
</figure>
<div className='no8-link' aria-hidden='true'>
<span className='no8-link-line' />
<span className='no8-link-head' />
</div>
<div className='no8-turn'><p className='no8-turn-b'>{turnText}</p></div>
<span className='no8-linkb' aria-hidden='true' />
<div className='no8-railwrap' style={{ '--n': Math.max(1, steps.length) } as React.CSSProperties}>
<span className='no8-rail-line' aria-hidden='true' />
<span className='no8-rail-fill' aria-hidden='true' />
<ol className='no8-rail' aria-label={newTitle}>
{steps.map((step, i) => {
const Icon = STEP_ICONS[i % STEP_ICONS.length]
return (
<li key={`${step.title}-${i}`} className='no8-stop' style={{ '--i': i } as React.CSSProperties}>
<div className='no8-badge'>
{(step.item.itemImage === undefined ? step.item.image : step.item.itemImage) ? (
<img src={(step.item.itemImage === undefined ? step.item.image : step.item.itemImage)} alt={step.item.imageAlt ?? step.item.name} width={176} height={176} loading='lazy' decoding='async' />
) : (
<span className='no8-badge-ico' aria-hidden='true'><Icon /></span>
)}
<span className='no8-num' aria-hidden='true'>{i + 1}</span>
</div>
<div className='no8-stop-txt'>
<h4 className='no8-stop-h'>{step.title}</h4>
<p className='no8-stop-item'>
{step.item.name}
{step.item.value ? <span className='no8-stop-val'>{`${step.item.value} ${valueSuffix}`}</span> : null}
</p>
</div>
</li>
)
})}
</ol>
</div>
</div>
</div>
<div className='no8-drop' aria-hidden='true'><span className='no8-drop-fill' /><span className='no8-drop-head' /></div>
<h3 className='no8-vehicle'>{vehicleLabel} <strong>{productName}</strong></h3>
<div className={`no8-offer${shots.length ? '' : ' no8-offer--plain'}`}>
{shots.length ? (
<div className='no8-fan' aria-hidden='true'>
{shots.map((item, i) => <img key={`${item.name}-${i}`} src={(item.itemImage === undefined ? item.image : item.itemImage)} alt='' width={168} height={168} loading='lazy' decoding='async' />)}
</div>
) : null}
<div className='no8-info'>
{offerText ? <p className='no8-otext'>{offerText}</p> : null}
<div className='no8-price'>
{todayLabel ? <p className='no8-plabel'>{todayLabel}</p> : null}
<div className='no8-prow'>
<span className='no8-pnow'>{price}</span>
{regularPrice ? <span className='no8-pwas'><span className='no8-sr'>{regularPriceLabel}</span><s>{regularPrice}</s> {regularLabel}</span> : null}
{save ? <span className='no8-psave'>{`${saveLabel} ${save}`}</span> : null}
</div>
{note ? <p className='no8-note'>{note}</p> : null}
</div>
</div>
<div className='no8-act'>
{asLink ? (
<a href={href} className={btnClass} aria-busy={busy || undefined} onClick={handle}>{btnInner}</a>
) : (
<button type='button' className={btnClass} disabled={disabled} aria-busy={busy || undefined} onClick={handle}>{btnInner}</button>
)}
<div aria-live='polite'>
{status === 'error' ? (
<p className='no8-msg no8-msg--err' role='alert'><AlertCircle aria-hidden='true' /><span>{errorMessage}</span></p>
) : reassurance.length ? (
<ul className='no8-assure'>
{reassurance.map((r) => {
const Icon = assureIcon(r)
return <li key={r}><Icon aria-hidden='true' />{r}</li>
})}
</ul>
) : null}
</div>
</div>
</div>
</div>
</section>
)
}
export default NewOpportunity8
export type NewOpportunity8Item = { name: string; detail?: string; value?: string; itemImage?: string; image?: string; imageAlt?: string }
export type NewOpportunity8Step = { title: string; item: NewOpportunity8Item }
/** "success" is accepted for older callers and renders as default. */
export type NewOpportunity8State = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
const DEFAULT_STEPS: NewOpportunity8Step[] = [
{ title: 'Plan your funnel', item: { name: 'Funnel Planning Guide' } },
{ title: 'Write your copy', item: { name: 'Page Copy Workbook' } },
{ title: 'Check every step', item: { name: 'Launch Checklist' } },
]
const DEFAULT_QUESTIONS = ['Offer?', 'Pages?', 'Copy?']
const STEP_ICONS = [MapIcon, PenLine, ListChecks]
const ROPE = 'M30 176C6 150 14 96 52 86C96 74 112 132 82 150C50 170 26 118 48 70C70 22 140 18 160 58C178 96 150 140 118 132C86 124 100 70 134 80C170 90 182 168 146 182C112 196 120 124 160 112C176 107 196 110 220 110'
const useIso = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect
function amount(v?: string) {
if (!v) return NaN
return parseFloat(v.replace(/[^0-9.]/g, ''))
}
function savings(price?: string, regular?: string) {
const p = amount(price)
const r = amount(regular)
if (!price || !isFinite(p) || !isFinite(r) || r <= p) return null
const symbol = (price.match(/^[^0-9]*/)?.[0] ?? '').trim()
const d = r - p
return symbol + (Number.isInteger(d) ? String(d) : d.toFixed(2))
}
function assureIcon(text: string) {
if (/guarantee|refund|money/i.test(text)) return ShieldCheck
if (/instant|access|download/i.test(text)) return Zap
return Check
}
function Headline({ text, emphasis }: { text: string; emphasis?: string }) {
if (!emphasis || !text.includes(emphasis)) return <>{text}</>
const i = text.indexOf(emphasis)
return <>{text.slice(0, i)}<span className='no8-em'>{emphasis}</span>{text.slice(i + emphasis.length)}</>
}
const CSS = `
.cf-new-opportunity-8{--no8-ink:var(--ink,#101828);--no8-muted:var(--muted,#4a5565);--no8-surface:var(--surface,#ffffff);--no8-card:var(--card,#ffffff);--no8-accent:var(--accent,#0f5fc2);--no8-fill:var(--accent-fill,var(--no8-accent));--no8-on-accent:var(--band-ink,#ffffff);--no8-line:oklch(from var(--no8-ink) l c h / 0.14);--no8-rope:color-mix(in oklch,var(--no8-muted) 34%,var(--no8-surface));--no8-marker:var(--marker,#fae37c);--no8-ok:var(--success);--no8-r:var(--radius,18px);--no8-tangle:12rem;--no8-badge:4.5rem;--no8-shrink:scaleY(0);position:relative;isolation:isolate;overflow:hidden;background:var(--no8-surface);color:var(--no8-ink);font-family:var(--font-body,Arial,sans-serif);padding:clamp(3.5rem,7vw,6.5rem) clamp(1.1rem,4vw,3rem);-webkit-font-smoothing:antialiased}
.cf-new-opportunity-8 *,.cf-new-opportunity-8 *::before,.cf-new-opportunity-8 *::after{box-sizing:border-box}
.cf-new-opportunity-8 :where(h2,h3,h4,p,ul,ol,li,figure){margin:0;padding:0}
.cf-new-opportunity-8 :where(ul,ol){list-style:none}
.cf-new-opportunity-8 img{display:block;max-width:100%}
:where(.cf-new-opportunity-8) .no8-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
:where(.cf-new-opportunity-8) .no8-in{position:relative;max-width:76rem;margin:0 auto}
:where(.cf-new-opportunity-8) .no8-head{text-align:center}
:where(.cf-new-opportunity-8) .no8-h{margin:0 auto;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(2.5rem,6.2vw,5rem);line-height:1.01;letter-spacing:var(--display-tracking,-.035em);color:var(--no8-ink);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-em{padding:0 .08em;margin:0 -.02em;background:linear-gradient(oklch(from var(--no8-marker) l c h / 0.88),oklch(from var(--no8-marker) l c h / 0.88)) 0 90%/100% .52em no-repeat;border-radius:.18em .5em .28em .6em/.45em .3em .55em .35em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
:where(.cf-new-opportunity-8) .no8-lead{max-width:50ch;margin:clamp(1rem,1.5vw,1.4rem) auto 0;font-size:clamp(1.125rem,1.55vw,1.375rem);font-weight:500;line-height:1.5;color:color-mix(in oklch,var(--no8-ink) 82%,var(--no8-surface));text-wrap:pretty}
:where(.cf-new-opportunity-8) .no8-panel{position:relative;margin-top:clamp(2.5rem,5vw,4rem);padding:0 clamp(1.5rem,3.5vw,3rem)}
:where(.cf-new-opportunity-8) .no8-stage{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'tangle' 'link' 'turn' 'linkb' 'rail'}
:where(.cf-new-opportunity-8) .no8-tangle{grid-area:tangle;position:relative;justify-self:center;width:var(--no8-tangle);height:var(--no8-tangle);margin-top:1rem}
:where(.cf-new-opportunity-8) .no8-tangle svg{display:block;width:100%;height:100%;overflow:visible;transform:rotate(90deg)}
:where(.cf-new-opportunity-8) .no8-rope,:where(.cf-new-opportunity-8) .no8-rope-hi{fill:none;stroke-linecap:round;stroke-linejoin:round}
:where(.cf-new-opportunity-8) .no8-rope{stroke:var(--no8-rope);stroke-width:12}
:where(.cf-new-opportunity-8) .no8-rope-hi{stroke:var(--no8-surface);stroke-opacity:.6;stroke-width:3}
:where(.cf-new-opportunity-8) .no8-rope-dot{fill:var(--no8-rope)}
:where(.cf-new-opportunity-8) .no8-q{position:absolute;z-index:2;display:inline-flex;align-items:center;padding:.4rem .8rem;border-radius:var(--card-radius,var(--radius,999px));background:var(--no8-card);border:1px solid var(--no8-line);box-shadow:var(--card-shadow,inset 0 0 0 1px var(--card-border,oklch(from var(--ink) l c h / 0.12)),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)));font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:.9375rem;line-height:1.2;color:var(--no8-ink);white-space:nowrap;border-color:var(--card-border,var(--no8-line));text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-q--1{top:2%;left:-8%;rotate:-4deg}
:where(.cf-new-opportunity-8) .no8-q--2{top:18%;right:-14%;rotate:3deg}
:where(.cf-new-opportunity-8) .no8-q--3{bottom:4%;left:4%;rotate:-2deg}
:where(.cf-new-opportunity-8) .no8-link{grid-area:link;position:relative;justify-self:center;width:calc(var(--no8-tangle) * .0546);height:2.75rem}
:where(.cf-new-opportunity-8) .no8-link-line{position:absolute;inset:0 0 .8rem;background:linear-gradient(180deg,var(--no8-rope),var(--no8-fill));transform-origin:50% 0}
:where(.cf-new-opportunity-8) .no8-link-head{position:absolute;left:50%;bottom:0;width:1.4rem;height:.95rem;translate:-50% 0;background:var(--no8-fill);clip-path:polygon(0 0,100% 0,50% 100%)}
:where(.cf-new-opportunity-8) .no8-turn{grid-area:turn;display:grid;align-content:center}
:where(.cf-new-opportunity-8) .no8-turn-b{padding:1.35rem 1.1rem;border-radius:var(--card-radius,var(--no8-r));background:var(--band);color:var(--band-ink);text-align:center;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(1.6rem,5.5vw,1.95rem);line-height:1.04;letter-spacing:var(--display-tracking,-.03em);text-wrap:balance;box-shadow:var(--card-shadow,inset 0 0 0 1px var(--card-border,oklch(from var(--band-ink) l c h / 0.12)),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)));text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-linkb{grid-area:linkb;justify-self:start;width:6px;height:1.6rem;margin-left:calc(var(--no8-badge) / 2 - 3px);background:var(--no8-fill)}
:where(.cf-new-opportunity-8) .no8-railwrap{grid-area:rail;position:relative}
:where(.cf-new-opportunity-8) .no8-rail{display:grid;grid-template-columns:minmax(0,1fr)}
:where(.cf-new-opportunity-8) .no8-rail-line,:where(.cf-new-opportunity-8) .no8-rail-fill{display:none}
:where(.cf-new-opportunity-8) .no8-stop{position:relative;display:grid;grid-template-columns:var(--no8-badge) minmax(0,1fr);column-gap:1.1rem;align-items:start;padding-bottom:1.6rem}
:where(.cf-new-opportunity-8) .no8-stop:last-child{padding-bottom:0}
:where(.cf-new-opportunity-8) .no8-stop:not(:last-child)::before,:where(.cf-new-opportunity-8) .no8-stop:not(:last-child)::after{content:'';position:absolute;left:calc(var(--no8-badge) / 2 - 3px);top:calc(var(--no8-badge) / 2);bottom:0;width:6px}
:where(.cf-new-opportunity-8) .no8-stop::before{background:var(--no8-line)}
:where(.cf-new-opportunity-8) .no8-stop::after{background:var(--no8-fill);transform-origin:50% 0}
:where(.cf-new-opportunity-8) .no8-badge{position:relative;z-index:1;width:var(--no8-badge);height:var(--no8-badge);border-radius:1.1rem;background:var(--no8-card);box-shadow:0 0 0 3px var(--no8-card),0 0 0 6px var(--no8-fill),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .45)}
:where(.cf-new-opportunity-8) .no8-badge img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
:where(.cf-new-opportunity-8) .no8-badge-ico{display:grid;place-items:center;width:100%;height:100%;border-radius:inherit;background:color-mix(in oklch,var(--no8-ink) 5%,var(--no8-card));color:var(--no8-accent)}
:where(.cf-new-opportunity-8) .no8-badge-ico svg{width:2rem;height:2rem}
:where(.cf-new-opportunity-8) .no8-num{position:absolute;top:-.6rem;left:-.6rem;display:grid;place-items:center;min-width:1.85rem;height:1.85rem;padding:0 .45rem;border-radius:999px;background:var(--band);color:var(--band-ink);font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:.9375rem;line-height:1;box-shadow:0 0 0 3px var(--no8-card);text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-stop-txt{min-width:0;padding-top:.35rem}
:where(.cf-new-opportunity-8) .no8-stop-h{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:clamp(1.15rem,1.5vw,1.3rem);line-height:1.15;letter-spacing:var(--display-tracking,-.015em);color:var(--no8-ink);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-stop-item{margin-top:.4rem;font-size:1rem;line-height:1.4;color:var(--no8-muted);text-wrap:pretty}
:where(.cf-new-opportunity-8) .no8-stop-val{display:block;margin-top:.15rem;font-weight:700;color:color-mix(in oklch,var(--no8-ink) 78%,var(--no8-surface))}
:where(.cf-new-opportunity-8) .no8-drop{position:relative;width:6px;height:clamp(2.75rem,5vw,4rem);margin:0 auto;background:var(--no8-line)}
:where(.cf-new-opportunity-8) .no8-drop-fill{position:absolute;inset:0;background:var(--no8-fill);transform-origin:50% 0}
:where(.cf-new-opportunity-8) .no8-drop-head{position:absolute;left:50%;bottom:-.9rem;width:1.4rem;height:.95rem;translate:-50% 0;background:var(--no8-fill);clip-path:polygon(0 0,100% 0,50% 100%)}
:where(.cf-new-opportunity-8) .no8-vehicle{margin-top:1.6rem;text-align:center;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:clamp(1.45rem,2.6vw,2.25rem);line-height:1.12;letter-spacing:var(--display-tracking,-.025em);color:var(--no8-ink);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-vehicle strong{font-weight:var(--display-weight,900);color:var(--ink)}
:where(.cf-new-opportunity-8) .no8-offer{display:grid;justify-items:center;gap:1.4rem;max-width:68rem;margin:clamp(1.25rem,2.5vw,1.75rem) auto 0;padding:clamp(1.35rem,3vw,2.25rem) clamp(1.1rem,3vw,2.25rem);text-align:center;border-radius:var(--card-radius,calc(var(--no8-r) + 4px));background:var(--no8-card);border:1px solid oklch(from var(--no8-ink) l c h / 0.12);box-shadow:var(--card-shadow,inset 0 0 0 1px var(--card-border,oklch(from var(--ink) l c h / 0.12)),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)));border-color:var(--card-border,var(--no8-line))}
:where(.cf-new-opportunity-8) .no8-fan{position:relative;width:10.5rem;height:6.25rem;flex:none}
:where(.cf-new-opportunity-8) .no8-fan img{position:absolute;top:.6rem;width:5.25rem;height:5.25rem;object-fit:cover;border-radius:.85rem;background:transparent;border:3px solid var(--no8-card);box-shadow:none;border-color:transparent;filter:drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .2))}
:where(.cf-new-opportunity-8) .no8-fan img:nth-child(1){left:0;rotate:-9deg}
:where(.cf-new-opportunity-8) .no8-fan img:nth-child(2){left:2.6rem;top:0;rotate:-1deg;z-index:1}
:where(.cf-new-opportunity-8) .no8-fan img:nth-child(3){left:5.2rem;rotate:8deg;z-index:2}
:where(.cf-new-opportunity-8) .no8-info{min-width:0}
:where(.cf-new-opportunity-8) .no8-otext{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:clamp(1.15rem,1.6vw,1.35rem);line-height:1.25;color:var(--no8-ink);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-price{margin-top:1rem}
:where(.cf-new-opportunity-8) .no8-plabel{margin-bottom:.5rem;font-size:.9375rem;font-weight:700;line-height:1.3;color:var(--no8-muted)}
:where(.cf-new-opportunity-8) .no8-prow{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.45rem .8rem}
:where(.cf-new-opportunity-8) .no8-pnow{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(2.6rem,4vw,3.25rem);line-height:1.05;letter-spacing:var(--display-tracking,-.03em);color:var(--no8-ink);font-variant-numeric:tabular-nums;text-transform:var(--display-case,none)}
:where(.cf-new-opportunity-8) .no8-pwas{font-size:1rem;font-weight:600;color:var(--no8-muted)}
:where(.cf-new-opportunity-8) .no8-pwas s{font-weight:800;text-decoration-color:currentColor;text-decoration-thickness:2px;color:var(--danger)}
:where(.cf-new-opportunity-8) .no8-psave{display:inline-flex;align-items:center;padding:.3rem .8rem;border-radius:999px;background:var(--success-soft);color:var(--no8-ok);font-weight:800;font-size:.9375rem;line-height:1.2;white-space:nowrap}
:where(.cf-new-opportunity-8) .no8-note{margin-top:.75rem;font-size:.9375rem;line-height:1.4;color:var(--no8-muted)}
:where(.cf-new-opportunity-8) .no8-act{width:100%;max-width:26rem}
:where(.cf-new-opportunity-8) .no8-btn{appearance:none;position:relative;display:inline-flex;width:100%;min-height:4.25rem;align-items:center;justify-content:center;padding:1rem;border:1px solid oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h);border-radius:var(--button-radius,calc(var(--no8-r) * .6));background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) l c h),oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,900);font-size:clamp(1.05rem,4.4vw,1.35rem);line-height:1.15;letter-spacing:var(--display-tracking,-.005em);text-align:center;text-decoration:none;text-wrap:balance;text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .3),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),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)));text-transform:var(--button-case,none);border-color:var(--button-bg-2,var(--cta-2))}
:where(.cf-new-opportunity-8) .no8-btn-in{display:inline-flex;align-items:center;justify-content:center;gap:.55rem}
:where(.cf-new-opportunity-8) .no8-btn svg{width:1.3rem;height:1.3rem;flex:none}
:where(.cf-new-opportunity-8) .no8-btn:hover:not(:disabled),:where(.cf-new-opportunity-8) .no8-btn.is-hover{background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h);transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .3),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),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-new-opportunity-8) .no8-btn:active:not(:disabled),:where(.cf-new-opportunity-8) .no8-btn.is-active{background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h);color:contrast-color(oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h));transform:translateY(2px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .3),inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14)))}
:where(.cf-new-opportunity-8) .no8-btn:focus-visible{outline:3px solid var(--no8-accent);outline-offset:3px}
:where(.cf-new-opportunity-8) .no8-btn:disabled{cursor:not-allowed;background:var(--button-2-bg,var(--card));border-color:var(--button-2-border,oklch(from var(--ink) l c h / 0.22));color:var(--button-2-ink,var(--ink));text-shadow:none;box-shadow:none;filter:none;transform:none}
:where(.cf-new-opportunity-8) .no8-btn[aria-busy='true']{cursor:progress}
:where(.cf-new-opportunity-8) .no8-assure{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem 1rem;margin-top:.9rem}
:where(.cf-new-opportunity-8) .no8-assure li{display:inline-flex;align-items:center;gap:.4rem;font-size:.9375rem;font-weight:600;line-height:1.3;color:color-mix(in oklch,var(--no8-ink) 80%,var(--no8-card))}
:where(.cf-new-opportunity-8) .no8-assure svg{width:1.05rem;height:1.05rem;flex:none;color:var(--success)}
:where(.cf-new-opportunity-8) .no8-msg{display:flex;align-items:flex-start;justify-content:center;gap:.5rem;margin-top:.9rem;font-size:1rem;font-weight:600;line-height:1.4;text-align:left;text-wrap:pretty}
:where(.cf-new-opportunity-8) .no8-msg svg{flex:none;width:1.2rem;height:1.2rem;margin-top:.1rem}
:where(.cf-new-opportunity-8) .no8-msg--err{color:var(--danger)}
:where(.cf-new-opportunity-8) .no8-msg--err svg{color:var(--danger)}
@media (min-width:56rem){
:where(.cf-new-opportunity-8) .no8-offer{grid-template-columns:auto minmax(0,1fr) minmax(19rem,24rem);align-items:center;justify-items:stretch;gap:clamp(1.5rem,3vw,2.5rem);text-align:left}
:where(.cf-new-opportunity-8) .no8-offer--plain{grid-template-columns:minmax(0,1fr) minmax(19rem,24rem)}
:where(.cf-new-opportunity-8) .no8-prow{justify-content:flex-start}
:where(.cf-new-opportunity-8) .no8-act{max-width:none}
:where(.cf-new-opportunity-8) .no8-btn{font-size:clamp(1.15rem,1.55vw,1.35rem)}
}
@media (min-width:64rem){
.cf-new-opportunity-8{--no8-tangle:clamp(11.5rem,15vw,13.5rem);--no8-badge:5.5rem;--no8-shrink:scaleX(0)}
:where(.cf-new-opportunity-8) .no8-stage{grid-template-columns:var(--no8-tangle) clamp(2.5rem,4vw,3.75rem) minmax(11rem,clamp(11rem,16vw,15rem)) minmax(0,1fr);grid-template-areas:'tangle link turn rail';align-items:start}
:where(.cf-new-opportunity-8) .no8-tangle{justify-self:stretch;width:auto;margin:0}
:where(.cf-new-opportunity-8) .no8-tangle svg{transform:none}
:where(.cf-new-opportunity-8) .no8-link{justify-self:stretch;width:auto;height:var(--no8-tangle)}
:where(.cf-new-opportunity-8) .no8-link-line{inset:auto .85rem auto 0;top:50%;height:calc(var(--no8-tangle) * .0546);translate:0 -50%;background:linear-gradient(90deg,var(--no8-rope),var(--no8-fill));transform-origin:0 50%}
:where(.cf-new-opportunity-8) .no8-link-head{left:auto;right:0;top:50%;bottom:auto;width:.95rem;height:1.4rem;translate:0 -50%;clip-path:polygon(0 0,100% 50%,0 100%)}
:where(.cf-new-opportunity-8) .no8-turn{height:var(--no8-tangle)}
:where(.cf-new-opportunity-8) .no8-turn-b{font-size:clamp(1.4rem,1.8vw,1.85rem)}
:where(.cf-new-opportunity-8) .no8-linkb{display:none}
:where(.cf-new-opportunity-8) .no8-rail{grid-template-columns:repeat(var(--n),minmax(0,1fr))}
:where(.cf-new-opportunity-8) .no8-rail-line,:where(.cf-new-opportunity-8) .no8-rail-fill{display:block;position:absolute;left:0;top:calc(var(--no8-tangle) / 2 - 3px);height:6px;width:calc(100% - 100% / (2 * var(--n)))}
:where(.cf-new-opportunity-8) .no8-rail-line{background:var(--no8-line)}
:where(.cf-new-opportunity-8) .no8-rail-fill{background:var(--no8-fill);transform-origin:0 50%}
:where(.cf-new-opportunity-8) .no8-stop{grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center;padding:calc(var(--no8-tangle) / 2 - var(--no8-badge) / 2) .5rem 0}
:where(.cf-new-opportunity-8) .no8-stop:not(:last-child)::before,:where(.cf-new-opportunity-8) .no8-stop:not(:last-child)::after{display:none}
:where(.cf-new-opportunity-8) .no8-stop-txt{padding-top:1.15rem}
}
@media (prefers-reduced-motion:no-preference){
:where(.cf-new-opportunity-8) .no8-btn{transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}
:where(.cf-new-opportunity-8) .no8-badge{transition:transform .25s ease,box-shadow .35s ease}
:where(.cf-new-opportunity-8) .no8-num{transition:background-color .35s ease,color .35s ease}
:where(.cf-new-opportunity-8) .no8-stop:hover .no8-badge{transform:translateY(-3px)}
:where(.cf-new-opportunity-8) .no8-spin{animation:no8-spin .85s linear infinite}
.cf-new-opportunity-8[data-motion='on'] .no8-rope,.cf-new-opportunity-8[data-motion='on'] .no8-rope-hi{stroke-dasharray:1 1}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-rope,.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-rope-hi{stroke-dashoffset:1}
.cf-new-opportunity-8[data-run] .no8-rope,.cf-new-opportunity-8[data-run] .no8-rope-hi{transition:stroke-dashoffset 1.15s cubic-bezier(.5,0,.25,1)}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-link-line{transform:var(--no8-shrink)}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-link-head{opacity:0}
.cf-new-opportunity-8[data-run] .no8-link-line{transition:transform .4s ease-out 1s}
.cf-new-opportunity-8[data-run] .no8-link-head{transition:opacity .2s ease 1.35s}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-turn-b{transform:scale(.94)}
.cf-new-opportunity-8[data-run] .no8-turn-b{transition:transform .5s cubic-bezier(.3,1.6,.5,1) 1.4s}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-rail-fill{transform:scaleX(0)}
.cf-new-opportunity-8[data-run] .no8-rail-fill{transition:transform 1.1s cubic-bezier(.45,0,.25,1) 1.7s}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-stop::after{transform:scaleY(0)}
.cf-new-opportunity-8[data-run] .no8-stop::after{transition:transform .4s ease calc(1.95s + var(--i) * .4s)}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-badge{box-shadow:0 0 0 3px var(--no8-card),0 0 0 6px var(--no8-line),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .35)}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-num{background:var(--no8-card);color:var(--no8-ink);box-shadow:0 0 0 3px var(--no8-card),inset 0 0 0 1.5px var(--no8-line)}
.cf-new-opportunity-8[data-run] .no8-badge{transition:box-shadow .35s ease calc(1.8s + var(--i) * .4s),transform .25s ease}
.cf-new-opportunity-8[data-run] .no8-num{transition:background-color .35s ease calc(1.8s + var(--i) * .4s),color .35s ease calc(1.8s + var(--i) * .4s)}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-drop-fill{transform:scaleY(0)}
.cf-new-opportunity-8[data-motion='on']:not([data-run]) .no8-drop-head{opacity:0}
.cf-new-opportunity-8[data-run] .no8-drop-fill{transition:transform .45s ease 3s}
.cf-new-opportunity-8[data-run] .no8-drop-head{transition:opacity .2s ease 3.4s}
.cf-new-opportunity-8[data-run] .no8-btn:not(:disabled){animation:no8-nudge .7s ease 3.55s 1}
@keyframes no8-nudge{0%,55%,100%{transform:none}30%{transform:translateY(-5px)}75%{transform:translateY(-2px)}}
@keyframes no8-spin{to{transform:rotate(360deg)}}
}
@media (forced-colors:active){:where(.cf-new-opportunity-8) .no8-turn-b,:where(.cf-new-opportunity-8) .no8-offer,:where(.cf-new-opportunity-8) .no8-q,:where(.cf-new-opportunity-8) .no8-badge{outline:1px solid CanvasText}}
`
type Status = 'idle' | 'loading' | 'error'
pieces/content/new-opportunity-8/specimen.tsx 35 lines
import * as React from 'react'
import { slot } from '../../slots'
import defaults from '../../studio-defaults.json'
import { NewOpportunity8, type NewOpportunity8State } from '../new-opportunity-8'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
const sample = defaults.sample
const TITLES = ['Plan your funnel', 'Write your copy', 'Check every step']
export default function NewOpportunity8Specimen({ state = 'default' }: { state?: string }) {
const steps = sample.items.map((item, i) => ({ title: TITLES[i] ?? item.name, item: { ...item, itemImage: slot(`item-${i + 1}`, item.image) } }))
return (
<NewOpportunity8
state={state as NewOpportunity8State}
headline={sample.headline}
emphasis='a clear plan'
lead='A new way to plan your funnel, write your page copy, and check every step before you launch.'
questions={['Offer?', 'Pages?', 'Copy?']}
turnText='Start with a clear plan'
steps={steps}
vehicleLabel='Your new vehicle:'
productName={sample.name}
offerText='Guide, workbook and checklist in one download.'
todayLabel={sample.todayLabel}
price={sample.price}
regularPrice={sample.regularPrice}
regularLabel='total value'
note={sample.note}
ctaLabel={sample.label}
reassurance={sample.reassurance}
errorMessage='We couldn’t open your checkout. Please try again.'
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalNewOpportunity8 |
string |
Default 'Build your first funnel with a clear plan'
|
emphasis OptionalNewOpportunity8 |
string |
Default 'a clear plan'
|
lead OptionalNewOpportunity8 |
string |
Default 'A new way to plan your funnel, write your page copy, and check every step before you launch.'
|
oldTitle OptionalNewOpportunity8 |
string |
Default 'The old way'
|
tangleLabel OptionalNewOpportunity8 |
string |
Default '{title}: a tangle of questions. {questions}'
|
regularPriceLabel OptionalNewOpportunity8 |
string |
Default 'Regular price '
|
oldText OptionalNewOpportunity8 |
string |
|
questions OptionalNewOpportunity8 |
(string | { text: string })[] |
Default DEFAULT_QUESTIONS
|
newTitle OptionalNewOpportunity8 |
string |
Default 'The new way'
|
newText OptionalNewOpportunity8 |
string |
|
turnText OptionalNewOpportunity8 |
string |
Default 'Start with a clear plan'
|
steps OptionalNewOpportunity8 |
NewOpportunity8Step[] |
Default DEFAULT_STEPS
|
valueSuffix OptionalNewOpportunity8 |
string |
Default 'value'
|
vehicleLabel OptionalNewOpportunity8 |
string |
Default 'Your new vehicle:'
|
productName OptionalNewOpportunity8 |
string |
Default 'The Funnel Starter Kit'
|
offerText OptionalNewOpportunity8 |
string |
Default 'Guide, workbook and checklist in one download.'
|
todayLabel OptionalNewOpportunity8 |
string |
Default 'Get the complete kit for'
|
price OptionalNewOpportunity8 |
string |
Default '$47'
|
regularPrice OptionalNewOpportunity8 |
string |
|
regularLabel OptionalNewOpportunity8 |
string |
Default 'total value'
|
saveLabel OptionalNewOpportunity8 |
string |
Default 'You save'
|
note OptionalNewOpportunity8 |
string |
|
ctaLabel OptionalNewOpportunity8 |
string |
Default 'Yes! Give Me Access'
|
ctaHref OptionalNewOpportunity8 |
string |
|
href OptionalNewOpportunity8 |
string |
Default ctaHref
|
loadingLabel OptionalNewOpportunity8 |
string |
Default 'Opening your kit…'
|
successLabel OptionalNewOpportunity8 |
string |
|
reassurance OptionalNewOpportunity8 |
(string | { text: string })[] |
Default []
|
successMessage OptionalNewOpportunity8 |
string |
|
errorMessage OptionalNewOpportunity8 |
string |
Default 'We couldn’t open your checkout. Please try again.'
|
onAction OptionalNewOpportunity8 |
() => void | Promise<void> |
|
state OptionalNewOpportunity8 |
NewOpportunity8State |
Default 'default'
|
id OptionalNewOpportunity8 |
string |
|
className OptionalNewOpportunity8 |
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- 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.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB