Three Secrets 5
Three full-width secret panels open one curiosity loop each, while a sticky counter tracks the reader and skips them to the register panel.
Use it in a prompt
Use content/three-secrets-5 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-5.tsx. - Import it and pass your copy and images (Props tab):
import { ThreeSecrets5 } from "@/components/funneldna/content/three-secrets-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/three-secrets-5/component.tsx 557 lines
// layout: scroll-panels
// Three full-width secret panels open one curiosity loop each, while a sticky counter tracks the reader and skips them to the register panel.
'use client'
import * as React from 'react'
import { AlertCircle, Loader2, Lock, ShieldCheck, Ticket } from 'lucide-react'
import { FX_HOST, Glow } from '../fx/fx'
/** States the piece implements. Loading appears when onAction returns a pending promise. */
export type ThreeSecrets5State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type ScrollSecret = {
/** The curiosity line. It opens the loop and never gives the answer. */
line: React.ReactNode
/** Bold lead-in that starts the short paragraph under the line. */
lead?: string
/** Rest of the paragraph after the lead-in. */
body?: string
/** Short name for the recap chip in the register panel. */
tag?: string
/** Photo beside the line (slots scene, scene-2, scene-3). Without it the panel centres its copy. */
image?: string
/** Alt text for the photo; empty marks it decorative. */
imageAlt?: string
}
export type ThreeSecrets5Props = {
/** Block headline at the top of the first panel. */
headline?: string
/** Phrase inside the headline set in the accent colour (matched case-insensitively). */
emphasis?: string
/** Line under the headline; omit to hide. */
lead?: string
/** Up to three secrets, one panel each. Extra secrets are ignored. */
secrets?: ScrollSecret[]
/** Hidden prefix read before each line. The {n} placeholder becomes the secret number. */
secretLabel?: string
/** Sticky counter text. The {n} and {total} placeholders are replaced. */
counterLabel?: string
/** Line the counter reveals on hover and focus: the counter is a skip link to the register panel. */
counterSkip?: string
/** Counter text once the register panel is in view. */
counterRegister?: string
/** Line under counterRegister. */
counterRegisterNote?: string
/** Accessible name of the counter link. The {n} and {total} placeholders are replaced. */
counterAria?: string
/** Headline of the register panel. */
registerHeadline?: string
/** Accessible name of the recap chip list. */
recapLabel?: string
/** Bold risk reversal that leads into the button. */
riskLead?: string
/** Rest of the risk reversal line. */
riskBody?: string
/** Button text. */
label?: string
/** One short privacy or reassurance 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?: ThreeSecrets5State
/** Id on the root section; panel and register ids derive from it. */
id?: string
className?: string
}
export function ThreeSecrets5(props: ThreeSecrets5Props) {
const {
headline = 'Three secrets to turning one-time givers into monthly donors',
emphasis = 'monthly donors',
lead = 'All three are inside the free Monthly Donor Masterclass for small nonprofits.',
secrets = DEFAULT_SECRETS,
secretLabel = 'Secret {n}: ',
counterLabel = 'Secret {n} of {total}',
counterSkip = 'Skip to register',
counterRegister = 'Save your seat',
counterRegisterNote = 'Last step, it’s free',
counterAria = 'Secret {n} of {total}. Skip to registration',
registerHeadline = 'Get all three in the free Monthly Donor Masterclass',
recapLabel = 'The three secrets you’ll learn',
riskLead = 'Free to watch.',
riskBody = 'Watch on demand, on your own schedule, and leave anytime.',
label = 'Save My Free Seat',
note = 'We respect your inbox. Unsubscribe anytime.',
loadingLabel = 'Saving your seat…',
errorMessage = 'We couldn’t complete your registration. Please try again.',
href,
onAction,
state = 'default',
id,
className,
} = props
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '')
const base = id || `ts5-${uid}`
const headingId = `${base}-h`
const regId = `${base}-register`
const regHeadId = `${base}-register-h`
const errId = `${base}-err`
const rows = secrets.slice(0, 3)
const count = rows.length
const panels = React.useRef<Array<HTMLDivElement | null>>([])
const regRef = React.useRef<HTMLDivElement | null>(null)
const regHeadRef = React.useRef<HTMLHeadingElement | null>(null)
const alive = React.useRef(true)
const [step, setStep] = React.useState(0)
const [status, setStatus] = React.useState<'idle' | 'loading' | 'error'>('idle')
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
if (typeof IntersectionObserver === 'undefined') return
const reg = regRef.current
const nodes = [...panels.current.slice(0, count), reg].filter((node): node is HTMLDivElement => Boolean(node))
const track = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (entry.isIntersecting) setStep(Number((entry.target as HTMLElement).dataset.step) || 0)
}
},
{ rootMargin: '-45% 0px -45% 0px' },
)
const reveal = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (entry.isIntersecting) {
entry.target.setAttribute('data-seen', '')
reveal.unobserve(entry.target)
}
}
},
{ threshold: 0.15 },
)
nodes.forEach((node) => {
track.observe(node)
if (node !== reg) reveal.observe(node)
})
return () => {
track.disconnect()
reveal.disconnect()
}
}, [count])
const atReg = count > 0 && step >= count
const current = Math.min(step, Math.max(count - 1, 0)) + 1
function skip(event: React.MouseEvent<HTMLAnchorElement>) {
const target = regRef.current
if (!target) return
event.preventDefault()
const reduce = typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches
target.scrollIntoView({ behavior: reduce ? 'auto' : 'smooth', block: 'start' })
regHeadRef.current?.focus({ preventScroll: true })
}
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 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='ts5-spin' aria-hidden='true' strokeWidth={2.5} />
<span>{loadingLabel}</span>
</>
) : (
<span>{label}</span>
)
const shared = {
className: 'ts5-btn',
'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
{...shared}
href={inert ? undefined : href}
style={
{
'--ts5-b': 'var(--button-bg, var(--cta))',
'--ts5-b2': 'var(--button-bg-2, var(--cta-2))',
borderRadius: 'var(--button-radius, var(--radius, 12px))',
color: disabled ? 'var(--button-2-ink, var(--secondary-ink))' : 'var(--button-ink, var(--cta-ink))',
} as React.CSSProperties
}
>
{inner}
</a>
) : (
<button
{...shared}
type='button'
disabled={disabled}
style={
{
'--ts5-b': 'var(--button-bg, var(--cta))',
'--ts5-b2': 'var(--button-bg-2, var(--cta-2))',
borderRadius: 'var(--button-radius, var(--radius, 12px))',
color: inert && disabled ? 'var(--button-2-ink, var(--secondary-ink))' : 'var(--button-ink, var(--cta-ink))',
} as React.CSSProperties
}
>
{inner}
</button>
)
const tags = rows.filter((row) => row.tag)
return (
<section
id={id}
className={['cf-three-secrets-5', className].filter(Boolean).join(' ')}
aria-labelledby={headline ? headingId : regHeadId}
>
<style>{CSS}</style>
{count > 0 ? (
<div className='ts5-rail'>
<a
className='ts5-counter'
href={`#${regId}`}
data-step={atReg ? 'reg' : String(current)}
aria-label={atReg ? `${counterRegister}. ${counterRegisterNote}` : fill(counterAria, current, count)}
onClick={skip}
>
<span className='ts5-disc' aria-hidden='true' key={atReg ? 'reg' : current}>
{atReg ? <Ticket strokeWidth={2.5} /> : current}
</span>
<span className='ts5-ctext' aria-hidden='true'>
<span className='ts5-cmain'>{atReg ? counterRegister : fill(counterLabel, current, count)}</span>
<span className='ts5-bars'>
{rows.map((_, i) => (
<i key={i} data-on={atReg || i < current ? '' : undefined} />
))}
</span>
<span className='ts5-cskip'>
<span>{atReg ? counterRegisterNote : counterSkip}</span>
</span>
</span>
</a>
</div>
) : null}
{rows.map((secret, i) => (
<div
key={i}
ref={(node) => {
panels.current[i] = node
}}
id={`${base}-s${i + 1}`}
className='ts5-band ts5-panel'
data-step={i}
data-tone={TONES[i % TONES.length]}
data-flip={i % 2 === 1 ? '' : undefined}
data-noimg={secret.image ? undefined : ''}
>
<div className='ts5-inner'>
{i === 0 && (headline || lead) ? (
<header className='ts5-intro'>
{headline ? (
<h2 className='ts5-h' id={headingId}>
{withEmphasis(headline, emphasis)}
</h2>
) : null}
{lead ? <p className='ts5-lead'>{lead}</p> : null}
</header>
) : null}
<div className='ts5-grid'>
<div className='ts5-copy'>
<span className='ts5-num' aria-hidden='true'>
{String(i + 1).padStart(2, '0')}
</span>
<h3 className='ts5-line'>
<span className='ts5-sr'>{secretLabel.split('{n}').join(String(i + 1))}</span>
{secret.line}
</h3>
{secret.lead || secret.body ? (
<p className='ts5-body'>
{secret.lead ? <strong>{secret.lead}</strong> : null}
{secret.lead && secret.body ? ' ' : null}
{secret.body}
</p>
) : null}
</div>
{secret.image ? (
<figure className='ts5-photo'>
<img
src={secret.image}
alt={secret.imageAlt || ''}
width={1200}
height={900}
loading={i === 0 ? 'eager' : 'lazy'}
decoding='async'
/>
</figure>
) : null}
</div>
</div>
</div>
))}
<div ref={regRef} id={regId} className='ts5-band ts5-reg' data-step={count} data-tone='band' style={FX_HOST}>
<Glow />
<div className='ts5-inner'>
<h2 ref={regHeadRef} tabIndex={-1} className='ts5-reg-h' id={regHeadId}>
{registerHeadline}
</h2>
{tags.length ? (
<ul className='ts5-recap' aria-label={recapLabel}>
{rows.map((row, i) =>
row.tag ? (
<li className='ts5-chip' key={i}>
<span className='ts5-chip-n' aria-hidden='true'>{i + 1}</span>
<span>{row.tag}</span>
</li>
) : null,
)}
</ul>
) : null}
{riskLead || riskBody ? (
<p className='ts5-risk'>
<ShieldCheck aria-hidden='true' strokeWidth={2.5} />
{riskLead ? <strong>{riskLead}</strong> : null}
{riskLead && riskBody ? ' ' : null}
{riskBody}
</p>
) : null}
<div className='ts5-action'>
{button}
{view === 'error' ? (
<p className='ts5-err' id={errId} role='alert'>
<AlertCircle aria-hidden='true' strokeWidth={2.5} />
{errorMessage}
</p>
) : null}
</div>
{note ? (
<p className='ts5-note'>
<Lock aria-hidden='true' strokeWidth={2.5} />
{note}
</p>
) : null}
</div>
</div>
</section>
)
}
export default ThreeSecrets5
const DEFAULT_SECRETS: ScrollSecret[] = [
{
line: 'The one small ask that turns a single gift into a monthly habit',
lead: 'It isn’t a bigger appeal.',
body: 'It’s a smaller, clearer one, and you’ll hear the exact wording to use in your next email.',
tag: 'The monthly ask',
},
{
line: 'Why you don’t have to love asking for money to grow monthly giving',
lead: 'No sales script needed.',
body: 'See the quiet invitation small teams use, so supporters feel welcomed, never cornered.',
tag: 'Asking without pushing',
},
{
line: 'What to send right after the first gift so new donors stay',
lead: 'The thank-you is only the start.',
body: 'Learn the simple follow-up that makes giving every month feel like belonging.',
tag: 'The first follow-up',
},
]
const TONES = ['light', 'block', 'tint'] as const
function fill(template: string, n: number, total: number) {
return template.split('{n}').join(String(n)).split('{total}').join(String(total))
}
function withEmphasis(text: string, phrase?: string): React.ReactNode {
if (!phrase) return keepHyphens(text, 'a')
const at = text.toLowerCase().indexOf(phrase.toLowerCase())
if (at < 0) return keepHyphens(text, 'a')
return (
<>
{keepHyphens(text.slice(0, at), 'b')}
<span className='ts5-em'>{keepHyphens(text.slice(at, at + phrase.length), 'm')}</span>
{keepHyphens(text.slice(at + phrase.length), 'c')}
</>
)
}
/** Keeps hyphenated words ("one-time") whole so a phone headline never breaks them across lines. */
function keepHyphens(text: string, key: string): React.ReactNode {
const parts = text.split(/(\S+-\S+)/)
if (parts.length === 1) return text
return parts.map((part, i) =>
i % 2 ? (
<span className='ts5-nobr' key={`${key}${i}`}>
{part}
</span>
) : (
part
),
)
}
function isThenable(value: unknown): value is PromiseLike<unknown> {
return Boolean(value) && typeof (value as PromiseLike<unknown>).then === 'function'
}
const R = '.cf-three-secrets-5'
const CSS = `
${R}{position:relative;overflow-x:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body)}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} :where(h2,h3,p,ul,li,figure){margin:0;padding:0}
${R} .ts5-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
${R} .ts5-rail{position:sticky;top:clamp(12px,2vw,24px);z-index:20;display:flex;height:0;justify-content:flex-end;padding-inline:clamp(16px,2.5vw,32px);pointer-events:none}
${R} .ts5-counter{display:inline-flex;min-height:56px;align-items:center;gap:12px;padding:8px 20px 8px 8px;border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:999px;background:var(--card);color:var(--ink);box-shadow:var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32));text-decoration:none;white-space:nowrap;pointer-events:auto;transition:transform .16s ease,box-shadow .16s ease}
${R} .ts5-counter:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
${R} .ts5-disc{display:grid;flex:none;width:40px;height:40px;place-items:center;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-family:var(--font-display);font-size:1.125rem;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}
${R} .ts5-disc svg{width:20px;height:20px}
${R} .ts5-ctext{display:grid;text-align:left}
${R} .ts5-cmain{font-size:.9375rem;font-weight:800;line-height:1.2}
${R} .ts5-bars{display:flex;gap:4px;margin-top:6px}
${R} .ts5-bars i{display:block;width:18px;height:4px;border-radius:999px;background:oklch(from var(--ink) l c h / .16);transition:background .16s ease}
${R} .ts5-bars i[data-on]{background:var(--accent-fill,var(--accent))}
${R} .ts5-cskip{display:grid;grid-template-rows:0fr;transition:grid-template-rows .16s ease}
${R} .ts5-cskip>span{min-height:0;overflow:hidden;padding-top:4px;color:var(--muted);font-size:.875rem;font-weight:700;line-height:1.2}
${R} .ts5-counter:hover .ts5-cskip,${R} .ts5-counter:focus-visible .ts5-cskip,${R} .ts5-counter[data-step=reg] .ts5-cskip{grid-template-rows:1fr}
${R} .ts5-band{position:relative;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
${R} .ts5-band[data-tone=light]{background:var(--surface);color:var(--ink);--ts5-slab:color-mix(in oklch,var(--ink) 6%,var(--surface));--ts5-num:var(--accent)}
${R} .ts5-band[data-tone=block]{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));--ts5-slab:oklch(from var(--accent-fill-ink,var(--card)) l c h / .16);--ts5-num:var(--accent-fill-ink,var(--card))}
${R} .ts5-band[data-tone=tint]{background:color-mix(in oklch,var(--ink) 4%,var(--surface));color:var(--ink);--ts5-slab:color-mix(in oklch,var(--ink) 10%,var(--surface));--ts5-num:var(--accent)}
${R} .ts5-band[data-tone=band]{background:var(--band);color:var(--band-ink)}
${R} .ts5-inner{position:relative;z-index:1;max-width:1120px;margin-inline:auto}
${R} .ts5-intro{max-width:46rem;margin:0 auto clamp(48px,6vw,80px);text-align:center}
${R} .ts5-h,${R} .ts5-line,${R} .ts5-reg-h{font-family:var(--font-display);font-size:clamp(2rem,3.6vw,3.25rem);font-weight:var(--display-weight,800);line-height:1.06;letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);text-wrap:balance}
${R} .ts5-line{font-size:clamp(1.75rem,3vw,2.625rem);line-height:1.08}
${R} .ts5-em{color:var(--accent)}
${R} .ts5-nobr{white-space:nowrap}
${R} .ts5-lead{margin-top:16px;color:var(--muted);font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;text-wrap:pretty}
${R} .ts5-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);align-items:start;gap:clamp(32px,5vw,72px)}
${R} .ts5-panel[data-flip] .ts5-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,1fr)}
${R} .ts5-panel[data-flip] .ts5-copy{order:2}
${R} .ts5-panel[data-noimg] .ts5-grid{grid-template-columns:minmax(0,46rem);justify-content:center;text-align:center}
${R} .ts5-copy{padding-top:clamp(0px,2.4vw,32px)}
${R} .ts5-num{display:block;margin-bottom:16px;color:var(--ts5-num);font-family:var(--font-display);font-size:clamp(2.5rem,4.2vw,3.75rem);font-weight:var(--display-weight,800);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
${R} .ts5-body{max-width:34rem;margin-top:16px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:500;line-height:1.55;text-wrap:pretty}
${R} .ts5-panel[data-noimg] .ts5-body{margin-inline:auto}
${R} .ts5-body strong{font-weight:800}
${R} .ts5-photo{position:relative}
${R} .ts5-photo::before{position:absolute;inset:24px -24px -24px 24px;border-radius:12px;background:var(--ts5-slab);content:''}
${R} .ts5-panel[data-flip] .ts5-photo::before{inset:24px 24px -24px -24px}
${R} .ts5-photo img{position:relative;display:block;width:100%;height:auto;aspect-ratio:4/3;border-radius:12px;object-fit:cover;object-position:50% 35%}
${R} .ts5-reg .ts5-inner{max-width:46rem;text-align:center}
${R} .ts5-reg-h{color:var(--band-ink)}
${R} .ts5-reg-h:focus{outline:none}
${R} .ts5-recap{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:24px;list-style:none}
${R} .ts5-chip{display:inline-flex;min-height:32px;align-items:center;gap:8px;padding:4px 14px 4px 4px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.2}
${R} .ts5-chip-n{display:grid;flex:none;width:24px;height:24px;place-items:center;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-variant-numeric:tabular-nums}
${R} .ts5-risk{max-width:40rem;margin:32px auto 0;color:var(--band-ink);font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;text-wrap:balance}
${R} .ts5-risk strong{font-weight:800}
${R} .ts5-risk svg,${R} .ts5-err svg{display:inline-block;width:20px;height:20px;margin-inline-end:.4em;vertical-align:-.2em}
${R} .ts5-action{max-width:30rem;margin:32px auto 0}
${R} .ts5-btn{--ts5-b:var(--button-bg,var(--cta));--ts5-b2:var(--button-bg-2,var(--cta-2));--ts5-sh:var(--shadow,oklch(.22 .03 260));display:flex;width:100%;min-height:72px;align-items:center;justify-content:center;gap:10px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--ts5-b) calc(l + .04) c h),oklch(from var(--ts5-b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-size:clamp(1.125rem,1.55vw,1.375rem);font-weight:var(--button-weight,800);line-height:1.15;text-align:center;text-decoration:none;text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--ts5-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--ts5-b) calc(l - .16) c h),0 1px 2px oklch(from var(--ts5-sh) l c h / .3),0 8px 16px -6px oklch(from var(--ts5-sh) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
${R} .ts5-btn>span{min-width:0}
${R} .ts5-btn:hover:not(:disabled):not([aria-disabled=true]),${R} .ts5-btn[data-force=hover]{background:linear-gradient(oklch(from var(--ts5-b) calc(l - .01) c h),oklch(from var(--ts5-b2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--ts5-b) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--ts5-b) calc(l - .18) c h),0 1px 2px oklch(from var(--ts5-sh) l c h / .32),0 12px 20px -6px oklch(from var(--ts5-sh) l c h / .5)}
${R} .ts5-btn:active:not(:disabled):not([aria-disabled=true]),${R} .ts5-btn[data-force=active]{background:linear-gradient(oklch(from var(--ts5-b) calc(l - .05) c h),oklch(from var(--ts5-b2) calc(l - .09) c h));box-shadow:inset 0 2px 4px oklch(from var(--ts5-b) calc(l - .22) c h / .5),inset 0 -2px 0 oklch(from var(--ts5-b) calc(l - .16) c h),0 1px 2px oklch(from var(--ts5-sh) l c h / .3)}
${R} .ts5-btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
${R} .ts5-btn[data-view=disabled]{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));text-shadow:none;cursor:not-allowed}
${R} .ts5-btn[data-view=loading]{cursor:progress}
${R} .ts5-spin{width:20px;height:20px;flex:none}
${R} .ts5-err{margin-top:16px;padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:700;line-height:1.4;text-wrap:pretty}
${R} .ts5-note{margin-top:16px;color:var(--band-ink);font-size:.9375rem;font-weight:500;line-height:1.4;text-wrap:pretty}
${R} .ts5-note svg{display:inline-block;width:16px;height:16px;margin-inline-end:.4em;vertical-align:-.15em}
@media (prefers-reduced-motion:no-preference){
${R} .ts5-counter:hover{transform:translateY(-1px)}
${R} .ts5-btn:hover:not(:disabled):not([aria-disabled=true]),${R} .ts5-btn[data-force=hover]{transform:translateY(-1px)}
${R} .ts5-btn:active:not(:disabled):not([aria-disabled=true]),${R} .ts5-btn[data-force=active]{transform:translateY(1px)}
${R} .ts5-panel[data-seen] .ts5-copy{animation:ts5-rise .45s cubic-bezier(.2,.7,.2,1) both}
${R} .ts5-panel[data-seen] .ts5-photo{animation:ts5-rise .45s cubic-bezier(.2,.7,.2,1) .07s both}
${R} .ts5-disc{animation:ts5-pop .3s ease both}
${R} .ts5-spin{animation:ts5-spin .8s linear infinite}
}
@media (prefers-reduced-motion:reduce){
${R} .ts5-counter,${R} .ts5-btn,${R} .ts5-cskip,${R} .ts5-bars i{transition:none}
}
@keyframes ts5-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ts5-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@keyframes ts5-spin{to{transform:rotate(360deg)}}
@media (max-width:760px){
${R} .ts5-rail{display:none}
${R} .ts5-grid,${R} .ts5-panel[data-flip] .ts5-grid{grid-template-columns:minmax(0,1fr);gap:24px}
${R} .ts5-panel .ts5-copy{order:2;padding-top:0}
${R} .ts5-photo{order:1}
${R} .ts5-photo::before{display:none}
${R} .ts5-body{max-width:none}
${R} .ts5-intro{margin-bottom:40px}
${R} .ts5-action{max-width:none}
}
`
pieces/content/three-secrets-5/specimen.tsx 57 lines
import __studioImage5a26b392 from "../assets/96c429f7becf6e24.webp";
import __studioImage19878e59 from "../assets/0d3fd4886ea67a92.webp";
import __studioImage16215680 from "../assets/ec343a3ba1cd4e0a.webp";
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { ThreeSecrets5, type ThreeSecrets5State } from '../three-secrets-5'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
const deskPhoto = __studioImage5a26b392
const pantryPhoto = __studioImage19878e59
const updatePhoto = __studioImage16215680
export default function ThreeSecrets5Specimen({ state = 'default' }: { state?: ThreeSecrets5State }) {
const registration = defaults.sample.registration
return (
<ThreeSecrets5
state={state}
headline='Three secrets to turning one-time givers into monthly donors'
emphasis='monthly donors'
lead='All three are inside the free Monthly Donor Masterclass for small nonprofits.'
secrets={[
{
line: 'The one small ask that turns a single gift into a monthly habit',
lead: 'It isn’t a bigger appeal.',
body: 'It’s a smaller, clearer one, and you’ll hear the exact wording to use in your next email.',
tag: 'The monthly ask',
image: slot('scene', deskPhoto),
imageAlt: 'A nonprofit director writing a thank-you card at her desk',
},
{
line: 'Why you don’t have to love asking for money to grow monthly giving',
lead: 'No sales script needed.',
body: 'See the quiet invitation small teams use, so supporters feel welcomed, never cornered.',
tag: 'Asking without pushing',
image: slot('scene-2', pantryPhoto),
imageAlt: 'Volunteers handing a box of groceries to a neighbour at a food pantry',
},
{
line: 'What to send right after the first gift so new donors stay',
lead: 'The thank-you is only the start.',
body: 'Learn the simple follow-up that makes giving every month feel like belonging.',
tag: 'The first follow-up',
image: slot('scene-3', updatePhoto),
imageAlt: 'A supporter smiling as she reads an update on her phone at breakfast',
},
]}
registerHeadline='Get all three in the free Monthly Donor Masterclass'
riskLead='Free to watch.'
riskBody='Watch on demand, on your own schedule, and leave anytime.'
label='Save My Free Seat'
note={registration.privacy}
errorMessage={registration.error}
onAction={() => undefined}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalThreeSecrets5 |
string |
|
emphasis OptionalThreeSecrets5 |
string |
|
lead OptionalThreeSecrets5 |
string |
|
secrets OptionalThreeSecrets5 |
ScrollSecret[] |
|
secretLabel OptionalThreeSecrets5 |
string |
|
counterLabel OptionalThreeSecrets5 |
string |
|
counterSkip OptionalThreeSecrets5 |
string |
|
counterRegister OptionalThreeSecrets5 |
string |
|
counterRegisterNote OptionalThreeSecrets5 |
string |
|
counterAria OptionalThreeSecrets5 |
string |
|
registerHeadline OptionalThreeSecrets5 |
string |
|
recapLabel OptionalThreeSecrets5 |
string |
|
riskLead OptionalThreeSecrets5 |
string |
|
riskBody OptionalThreeSecrets5 |
string |
|
label OptionalThreeSecrets5 |
string |
|
note OptionalThreeSecrets5 |
string |
|
loadingLabel OptionalThreeSecrets5 |
string |
|
errorMessage OptionalThreeSecrets5 |
string |
|
href OptionalThreeSecrets5 |
string |
|
onAction OptionalThreeSecrets5 |
() => void | Promise<unknown> |
|
state OptionalThreeSecrets5 |
ThreeSecrets5State |
|
id OptionalThreeSecrets5 |
string |
|
className OptionalThreeSecrets5 |
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-ink--button-2-shadow- Secondary button.
--card-border- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
scene-2- An image this piece places.
scene-3- An image this piece places.
-
0d3fd4886ea67a92.webp
image/webp · 77.8 KB
-
96c429f7becf6e24.webp
image/webp · 60.3 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
ec343a3ba1cd4e0a.webp
image/webp · 62.3 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB