Three Secrets 8
Three oversized accent-metal numerals drive three curiosity teasers down a dark stage and build to one register button.
Use it in a prompt
Use content/three-secrets-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/three-secrets-8.tsx. - Import it and pass your copy and images (Props tab):
import { ThreeSecrets8 } from "@/components/funneldna/content/three-secrets-8"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/three-secrets-8/component.tsx 474 lines
// layout: number-rail
// Three oversized accent-metal numerals drive three curiosity teasers down a dark stage and build to one register button.
'use client'
import * as React from 'react'
import { AlertCircle, Loader2, MonitorPlay } from 'lucide-react'
export type ThreeSecrets8State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type SecretReveal = {
/** Teaser headline: a question that opens the loop, never the answer. */
question: string
}
export type ThreeSecrets8Props = {
headline?: string
/** Phrase inside the headline set in the accent metal colour (matched case-insensitively). */
emphasis?: string
/** Supporting line under the headline. */
lead?: string
/** Three teasers: the vehicle, the internal and the external false belief. Only the first three render. */
secrets?: SecretReveal[]
/** Card label template. The {n} placeholder becomes the secret number. */
secretLabel?: string
/** Accessible name for the list of secrets. */
listLabel?: string
/** Button text. */
label?: string
/** One short reassurance line under the button. */
sublabel?: string
/** Button text while a returned promise is pending. */
loadingLabel?: string
/** Shown under the button in the error state or when onAction rejects. */
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>
/** Optional dark stage photo (slot: texture), blended tone-on-tone into the band under a scrim. */
textureImage?: string
state?: ThreeSecrets8State
id?: string
className?: string
}
const DEFAULT_SECRETS: SecretReveal[] = [
{ question: 'What belongs in your first funnel?' },
{ question: 'Where does compelling page copy begin?' },
{ question: 'What should you check before you launch?' },
]
export function ThreeSecrets8(props: ThreeSecrets8Props) {
const {
headline = 'Map out your first funnel',
emphasis = 'first funnel',
lead = 'Three secrets inside the Funnel Starter Workshop.',
secrets = DEFAULT_SECRETS,
secretLabel = 'Secret #{n}',
listLabel = 'Three secrets revealed in the workshop',
label = 'Yes! Save My Seat',
sublabel = 'Free workshop · Watch online',
loadingLabel = 'Saving your seat…',
errorMessage = 'We couldn’t complete your registration. Please try again.',
href,
onAction,
textureImage,
state = 'default',
id,
className,
} = props
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '')
const headingId = `ts8-h-${uid}`
const errId = `ts8-e-${uid}`
const [status, setStatus] = React.useState<'idle' | 'loading' | 'error'>('idle')
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
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
const rows = secrets.slice(0, 3)
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='ts8-spin' aria-hidden='true' />
<span className='ts8-btn-l'>{loadingLabel}</span>
</>
) : (
<span className='ts8-btn-l'>{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='ts8-btn' {...shared} href={inert ? undefined : href}>
{inner}
</a>
) : (
<button className='ts8-btn' {...shared} type='button' disabled={disabled}>
{inner}
</button>
)
return (
<section id={id} className={['cf-three-secrets-8', className].filter(Boolean).join(' ')} aria-labelledby={headingId}>
<style>{CSS}</style>
{textureImage ? (
<img className='ts8-tex' src={textureImage} alt='' width={1600} height={900} loading='lazy' decoding='async' />
) : null}
<div className='ts8-scrim' aria-hidden='true' />
<div className='ts8-wrap'>
<div className='ts8-side'>
<header className='ts8-head'>
<h2 className='ts8-h' id={headingId}>{withEmphasis(headline, emphasis)}</h2>
{lead ? <p className='ts8-lead'>{lead}</p> : null}
</header>
<div className='ts8-cta'>
{button}
{sublabel ? (
<p className='ts8-sub'>
<MonitorPlay aria-hidden='true' />
<span>{sublabel}</span>
</p>
) : null}
{view === 'error' ? (
<p className='ts8-err' id={errId} role='alert'>
<AlertCircle aria-hidden='true' />
<span>{errorMessage}</span>
</p>
) : null}
</div>
</div>
<ol className='ts8-rail' aria-label={listLabel}>
{rows.map((secret, i) => (
<li className='ts8-row' key={i} style={{ ['--i' as string]: i } as React.CSSProperties}>
<div className='ts8-numcol' aria-hidden='true'>
<span className='ts8-num'>{String(i + 1).padStart(2, '0')}</span>
</div>
<div className='ts8-card'>
<p className='ts8-tag'>
<span className='ts8-tag-n'>{fillNumber(secretLabel, i + 1)}</span>
</p>
<h3 className='ts8-q'>{secret.question}</h3>
</div>
</li>
))}
</ol>
</div>
</section>
)
}
export default ThreeSecrets8
/** Replaces every {n} placeholder in a label template with the given number, as text. */
function fillNumber(template: string, n: number): string {
return template.split('{n}').join(String(n))
}
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='ts8-em'>{text.slice(at, at + phrase.length)}</span>
{text.slice(at + phrase.length)}
</>
)
}
function isThenable(value: unknown): value is PromiseLike<unknown> {
return typeof value === 'object' && value !== null && typeof (value as PromiseLike<unknown>).then === 'function'
}
/*
* Theme notes:
* - The numeral / emphasis metal is the brand accent lifted toward the band ink (--ts8-gold, overridable
* per piece with --ts8-metal). It does not borrow --warning, which is a status hue, not decoration.
* - Every other colour is a base or role token, or an OKLCH recipe on one. No fixed hues.
* - All selectors are scoped under .cf-three-secrets-8; the scope adds equal specificity to every
* descendant rule, so the cascade order is unchanged.
*/
const CSS = `
.cf-three-secrets-8 {
--ts8-shadow: var(--shadow, oklch(0.22 0.03 256));
--ts8-gold: var(--ts8-metal, color-mix(in oklch, var(--accent, oklch(0.55 0.13 256)) 45%, var(--band-ink, oklch(1 0 0))));
--ts8-gold-hi: oklch(from var(--ts8-gold) calc(l + 0.1) calc(c * 0.7) h);
--ts8-gold-lo: oklch(from var(--ts8-gold) calc(l - 0.14) c h);
--ts8-soft-ink: color-mix(in oklch, var(--band-ink, oklch(1 0 0)) 84%, var(--band, oklch(0.27 0.067 256)));
--ts8-gap: clamp(1rem, 2.2vw, 1.5rem);
position: relative;
isolation: isolate;
overflow: hidden;
overflow: clip;
padding-block: clamp(3.5rem, 8vw, 7rem);
background: var(--band, oklch(0.27 0.067 256));
color: var(--band-ink, oklch(1 0 0));
font-family: var(--font-body, Arial, sans-serif);
}
.cf-three-secrets-8 *, .cf-three-secrets-8 *::before, .cf-three-secrets-8 *::after { box-sizing: border-box; }
.cf-three-secrets-8 :where(h2, h3, p, ol, li) { margin: 0; padding: 0; }
.cf-three-secrets-8 .ts8-tex {
position: absolute; inset: 0; z-index: -2;
width: 100%; height: 100%;
object-fit: cover; object-position: 72% 28%;
opacity: 0.4; mix-blend-mode: luminosity; filter: grayscale(1) contrast(1.05);
pointer-events: none;
}
.cf-three-secrets-8 .ts8-scrim {
position: absolute; inset: 0; z-index: -1;
background: oklch(from var(--band, oklch(0.27 0.067 256)) l c h / 0.55);
pointer-events: none;
}
.cf-three-secrets-8 .ts8-wrap {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
gap: clamp(2.5rem, 5.5vw, 5.5rem);
align-items: start;
width: 100%;
max-width: 76rem;
margin-inline: auto;
padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.cf-three-secrets-8 .ts8-side { position: sticky; top: clamp(1.5rem, 8vh, 4.5rem); align-self: start; min-width: 0; }
.cf-three-secrets-8 .ts8-head { min-width: 0; }
.cf-three-secrets-8 .ts8-h {
margin: 0 0 0.3em;
color: var(--band-ink, oklch(1 0 0));
font-family: var(--font-display, Arial, sans-serif);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
letter-spacing: var(--display-tracking, -0.03em);
font-size: clamp(2.5rem, 5.2vw, 4.75rem);
line-height: 1;
text-wrap: balance;
}
.cf-three-secrets-8 .ts8-em { color: var(--ts8-gold); }
.cf-three-secrets-8 .ts8-lead {
max-width: 32rem;
color: var(--ts8-soft-ink);
font-size: clamp(1.15rem, 1.7vw, 1.45rem);
font-weight: 500;
line-height: 1.4;
text-wrap: pretty;
}
.cf-three-secrets-8 .ts8-cta {
display: flex; flex-direction: column; align-items: flex-start;
margin-top: clamp(1.75rem, 3.2vw, 2.6rem);
min-width: 0;
}
.cf-three-secrets-8 .ts8-btn {
--ts8-b: var(--button-bg, var(--cta, oklch(0.576 0.209 29.5)));
--ts8-b2: var(--button-bg-2, var(--cta-2, oklch(0.506 0.206 29.5)));
position: relative;
display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
width: 100%; max-width: 27rem; min-height: 4.4rem;
margin: 0; padding: 1rem 1.6rem;
border: 1px solid oklch(from var(--ts8-b2) calc(l - 0.06) c h);
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(oklch(from var(--ts8-b) calc(l + 0.04) c h), var(--ts8-b2));
color: var(--button-ink, var(--cta-ink, oklch(1 0 0)));
font-family: var(--button-font, var(--font-display, Arial, sans-serif));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: clamp(1.2rem, 1.6vw, 1.45rem);
line-height: 1.15;
letter-spacing: -0.005em;
text-align: center;
text-decoration: none;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--ts8-b) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--ts8-b) calc(l - 0.16) c h), 0 2px 3px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.5), 0 8px 18px -6px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.6));
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.cf-three-secrets-8 .ts8-btn-l { text-wrap: balance; }
.cf-three-secrets-8 .ts8-btn:hover:not([data-view=disabled]):not([data-view=loading]),
.cf-three-secrets-8 .ts8-btn[data-force=hover] {
background: linear-gradient(oklch(from var(--ts8-b) calc(l - 0.02) c h), oklch(from var(--ts8-b2) calc(l - 0.05) c h));
transform: translateY(-1px);
}
.cf-three-secrets-8 .ts8-btn:active:not([data-view=disabled]):not([data-view=loading]),
.cf-three-secrets-8 .ts8-btn[data-force=active] {
background: linear-gradient(var(--ts8-b2), oklch(from var(--ts8-b2) calc(l - 0.05) c h));
transform: translateY(1px);
box-shadow: inset 0 2px 3px oklch(from var(--ts8-b) calc(l - 0.22) c h / 0.5), 0 1px 2px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.5);
}
.cf-three-secrets-8 .ts8-btn:focus-visible { outline: 3px solid var(--band-ink, oklch(1 0 0)); outline-offset: 3px; }
.cf-three-secrets-8 .ts8-btn[data-view=loading] { cursor: progress; }
.cf-three-secrets-8 .ts8-btn[data-view=disabled] {
border-color: color-mix(in oklch, var(--band-ink, oklch(1 0 0)) 26%, var(--band, oklch(0.27 0.067 256)));
background: color-mix(in oklch, var(--band-ink, oklch(1 0 0)) 16%, var(--band, oklch(0.27 0.067 256)));
color: color-mix(in oklch, var(--band-ink, oklch(1 0 0)) 74%, var(--band, oklch(0.27 0.067 256)));
text-shadow: none;
box-shadow: none;
transform: none;
cursor: not-allowed;
}
.cf-three-secrets-8 .ts8-spin { width: 1.25rem; height: 1.25rem; flex: none; }
.cf-three-secrets-8 .ts8-sub {
display: flex; align-items: center; gap: 0.55rem;
margin-top: 0.95rem;
color: var(--ts8-soft-ink);
font-size: 1rem; font-weight: 600; line-height: 1.35;
text-wrap: pretty;
}
.cf-three-secrets-8 .ts8-sub svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--ts8-gold); }
.cf-three-secrets-8 .ts8-err {
display: inline-flex; align-items: flex-start; gap: 0.5rem;
max-width: 27rem;
margin-top: 0.85rem;
padding: 0.65rem 0.9rem;
border-radius: calc(var(--radius, 12px) * 0.75);
background: var(--danger-soft, oklch(0.93 0.024 27));
color: var(--danger, oklch(0.5 0.17 27));
font-size: 1rem; font-weight: 700; line-height: 1.35;
text-wrap: pretty;
}
.cf-three-secrets-8 .ts8-err svg { width: 1.15rem; height: 1.15rem; flex: none; margin-top: 0.1rem; }
.cf-three-secrets-8 .ts8-rail { display: grid; min-width: 0; list-style: none; }
.cf-three-secrets-8 .ts8-row {
display: grid;
grid-template-columns: clamp(4.25rem, 8.5vw, 8rem) minmax(0, 1fr);
column-gap: clamp(0.75rem, 1.8vw, 1.4rem);
min-width: 0;
view-timeline: --ts8-row block;
}
.cf-three-secrets-8 .ts8-row:not(:last-child) { padding-bottom: var(--ts8-gap); }
.cf-three-secrets-8 .ts8-numcol { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cf-three-secrets-8 .ts8-row:not(:last-child) .ts8-numcol::after {
content: '';
flex: 1 1 auto;
width: 2px;
min-height: 1rem;
margin-top: 0.55rem;
margin-bottom: calc(0.5rem - var(--ts8-gap));
border-radius: 2px;
background: linear-gradient(var(--ts8-gold), oklch(from var(--ts8-gold) l c h / 0.25));
transform-origin: top;
}
.cf-three-secrets-8 .ts8-num {
display: block;
padding-top: 0.06em;
color: var(--ts8-gold);
font-family: var(--font-display, Arial, sans-serif);
font-weight: var(--display-weight, 800);
font-size: clamp(3.4rem, 7vw, 7rem);
font-variant-numeric: tabular-nums;
line-height: 0.84;
letter-spacing: -0.05em;
filter: drop-shadow(0 2px 1px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.55));
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
.cf-three-secrets-8 .ts8-num {
background-image: linear-gradient(172deg, var(--ts8-gold-hi) 0%, var(--ts8-gold) 34%, var(--ts8-gold-lo) 50%, var(--ts8-gold) 64%, var(--ts8-gold-hi) 100%);
background-size: 100% 220%;
background-position: 50% 0%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.cf-three-secrets-8 .ts8-row:hover .ts8-num { background-position: 50% 100%; }
}
.cf-three-secrets-8 .ts8-card {
position: relative;
min-width: 0;
padding: clamp(1.15rem, 2.2vw, 1.6rem) clamp(1.15rem, 2.4vw, 1.85rem);
border: 1px solid var(--card-border, color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 12%, transparent));
border-radius: var(--card-radius, var(--radius, 14px));
background: var(--card, oklch(1 0 0));
color: var(--ink, oklch(0.21 0.034 263));
box-shadow: var(--card-shadow, inset 0 0 0 1px color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 5%, transparent), 0 1px 2px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.45), 0 10px 22px -8px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.6));
}
.cf-three-secrets-8 .ts8-tag {
display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem;
margin: 0 0 0.75rem;
font-size: 0.875rem; font-weight: 800; line-height: 1.2;
letter-spacing: 0.11em; text-transform: uppercase;
}
.cf-three-secrets-8 .ts8-tag-n { color: var(--ink, oklch(0.21 0.034 263)); }
.cf-three-secrets-8 .ts8-q {
color: var(--ink, oklch(0.21 0.034 263));
font-family: var(--font-display, Arial, sans-serif);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: clamp(1.3rem, 2.05vw, 1.8rem);
line-height: 1.14;
letter-spacing: -0.015em;
text-wrap: balance;
}
@media (max-width: 860px) {
.cf-three-secrets-8 .ts8-wrap { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
.cf-three-secrets-8 .ts8-side { display: contents; }
.cf-three-secrets-8 .ts8-head { order: 1; }
.cf-three-secrets-8 .ts8-rail { order: 2; }
.cf-three-secrets-8 .ts8-cta { order: 3; margin-top: 0; }
.cf-three-secrets-8 .ts8-btn { max-width: none; }
}
@media (max-width: 480px) {
.cf-three-secrets-8 .ts8-row { grid-template-columns: 4rem minmax(0, 1fr); column-gap: 0.7rem; }
.cf-three-secrets-8 .ts8-card { padding: 1.1rem 1.1rem 1.2rem; }
.cf-three-secrets-8 .ts8-btn { padding-inline: 1.1rem; }
}
@media (prefers-reduced-motion: no-preference) {
.cf-three-secrets-8 .ts8-btn { transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease; }
.cf-three-secrets-8 .ts8-card {
transition: transform 0.25s ease, box-shadow 0.25s ease;
animation: ts8-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
animation-delay: calc(var(--i, 0) * 80ms);
}
.cf-three-secrets-8 .ts8-row:hover .ts8-card {
transform: translateY(-3px);
box-shadow: var(--card-shadow, inset 0 0 0 1px color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 5%, transparent), 0 2px 3px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.5), 0 16px 28px -10px oklch(from var(--ts8-shadow) calc(l - 0.08) c h / 0.7));
}
.cf-three-secrets-8 .ts8-num { transition: background-position 0.7s ease; }
.cf-three-secrets-8 .ts8-spin { animation: ts8-spin 0.8s linear infinite; }
}
@supports (animation-timeline: view()) {
@media (prefers-reduced-motion: no-preference) {
.cf-three-secrets-8 .ts8-row:not(:last-child) .ts8-numcol::after {
animation: ts8-draw linear both;
animation-timeline: --ts8-row;
animation-range: entry 30% cover 60%;
}
}
}
@keyframes ts8-in { from { opacity: 0.82; transform: translateY(8px); } }
@keyframes ts8-draw { from { transform: scaleY(0.1); } to { transform: scaleY(1); } }
@keyframes ts8-spin { to { transform: rotate(360deg); } }
`
pieces/content/three-secrets-8/specimen.tsx 22 lines
import __studioImage0a1fc79f from "../assets/6ad4d8860543c455.webp";
import { ThreeSecrets8, type ThreeSecrets8State } from '../three-secrets-8'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function ThreeSecrets8Specimen({ state = 'default' }: { state?: ThreeSecrets8State }) {
const reg = defaults.sample.registration
return (
<ThreeSecrets8
state={state}
headline={reg.headline}
emphasis='first funnel'
lead={`Three secrets inside the ${reg.name}.`}
label={reg.label}
sublabel={reg.sublabel}
errorMessage={reg.error}
textureImage={slot('texture', __studioImage0a1fc79f)}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalThreeSecrets8 |
string |
|
emphasis OptionalThreeSecrets8 |
string |
|
lead OptionalThreeSecrets8 |
string |
|
secrets OptionalThreeSecrets8 |
SecretReveal[] |
|
secretLabel OptionalThreeSecrets8 |
string |
|
listLabel OptionalThreeSecrets8 |
string |
|
label OptionalThreeSecrets8 |
string |
|
sublabel OptionalThreeSecrets8 |
string |
|
loadingLabel OptionalThreeSecrets8 |
string |
|
errorMessage OptionalThreeSecrets8 |
string |
|
href OptionalThreeSecrets8 |
string |
|
onAction OptionalThreeSecrets8 |
() => void | Promise<unknown> |
|
textureImage OptionalThreeSecrets8 |
string |
|
state OptionalThreeSecrets8 |
ThreeSecrets8State |
|
id OptionalThreeSecrets8 |
string |
|
className OptionalThreeSecrets8 |
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.
--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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
texture- A subtle background texture.
-
6ad4d8860543c455.webp
image/webp · 31.3 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB