Three Secrets 4
A route map for a free training: three stops, each a secret that clears one false belief on the road, ending at the register button.
Use it in a prompt
Use content/three-secrets-4 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/three-secrets-4.tsx. - Import it and pass your copy and images (Props tab):
import { ThreeSecrets4 } from "@/components/funneldna/content/three-secrets-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/three-secrets-4/component.tsx 538 lines
// layout: segmented-stepper
// A route map for a free training: three stops, each a secret that clears one false belief on the road, ending at the register button.
'use client'
import * as React from 'react'
import { AlertCircle, CalendarCheck, Check, Construction, Loader2, MapPin, MonitorPlay } from 'lucide-react'
/** States the piece implements (the specimen renders each one). */
export type ThreeSecrets4State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type RouteStop = {
/** Short stop name shown on the route itself (2–5 words). */
name: string
/** Teaser headline for the secret: opens the loop, never gives the answer. */
title: string
/** The false belief that blocks the road before this stop, in the reader’s own words. */
obstacle: string
/** One line on what the training shows at this stop. */
payoff: string
/** Overrides the shared obstacle lead-in for this stop. */
obstacleLead?: string
/** Overrides the shared payoff lead-in for this stop. */
payoffLead?: string
}
export type ThreeSecrets4Props = {
headline?: string
/** Phrase inside the headline that gets one marker stroke (matched case-insensitively). */
emphasis?: string
/** Line under the headline; omit to hide. */
lead?: string
/** Wide illustration of the route (slot: scene). Shown as a strip above the stops; omit to hide. */
routeImage?: string
/** Alt text for the route illustration; empty marks it decorative. */
routeImageAlt?: string
/** Accessible name for the route of stops. */
routeLabel?: string
/** The starting point on the route. */
startLabel?: string
startNote?: string
/** The destination at the end of the route. */
finishLabel?: string
finishNote?: string
/** Three stops: the vehicle, the internal and the external false belief. Only the first three render. */
stops?: RouteStop[]
/** Small label above each stop name. The {n} placeholder becomes the stop number. */
stepLabel?: string
/** Bold lead-in before each false belief. */
obstacleLead?: string
/** Bold lead-in before each payoff line. */
payoffLead?: string
/** Secondary button that moves to the next stop. */
nextLabel?: string
/** Secondary button text on the last stop; it moves focus to the register button. */
finishCueLabel?: string
/** Headline beside the register button at the end of the route. */
destinationHeadline?: string
/** Bold risk-reversal lead-in shown before the button. */
riskLead?: string
/** Rest of the risk-reversal line. */
risk?: string
/** Register button text. */
label?: string
/** One short line under the button; omit to hide. */
note?: string
/** Button text while a promise returned by onAction is pending. */
loadingLabel?: string
/** Shown under the button when onAction throws or rejects, or in the error state. */
errorMessage?: string
/** Where the button goes (e.g. '#register'); the button renders as a link when set. */
href?: string
/** Called on click. A returned promise shows loadingLabel; a rejection shows errorMessage. */
onAction?: () => void | Promise<unknown>
/** Forces a visual state for previews; 'default' lets the piece manage its own. */
state?: ThreeSecrets4State
/** Id on the root section, e.g. as an anchor target. */
id?: string
className?: string
}
export function ThreeSecrets4(props: ThreeSecrets4Props) {
const {
headline = 'Three secrets to a calendar that stays booked solid',
emphasis = 'booked solid',
lead = 'A free training for HVAC owners. Follow the route from a quiet Tuesday to a full schedule, one stop at a time.',
routeImage,
routeImageAlt = '',
routeLabel = 'The route to a booked-solid calendar',
startLabel = 'Where you are',
startNote = 'Open slots and a quiet phone',
finishLabel = 'Booked solid',
finishNote = 'Every truck out the door',
stops = DEFAULT_STOPS,
stepLabel = 'Stop {n}',
obstacleLead = 'Roadblock:',
payoffLead = 'On the training:',
nextLabel = 'Next stop',
finishCueLabel = 'Go to the finish',
destinationHeadline = 'Take the whole route on the free training',
riskLead = 'Free to watch.',
risk = 'No card, nothing to buy, leave whenever you like.',
label = 'Yes! Save My Free Seat',
note = 'Watch online, on your schedule',
loadingLabel = 'Saving your seat…',
errorMessage = 'We couldn’t save your seat. Please try again.',
href,
onAction,
state = 'default',
id,
className,
} = props
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '')
const headingId = `ts4-h-${uid}`
const errId = `ts4-e-${uid}`
const rows = stops.slice(0, 3)
const n = rows.length + 2
const [active, setActive] = React.useState(0)
const [drawn, setDrawn] = React.useState(false)
const [status, setStatus] = React.useState<'idle' | 'loading' | 'error'>('idle')
const alive = React.useRef(true)
const routeRef = React.useRef<HTMLDivElement>(null)
const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])
const ctaRef = React.useRef<HTMLElement | null>(null)
const setCta = React.useCallback((el: HTMLElement | null) => {
ctaRef.current = el
}, [])
const current = Math.min(active, Math.max(rows.length - 1, 0))
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
const el = routeRef.current
if (!el) return
const reduce =
typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches
if (reduce || typeof IntersectionObserver === 'undefined') {
setDrawn(true)
return
}
const io = new IntersectionObserver(
(entries) => {
if (entries.some((entry) => entry.isIntersecting)) {
setDrawn(true)
io.disconnect()
}
},
{ threshold: 0.15, rootMargin: '0px 0px -12% 0px' },
)
io.observe(el)
return () => io.disconnect()
}, [])
const view = state === 'error' && status === 'idle' ? 'error' : status
const disabled = state === 'disabled'
const busy = view === 'loading'
const inert = disabled || busy
const force = state === 'hover' || state === 'active' ? state : undefined
function next(i: number) {
if (i < rows.length - 1) {
setActive(i + 1)
window.requestAnimationFrame(() => tabRefs.current[i + 1]?.focus())
} else {
ctaRef.current?.focus()
}
}
function handle(event: React.MouseEvent<HTMLElement>) {
if (inert) {
event.preventDefault()
return
}
if (!onAction) return
setStatus('idle')
let result: unknown
try {
result = onAction()
} catch {
setStatus('error')
return
}
if (!isThenable(result)) return
setStatus('loading')
result.then(
() => {
if (alive.current) setStatus('idle')
},
() => {
if (alive.current) setStatus('error')
},
)
}
const inner = busy ? (
<>
<Loader2 className='ts4-spin' aria-hidden='true' />
<span>{loadingLabel}</span>
</>
) : (
<span>{label}</span>
)
const shared = {
'data-force': force,
'data-view': disabled ? 'disabled' : view,
'aria-busy': busy || undefined,
'aria-disabled': inert || undefined,
'aria-describedby': view === 'error' ? errId : undefined,
onClick: handle,
}
const button = href ? (
<a className='ts4-btn' ref={setCta} {...shared} href={inert ? undefined : href}>
{inner}
</a>
) : (
<button className='ts4-btn' ref={setCta} {...shared} type='button' disabled={disabled}>
{inner}
</button>
)
return (
<section
id={id}
className={['cf-three-secrets-4', className].filter(Boolean).join(' ')}
aria-labelledby={headingId}
data-drawn={drawn ? '' : undefined}
>
<style>{CSS}</style>
<div className='ts4-wrap'>
<header className='ts4-head'>
<h2 className='ts4-h' id={headingId}>{withEmphasis(headline, emphasis)}</h2>
{lead ? <p className='ts4-lead'>{lead}</p> : null}
</header>
<div className='ts4-board'>
{routeImage ? (
<figure className='ts4-art'>
<img src={routeImage} alt={routeImageAlt} width={1600} height={600} loading='lazy' decoding='async' />
</figure>
) : null}
<div
className='ts4-route'
ref={routeRef}
role='group'
aria-label={routeLabel}
style={{ '--n': n, '--p': current + 1 } as React.CSSProperties}
>
<div className='ts4-line' aria-hidden='true'>
<span className='ts4-draw'>
<span className='ts4-trav' />
</span>
{rows.map((_, i) => (
<span
className='ts4-block'
key={i}
data-clear={i <= current ? '' : undefined}
style={{ '--o': i } as React.CSSProperties}
>
{i <= current ? <Check strokeWidth={3} /> : <Construction strokeWidth={2.5} />}
</span>
))}
</div>
<div className='ts4-cell ts4-end' style={{ '--col': 1, '--k': 0 } as React.CSSProperties}>
<span className='ts4-node' aria-hidden='true'>
<MapPin strokeWidth={2.5} />
</span>
<span className='ts4-txt'>
<span className='ts4-end-l'>{startLabel}</span>
{startNote ? <span className='ts4-end-n'>{startNote}</span> : null}
</span>
</div>
{rows.map((stop, i) => {
const on = i === current
const last = i === rows.length - 1
const panelId = `ts4-p-${uid}-${i}`
const titleId = `ts4-t-${uid}-${i}`
return (
<React.Fragment key={i}>
<button
type='button'
className='ts4-cell ts4-tab'
ref={(el) => {
tabRefs.current[i] = el
}}
aria-expanded={on}
aria-controls={panelId}
aria-current={on ? 'step' : undefined}
data-done={i < current ? '' : undefined}
style={{ '--col': i + 2, '--k': i + 1 } as React.CSSProperties}
onClick={() => setActive(i)}
>
<span className='ts4-node' aria-hidden='true'>{i + 1}</span>
<span className='ts4-txt'>
<span className='ts4-step'>{fill(stepLabel, i + 1)}</span>
<span className='ts4-name'>{stop.name}</span>
</span>
</button>
<div className='ts4-panel' id={panelId} role='region' aria-labelledby={titleId} hidden={!on}>
<span className='ts4-num' aria-hidden='true'>{String(i + 1).padStart(2, '0')}</span>
<div className='ts4-body'>
<h3 className='ts4-title' id={titleId}>{stop.title}</h3>
<p className='ts4-p ts4-obs'>
<span className='ts4-badge' aria-hidden='true'>
<Construction strokeWidth={3} />
</span>
<span>
<strong>{stop.obstacleLead ?? obstacleLead}</strong> {stop.obstacle}
</span>
</p>
<p className='ts4-p ts4-pay'>
<strong>{stop.payoffLead ?? payoffLead}</strong> {stop.payoff}
</p>
</div>
<div className='ts4-panel-act'>
<button type='button' className='ts4-next' onClick={() => next(i)}>
{last ? finishCueLabel : nextLabel}
</button>
</div>
</div>
</React.Fragment>
)
})}
<div className='ts4-cell ts4-end' style={{ '--col': n, '--k': n - 1 } as React.CSSProperties}>
<span className='ts4-node ts4-node-finish' aria-hidden='true'>
<CalendarCheck strokeWidth={2.5} />
</span>
<span className='ts4-txt'>
<span className='ts4-end-l'>{finishLabel}</span>
{finishNote ? <span className='ts4-end-n'>{finishNote}</span> : null}
</span>
</div>
</div>
<div className='ts4-dest'>
<div className='ts4-dest-copy'>
<h3 className='ts4-dest-h'>{destinationHeadline}</h3>
{riskLead || risk ? (
<p className='ts4-risk'>
{riskLead ? <strong>{riskLead}</strong> : null} {risk}
</p>
) : null}
</div>
<div className='ts4-act'>
{button}
{note ? (
<p className='ts4-note'>
<MonitorPlay strokeWidth={2.5} aria-hidden='true' />
{note}
</p>
) : null}
{view === 'error' ? (
<p className='ts4-err' id={errId} role='alert'>
<AlertCircle strokeWidth={2.5} aria-hidden='true' />
<span>{errorMessage}</span>
</p>
) : null}
</div>
</div>
</div>
</div>
</section>
)
}
export default ThreeSecrets4
const DEFAULT_STOPS: RouteStop[] = [
{
name: 'Work the list you have',
title: 'Why next month’s jobs are already sitting in your customer list',
obstacle: '“More ads are the only way to get more calls.”',
payoff: 'You’ll see which customers to call first, and what to say when they pick up.',
},
{
name: 'Follow up from the truck',
title: 'The one-page follow-up any tech can send between jobs',
obstacle: '“I’m a tech, not a marketer.”',
payoff: 'You’ll get a follow-up you can copy, even if you hate writing.',
},
{
name: 'Book ahead of the weather',
title: 'How to book tune-ups before the first heatwave hits',
obstacle: '“Customers only call when something breaks.”',
payoff: 'You’ll see how to fill next month before the rush starts.',
},
]
function fill(template: string, n: number) {
return template.split('{n}').join(String(n))
}
function isThenable(value: unknown): value is Promise<unknown> {
return !!value && typeof (value as { then?: unknown }).then === 'function'
}
function withEmphasis(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text
const at = text.toLowerCase().indexOf(phrase.toLowerCase())
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className='ts4-em'>{text.slice(at, at + phrase.length)}</span>
{text.slice(at + phrase.length)}
</>
)
}
const S = '.cf-three-secrets-4'
const SH = 'oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h'
const BG = 'var(--button-bg, var(--cta, #d63a2f))'
const BG2 = 'var(--button-bg-2, var(--cta-2, #b52b22))'
const CSS = `
${S}{position:relative;isolation:isolate;background:var(--surface,#fff);color:var(--ink,#151c2c);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);overflow-x:clip}
${S} *,${S} *::before,${S} *::after{box-sizing:border-box}
${S} .ts4-wrap{max-width:1120px;margin:0 auto;--ts4-ok-ink:oklch(from var(--success,#1f8a4c) clamp(.18,(.66 - l) * 100,1) 0 h);--ts4-no-ink:oklch(from var(--danger,#b42318) clamp(.18,(.66 - l) * 100,1) 0 h)}
${S} .ts4-head{max-width:46rem;margin:0 auto clamp(32px,4vw,48px);text-align:center}
${S} .ts4-h{margin:0;color:var(--ink,#151c2c);font-family:var(--font-display,inherit);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance}
${S} .ts4-em{background-image:linear-gradient(transparent 58%,oklch(from var(--marker,#fae37c) l c h / .9) 58%,oklch(from var(--marker,#fae37c) l c h / .9) 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-inline:.06em}
${S} .ts4-lead{margin:16px auto 0;max-width:40rem;color:var(--muted,#4a5568);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
${S} .ts4-board{background:var(--card,#fff);border:1px solid var(--card-border,oklch(from var(--ink,#151c2c) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px ${SH} / .22),0 4px 10px -2px ${SH} / .2)));padding:clamp(20px,3vw,32px)}
${S} .ts4-art{margin:0 0 clamp(16px,2.4vw,24px)}
${S} .ts4-art img{display:block;width:100%;height:clamp(150px,19vw,230px);object-fit:cover;object-position:center 62%;border-radius:12px}
${S} .ts4-route{position:relative;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));align-items:start}
${S} .ts4-cell{grid-column:var(--col);grid-row:1;position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0;padding:12px 8px 16px;text-align:center}
${S} .ts4-tab{appearance:none;margin:0;justify-self:center;width:calc(100% - 28px);border:0;border-radius:12px;background:transparent;color:inherit;font:inherit;cursor:pointer;transition:background .16s ease}
@media (hover:hover){${S} .ts4-tab:hover{background:color-mix(in oklch,var(--ink,#151c2c) 5%,var(--card,#fff))}}
${S} .ts4-tab:active{background:color-mix(in oklch,var(--ink,#151c2c) 8%,var(--card,#fff))}
${S} .ts4-tab[aria-expanded='true']{background:color-mix(in oklch,var(--accent,#2563eb) 11%,var(--card,#fff))}
${S} .ts4-tab:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:2px}
${S} .ts4-node{position:relative;z-index:2;flex:none;display:grid;place-items:center;width:48px;height:48px;border-radius:999px;border:2px solid oklch(from var(--ink,#151c2c) l c h / .2);background:var(--card,#fff);color:var(--ink,#151c2c);font-family:var(--font-display,inherit);font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1;font-variant-numeric:tabular-nums;box-shadow:var(--shadow-sm,0 1px 2px ${SH} / .2))}
${S} .ts4-node svg{width:20px;height:20px}
${S} .ts4-tab[data-done] .ts4-node{border-color:var(--accent-fill,var(--accent,#2563eb))}
${S} .ts4-tab[aria-expanded='true'] .ts4-node{border-color:transparent;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#fff))}
${S} .ts4-node-finish{border-color:transparent;background:var(--success,#1f8a4c);color:var(--ts4-ok-ink,#fff)}
${S} .ts4-txt{display:grid;gap:4px;min-width:0}
${S} .ts4-step{color:var(--muted,#4a5568);font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
${S} .ts4-tab[aria-expanded='true'] .ts4-step{color:var(--ink,#151c2c)}
${S} .ts4-name,${S} .ts4-end-l{color:var(--ink,#151c2c);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.25;font-weight:800;text-wrap:balance}
${S} .ts4-end-n{color:var(--muted,#4a5568);font-size:.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty}
${S} .ts4-line{position:absolute;z-index:1;top:33px;left:calc(50% / var(--n));right:calc(50% / var(--n));height:6px;border-radius:999px;background:oklch(from var(--ink,#151c2c) l c h / .1);pointer-events:none}
${S} .ts4-draw{position:absolute;inset:0;overflow:hidden;border-radius:inherit;background:oklch(from var(--ink,#151c2c) l c h / .28);transform-origin:left center}
${S} .ts4-trav{position:absolute;top:0;bottom:0;left:0;width:calc(var(--p) / (var(--n) - 1) * 100%);border-radius:inherit;background:var(--accent-fill,var(--accent,#2563eb))}
${S} .ts4-block{position:absolute;top:50%;left:calc((var(--o) + .5) / (var(--n) - 1) * 100%);display:grid;place-items:center;width:28px;height:28px;border-radius:999px;transform:translate(-50%,-50%);background:var(--danger,#b42318);color:var(--ts4-no-ink,#fff);box-shadow:var(--shadow-sm,0 1px 2px ${SH} / .2))}
${S} .ts4-block[data-clear]{background:var(--success,#1f8a4c);color:var(--ts4-ok-ink,#fff)}
${S} .ts4-block svg{width:16px;height:16px}
${S} .ts4-panel{grid-column:1 / -1;grid-row:2;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:16px clamp(20px,3vw,40px);margin-top:16px;padding:clamp(20px,3vw,32px);border-radius:10px;background:color-mix(in oklch,var(--ink,#151c2c) 4%,var(--card,#fff))}
${S} .ts4-panel[hidden]{display:none}
${S} .ts4-num{color:var(--accent,#2563eb);font-family:var(--font-display,inherit);font-size:clamp(3.5rem,6vw,5.5rem);line-height:.86;font-weight:var(--display-weight,800);letter-spacing:-.04em;font-variant-numeric:tabular-nums}
${S} .ts4-body{min-width:0}
${S} .ts4-title,${S} .ts4-dest-h{margin:0;color:var(--ink,#151c2c);font-family:var(--font-display,inherit);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-.01em;text-transform:var(--display-case,none);text-wrap:balance}
${S} .ts4-title{margin-bottom:16px}
${S} .ts4-p{margin:0;max-width:62ch;color:var(--ink,#151c2c);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty}
${S} .ts4-p strong{font-weight:800}
${S} .ts4-obs{display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:start}
${S} .ts4-pay{margin-top:12px;padding-left:36px}
${S} .ts4-badge{display:grid;place-items:center;width:24px;height:24px;margin-top:1px;border-radius:999px;background:var(--danger,#b42318);color:var(--ts4-no-ink,#fff)}
${S} .ts4-badge svg{width:14px;height:14px}
${S} .ts4-panel-act{align-self:end}
${S} .ts4-next{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 24px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary,#e8ecf2));color:var(--button-2-ink,var(--secondary-ink,#151c2c));font-family:var(--button-font,var(--font-display,inherit));font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:var(--button-weight,800);line-height:1.15;text-transform:var(--button-case,none);white-space:nowrap;cursor:pointer;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px ${SH} / .2)));transition:background .16s ease,transform .16s ease}
@media (hover:hover){${S} .ts4-next:hover{background:oklch(from var(--button-2-bg,var(--secondary,#e8ecf2)) calc(l - .04) c h)}}
${S} .ts4-next:active{transform:translateY(1px)}
${S} .ts4-next:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:2px}
${S} .ts4-dest{display:grid;grid-template-columns:minmax(0,1fr) minmax(18rem,24rem);align-items:center;gap:24px clamp(32px,5vw,72px);margin-top:clamp(32px,4vw,48px)}
${S} .ts4-dest-copy{min-width:0}
${S} .ts4-risk{margin:12px 0 0;max-width:52ch;color:var(--muted,#4a5568);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty}
${S} .ts4-risk strong{color:var(--ink,#151c2c);font-weight:800}
${S} .ts4-act{display:grid;gap:12px;min-width:0}
${S} .ts4-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:72px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from ${BG} calc(l + .04) c h),oklch(from ${BG2} calc(l - .02) c h));color:var(--button-ink,var(--cta-ink,#fff));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;text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);text-decoration:none;white-space:normal;text-align:center;text-wrap:balance;padding-block:12px;cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from ${BG} calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from ${BG} calc(l - .16) c h),0 1px 2px ${SH} / .3),0 8px 16px -6px ${SH} / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
${S} .ts4-btn[data-force='hover']{background:linear-gradient(oklch(from ${BG} calc(l - .01) c h),oklch(from ${BG2} calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from ${BG} calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from ${BG} calc(l - .18) c h),0 1px 2px ${SH} / .32),0 10px 18px -6px ${SH} / .55)}
@media (hover:hover){${S} .ts4-btn:not([data-view='disabled']):not([data-view='loading']):hover{background:linear-gradient(oklch(from ${BG} calc(l - .01) c h),oklch(from ${BG2} calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from ${BG} calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from ${BG} calc(l - .18) c h),0 1px 2px ${SH} / .32),0 10px 18px -6px ${SH} / .55)}}
${S} .ts4-btn[data-force='active'],${S} .ts4-btn:not([data-view='disabled']):not([data-view='loading']):active{transform:translateY(1px);background:linear-gradient(oklch(from ${BG} calc(l - .04) c h),oklch(from ${BG2} calc(l - .08) c h));box-shadow:inset 0 2px 3px oklch(from ${BG} calc(l - .22) c h / .5),inset 0 -2px 0 oklch(from ${BG} calc(l - .16) c h),0 1px 2px ${SH} / .3)}
${S} .ts4-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:3px}
${S} .ts4-btn[data-view='disabled']{background:var(--secondary,#e8ecf2);color:color-mix(in oklch,var(--secondary-ink,#151c2c) 62%,var(--secondary,#e8ecf2));text-shadow:none;box-shadow:none;cursor:not-allowed}
${S} .ts4-btn[data-view='loading']{cursor:progress}
${S} .ts4-btn svg{flex:none;width:20px;height:20px}
${S} .ts4-note{margin:0;color:var(--muted,#4a5568);font-size:.9375rem;line-height:1.4;font-weight:600;text-align:center;text-wrap:pretty}
${S} .ts4-note svg{display:inline-block;width:16px;height:16px;vertical-align:-.15em;margin-inline-end:.4em}
${S} .ts4-err{display:flex;align-items:flex-start;gap:8px;margin:0;color:var(--danger,#b42318);font-size:.9375rem;line-height:1.4;font-weight:600}
${S} .ts4-err svg{flex:none;width:18px;height:18px;margin-top:1px}
@media (max-width:860px){
${S} .ts4-art img{height:112px}
${S} .ts4-tab{width:100%}
${S} .ts4-route{grid-template-columns:minmax(0,1fr)}
${S} .ts4-cell{grid-column:1;grid-row:auto;flex-direction:row;align-items:center;gap:16px;padding:8px 12px 8px 8px;text-align:left}
${S} .ts4-line{top:32px;bottom:32px;left:29px;right:auto;width:6px;height:auto}
${S} .ts4-draw{transform-origin:center top}
${S} .ts4-trav,${S} .ts4-block{display:none}
${S} .ts4-panel{grid-column:1;grid-row:auto;grid-template-columns:minmax(0,1fr);gap:12px;margin:4px 0 8px 44px;padding:16px 18px}
${S} .ts4-num{font-size:2.75rem}
${S} .ts4-pay{padding-left:0}
${S} .ts4-next{width:100%}
${S} .ts4-dest{grid-template-columns:minmax(0,1fr)}
${S} .ts4-btn{min-height:64px;padding:0 20px}
}
@keyframes ts4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ts4-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@keyframes ts4-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:no-preference){
${S} .ts4-draw{transform:scaleX(0);transition:transform 1.2s cubic-bezier(.45,.05,.35,1)}
${S}[data-drawn] .ts4-draw{transform:none}
${S}[data-drawn] .ts4-node{animation:ts4-pop .3s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--k) * .3s)}
${S} .ts4-trav{transition:width .45s cubic-bezier(.2,.7,.2,1)}
${S} .ts4-panel:not([hidden]){animation:ts4-rise .45s cubic-bezier(.2,.7,.2,1) both}
${S} .ts4-spin{animation:ts4-spin .8s linear infinite}
}
@media (prefers-reduced-motion:no-preference) and (max-width:860px){
${S} .ts4-draw{transform:scaleY(0)}
${S}[data-drawn] .ts4-draw{transform:none}
}
`
pieces/content/three-secrets-4/specimen.tsx 20 lines
import __studioImageaea33190 from "../assets/72a4e36aefcbc500.webp";
import { ThreeSecrets4 } from "../three-secrets-4"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"]
type SpecimenState = "default" | "hover" | "active" | "disabled" | "error"
export default function ThreeSecrets4Specimen({ state = "default" }: { state?: SpecimenState }) {
const routeImage = slot("scene", __studioImageaea33190)
return (
<ThreeSecrets4
state={state}
routeImage={routeImage}
routeImageAlt="Illustrated suburban road with a service van parked at the curb"
errorMessage={defaults.sample.registration.error}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalThreeSecrets4 |
string |
|
emphasis OptionalThreeSecrets4 |
string |
|
lead OptionalThreeSecrets4 |
string |
|
routeImage OptionalThreeSecrets4 |
string |
|
routeImageAlt OptionalThreeSecrets4 |
string |
|
routeLabel OptionalThreeSecrets4 |
string |
|
startLabel OptionalThreeSecrets4 |
string |
|
startNote OptionalThreeSecrets4 |
string |
|
finishLabel OptionalThreeSecrets4 |
string |
|
finishNote OptionalThreeSecrets4 |
string |
|
stops OptionalThreeSecrets4 |
RouteStop[] |
|
stepLabel OptionalThreeSecrets4 |
string |
|
obstacleLead OptionalThreeSecrets4 |
string |
|
payoffLead OptionalThreeSecrets4 |
string |
|
nextLabel OptionalThreeSecrets4 |
string |
|
finishCueLabel OptionalThreeSecrets4 |
string |
|
destinationHeadline OptionalThreeSecrets4 |
string |
|
riskLead OptionalThreeSecrets4 |
string |
|
risk OptionalThreeSecrets4 |
string |
|
label OptionalThreeSecrets4 |
string |
|
note OptionalThreeSecrets4 |
string |
|
loadingLabel OptionalThreeSecrets4 |
string |
|
errorMessage OptionalThreeSecrets4 |
string |
|
href OptionalThreeSecrets4 |
string |
|
onAction OptionalThreeSecrets4 |
() => void | Promise<unknown> |
|
state OptionalThreeSecrets4 |
ThreeSecrets4State |
|
id OptionalThreeSecrets4 |
string |
|
className OptionalThreeSecrets4 |
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.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
72a4e36aefcbc500.webp
image/webp · 88.6 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB