Three Secrets 9
Three teaser cards break over a real workshop photo, opening three curiosity loops that build straight into the register button.
Use it in a prompt
Use content/three-secrets-9 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-9.tsx. - Import it and pass your copy and images (Props tab):
import { ThreeSecrets9 } from "@/components/funneldna/content/three-secrets-9"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/three-secrets-9/component.tsx 290 lines
// layout: photo-overlap-card
// Three teaser cards break over a real workshop photo, opening three curiosity loops that build straight into the register button.
"use client"
import * as React from "react"
import { AlertCircle, Loader2 } from "lucide-react"
export type ThreeSecrets9State = "default" | "hover" | "active" | "disabled" | "error"
export type SecretTease = {
/** Teaser headline: opens the loop, never gives the answer. */
title: string
}
export type ThreeSecrets9Props = {
headline?: string
/** Phrase inside the headline that gets one marker stroke. */
emphasis?: string
lead?: string
/** Three teasers: the vehicle, the internal and the external false belief. Only the first three render. */
secrets?: SecretTease[]
/** Card label template. The {n} placeholder becomes the secret number ("Secret #{n}" → "Secret #1"). */
secretLabel?: string
/** Main action text on the button. */
label?: string
/** Benefit line inside the button, under the action. */
sublabel?: 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>
/** Photo the cards break over (slot "scene"). Without it the band drops the photo. */
sceneImage?: string
/** Alt text for the scene photo; empty marks it decorative. */
sceneAlt?: string
/** Forces a visual state for previews; "error" shows errorMessage, "disabled" blocks the action. */
state?: ThreeSecrets9State
/** Id on the root section, e.g. as an anchor target. */
id?: string
className?: string
}
export function ThreeSecrets9(props: ThreeSecrets9Props) {
const {
headline = "Map out your first funnel",
emphasis = "first funnel",
lead = "Three secrets inside the free workshop. Walk through your offer, page copy and next steps.",
secrets = DEFAULT_SECRETS,
secretLabel = "Secret #{n}",
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,
sceneImage,
sceneAlt = "",
state = "default",
id,
className,
} = props
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "")
const headingId = `ts9-h-${uid}`
const errId = `ts9-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 cards = secrets.slice(0, 3)
function handleClick(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 ? (
<span className="ts9-btn-load">
<Loader2 className="ts9-spin" aria-hidden="true" />
<span>{loadingLabel}</span>
</span>
) : (
<>
<span className="ts9-btn-l">{label}</span>
{sublabel ? <span className="ts9-btn-s">{sublabel}</span> : null}
</>
)
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: handleClick,
}
const button = href ? (
<a {...shared} className="ts9-btn" href={inert ? undefined : href}>
{inner}
</a>
) : (
<button {...shared} className="ts9-btn" type="button" disabled={disabled}>
{inner}
</button>
)
return (
<section
id={id}
className={["cf-three-secrets-9", className].filter(Boolean).join(" ")}
aria-labelledby={headingId}
data-noimg={sceneImage ? undefined : ""}
>
<style>{CSS}</style>
<div className="ts9-wrap ts9-top">
<div className="ts9-intro">
<h2 className="ts9-h" id={headingId}>{withEmphasis(headline, emphasis)}</h2>
{lead ? <p className="ts9-lead">{lead}</p> : null}
</div>
{sceneImage ? (
<figure className="ts9-photo">
<img src={sceneImage} alt={sceneAlt} width={1600} height={1067} loading="lazy" decoding="async" />
</figure>
) : null}
</div>
<div className="ts9-lower">
<div className="ts9-wrap">
<ol className="ts9-cards">
{cards.map((secret, i) => (
<li className="ts9-card" key={i} style={{ "--i": i } as React.CSSProperties}>
<p className="ts9-tag">
<span className="ts9-tag-n">{fillNumber(secretLabel, i + 1)}</span>
</p>
<h3 className="ts9-q">{secret.title}</h3>
</li>
))}
</ol>
<div className="ts9-cta">
<div className="ts9-btn-row">
{button}
</div>
{view === "error" ? (
<p className="ts9-err" id={errId} role="alert">
<AlertCircle aria-hidden="true" />
<span>{errorMessage}</span>
</p>
) : null}
</div>
</div>
</div>
</section>
)
}
export default ThreeSecrets9
const DEFAULT_SECRETS: SecretTease[] = [
{ title: "Which pages your first funnel really needs (and which to skip)" },
{ title: "How to write page copy when you don’t think you’re a writer" },
{ title: "What to check so nothing breaks on launch day" },
]
function isThenable(value: unknown): value is PromiseLike<unknown> {
return !!value && typeof (value as PromiseLike<unknown>).then === "function"
}
/** Replaces every {n} placeholder in a label template with the number. */
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="ts9-mark">{text.slice(at, at + phrase.length)}</span>
{text.slice(at + phrase.length)}
</>
)
}
// Theme notes: every colour reads a contract token (hex only as last var() fallback).
// Documented exception: the marker default #fae37c (contract default for --marker).
// Shadow fallbacks are dark recipes on --shadow (via --ts9-shadow), never a light token.
const CSS = `
.cf-three-secrets-9{--ts9-lap:clamp(4.5rem,7.5vw,7rem);--ts9-radius:var(--card-radius,var(--radius,0.875rem));--ts9-marker:color-mix(in oklch,var(--marker,#fae37c) 80%,transparent);--ts9-floor:color-mix(in oklch,var(--ink,#101828) 4%,var(--surface,#ffffff));--ts9-shadow:var(--shadow,oklch(0.22 0.03 260));position:relative;isolation:isolate;overflow-x:clip;background:var(--surface,#ffffff);color:var(--ink,#101828);font-family:var(--font-body,system-ui,sans-serif);padding-top:clamp(2.75rem,6vw,5.5rem)}
.cf-three-secrets-9[data-noimg]{--ts9-lap:0rem}
.cf-three-secrets-9 *,.cf-three-secrets-9 *::before,.cf-three-secrets-9 *::after{box-sizing:border-box}
.cf-three-secrets-9 :where(h2,h3,p,ol,figure){margin:0}
.cf-three-secrets-9 .ts9-wrap{width:min(100%,76rem);margin-inline:auto;padding-inline:clamp(1.25rem,4vw,2.5rem)}
.cf-three-secrets-9 .ts9-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:clamp(2rem,4vw,3.5rem);align-items:stretch}
.cf-three-secrets-9[data-noimg] .ts9-top{grid-template-columns:minmax(0,1fr)}
.cf-three-secrets-9 .ts9-intro{padding-top:clamp(0rem,1.5vw,1.5rem);padding-bottom:calc(var(--ts9-lap) + 2.5rem)}
.cf-three-secrets-9 .ts9-h{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.035em);font-size:clamp(2.5rem,1.4rem + 3.5vw,4.75rem);line-height:1.02;color:var(--ink,#101828);text-wrap:balance}
.cf-three-secrets-9 .ts9-mark{padding-inline:.06em;margin-inline:-.06em;background-image:linear-gradient(100deg,transparent .2em,var(--ts9-marker) .2em,var(--ts9-marker) calc(100% - .14em),transparent calc(100% - .14em));background-repeat:no-repeat;background-size:100% .44em;background-position:0 86%;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-three-secrets-9 .ts9-lead{margin-top:clamp(1.1rem,1.6vw,1.5rem);max-width:34rem;font-size:clamp(1.125rem,1rem + .45vw,1.375rem);font-weight:500;line-height:1.45;color:var(--ink,#101828);text-wrap:pretty}
.cf-three-secrets-9 .ts9-photo{position:relative;min-height:clamp(22rem,34vw,32rem);overflow:hidden;border-radius:calc(var(--ts9-radius) * 1.35);background:var(--secondary,oklch(0.93 0.015 263));box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--ts9-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--ts9-shadow) l c h / .2))}
.cf-three-secrets-9 .ts9-photo img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:50% 42%}
.cf-three-secrets-9 .ts9-photo::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,oklch(from var(--band,#1b2a4a) l c h / .4),oklch(from var(--band,#1b2a4a) l c h / 0) 48%);pointer-events:none}
.cf-three-secrets-9 .ts9-lower{display:flow-root;background:var(--ts9-floor);padding-bottom:clamp(3rem,6vw,5rem)}
.cf-three-secrets-9[data-noimg] .ts9-lower{padding-top:clamp(2rem,4vw,3rem)}
.cf-three-secrets-9 .ts9-cards{position:relative;z-index:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(1rem,1.8vw,1.5rem);margin-top:calc(-1 * var(--ts9-lap));padding:0;list-style:none}
.cf-three-secrets-9 .ts9-card{position:relative;display:flex;flex-direction:column;gap:.875rem;min-height:11rem;padding:clamp(1.25rem,2vw,1.75rem);background:var(--card,#ffffff);color:var(--ink,#101828);border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / .12));border-radius:var(--ts9-radius);box-shadow:inset 0 1px 0 oklch(from var(--card,#ffffff) calc(l + 0.04) c h / .6),var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--ts9-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--ts9-shadow) l c h / .2)));transition:transform .22s cubic-bezier(.2,.7,.2,1),box-shadow .22s ease}
.cf-three-secrets-9 .ts9-tag{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:.55rem;row-gap:.15rem;font-size:.875rem;font-weight:800;letter-spacing:.12em;line-height:1.3;text-transform:uppercase}
.cf-three-secrets-9 .ts9-tag-n{color:var(--accent,#2563eb)}
.cf-three-secrets-9 .ts9-q{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.375rem,1rem + 1vw,1.75rem);line-height:1.14;letter-spacing:-.015em;color:var(--ink,#101828);text-wrap:balance}
.cf-three-secrets-9 .ts9-cta{display:grid;justify-items:center;gap:.875rem;margin-top:clamp(2.25rem,4vw,3.25rem);text-align:center}
.cf-three-secrets-9 .ts9-btn-row{position:relative;width:min(100%,30rem)}
.cf-three-secrets-9 .ts9-btn{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.3rem;width:100%;min-height:4.75rem;margin:0;padding:.95rem 1.5rem 1.1rem;font:inherit;font-family:var(--button-font,var(--font-display,inherit));border:1px solid oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l - 0.12) c h);border-radius:var(--button-radius,var(--radius,.75rem));background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l + 0.02) c h),var(--button-bg-2,var(--cta-2,var(--cta,#b42318))));color:var(--button-ink,var(--cta-ink,#ffffff));text-transform:var(--button-case,none);text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;appearance:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l + 0.14) c h / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--ts9-shadow) l c h / .32),0 6px 14px -4px oklch(from var(--ts9-shadow) l c h / .42));transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.cf-three-secrets-9 .ts9-btn-l{font-size:clamp(1.25rem,1rem + 1vw,1.5rem);font-weight:var(--button-weight,800);line-height:1.1;letter-spacing:-.01em;text-wrap:balance}
.cf-three-secrets-9 .ts9-btn-s{font-family:var(--font-body,inherit);font-size:.9375rem;font-weight:600;line-height:1.25;text-transform:none;text-wrap:pretty}
.cf-three-secrets-9 .ts9-btn-load{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;font-size:1.25rem;font-weight:var(--button-weight,800);line-height:1.1}
.cf-three-secrets-9 .ts9-spin{flex:none;width:1.25rem;height:1.25rem}
.cf-three-secrets-9 .ts9-btn:is(:hover,[data-force="hover"]):not([data-view="disabled"]):not([aria-busy="true"]){background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l - 0.03) c h),oklch(from var(--button-bg-2,var(--cta-2,var(--cta,#b42318))) calc(l - 0.05) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l + 0.12) c h / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l - 0.2) c h),0 2px 3px oklch(from var(--ts9-shadow) l c h / .34),0 9px 18px -5px oklch(from var(--ts9-shadow) l c h / .46)}
.cf-three-secrets-9 .ts9-btn:is(:active,[data-force="active"]):not([data-view="disabled"]):not([aria-busy="true"]){background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l - 0.08) c h),oklch(from var(--button-bg-2,var(--cta-2,var(--cta,#b42318))) calc(l - 0.08) c h));transform:translateY(1px);box-shadow:inset 0 2px 3px oklch(from var(--ts9-shadow) l c h / .3),inset 0 -1px 0 oklch(from var(--button-bg,var(--cta,#d92d20)) calc(l - 0.18) c h),0 1px 2px oklch(from var(--ts9-shadow) l c h / .3)}
.cf-three-secrets-9 .ts9-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:3px}
.cf-three-secrets-9 .ts9-btn[aria-busy="true"]{cursor:progress}
.cf-three-secrets-9 .ts9-btn[data-view="disabled"]{background:var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263)));color:var(--button-2-ink,var(--secondary-ink,#101828));border-color:oklch(from var(--ink,#101828) l c h / .14);text-shadow:none;box-shadow:var(--button-2-shadow, var(--shadow-sm));cursor:not-allowed;transform:none}
.cf-three-secrets-9 .ts9-err{display:flex;align-items:flex-start;gap:.55rem;width:min(100%,30rem);padding:.7rem .9rem;border-radius:calc(var(--radius,.75rem) * .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:600;line-height:1.4;text-align:left;text-wrap:pretty}
.cf-three-secrets-9 .ts9-err svg{flex:none;width:1.15rem;height:1.15rem;margin-top:.12rem}
@media (prefers-reduced-motion:no-preference){
.cf-three-secrets-9 .ts9-card{animation:ts9-rise .5s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:calc(var(--i,0) * 80ms + 60ms)}
.cf-three-secrets-9 .ts9-photo img{animation:ts9-settle 1.6s cubic-bezier(.2,.7,.2,1) backwards}
.cf-three-secrets-9 .ts9-spin{animation:ts9-spin .9s linear infinite}
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
.cf-three-secrets-9 .ts9-card:hover{transform:translateY(-4px);box-shadow:inset 0 1px 0 oklch(from var(--card,#ffffff) calc(l + 0.04) c h / .6),var(--shadow-lg,0 2px 4px oklch(from var(--ts9-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--ts9-shadow) l c h / .32))}
}
@media (prefers-reduced-motion:reduce){
.cf-three-secrets-9 .ts9-btn,.cf-three-secrets-9 .ts9-card{transition:none}
.cf-three-secrets-9 .ts9-btn:is(:hover,:active,[data-force]){transform:none}
}
@keyframes ts9-rise{from{opacity:.82;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes ts9-settle{from{transform:scale(1.06)}to{transform:scale(1)}}
@keyframes ts9-spin{to{transform:rotate(360deg)}}
@media (max-width:860px){
.cf-three-secrets-9{--ts9-lap:3.25rem}
.cf-three-secrets-9 .ts9-top{grid-template-columns:minmax(0,1fr);gap:1.75rem}
.cf-three-secrets-9 .ts9-intro{padding:0}
.cf-three-secrets-9 .ts9-photo{min-height:0;aspect-ratio:4/3}
.cf-three-secrets-9 .ts9-cards{grid-template-columns:minmax(0,1fr);padding-inline:.75rem}
.cf-three-secrets-9 .ts9-card{min-height:0}
}
@media (max-width:480px){
.cf-three-secrets-9 .ts9-cards{padding-inline:.5rem}
.cf-three-secrets-9 .ts9-btn{padding-inline:1rem}
}
`
pieces/content/three-secrets-9/specimen.tsx 31 lines
import __studioImage3d56504c from "../assets/871e4895ecac10d9.webp";
import * as React from "react"
import { ThreeSecrets9, type ThreeSecrets9State } from "../three-secrets-9"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states: ThreeSecrets9State[] = ["default", "hover", "active", "disabled", "error"]
const reg = defaults.sample.registration
export default function ThreeSecrets9Specimen({ state = "default" }: { state?: ThreeSecrets9State }) {
return (
<ThreeSecrets9
state={state}
headline={reg.headline}
emphasis="first funnel"
lead={`Three secrets inside the ${reg.name}. Walk through your offer, page copy and next steps.`}
secrets={[
{ title: "Which pages your first funnel really needs (and which to skip)" },
{ title: "How to write page copy when you don’t think you’re a writer" },
{ title: "What to check so nothing breaks on launch day" },
]}
label={reg.label}
sublabel={reg.sublabel}
errorMessage={reg.error}
sceneImage={slot("scene", __studioImage3d56504c)}
sceneAlt="Someone sketching a simple funnel plan in a notebook beside a laptop"
onAction={() => new Promise<void>((resolve) => setTimeout(resolve, 1200))}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalThreeSecrets9 |
string |
|
emphasis OptionalThreeSecrets9 |
string |
|
lead OptionalThreeSecrets9 |
string |
|
secrets OptionalThreeSecrets9 |
SecretTease[] |
|
secretLabel OptionalThreeSecrets9 |
string |
|
label OptionalThreeSecrets9 |
string |
|
sublabel OptionalThreeSecrets9 |
string |
|
loadingLabel OptionalThreeSecrets9 |
string |
|
errorMessage OptionalThreeSecrets9 |
string |
|
href OptionalThreeSecrets9 |
string |
|
onAction OptionalThreeSecrets9 |
() => void | Promise<unknown> |
|
sceneImage OptionalThreeSecrets9 |
string |
|
sceneAlt OptionalThreeSecrets9 |
string |
|
state OptionalThreeSecrets9 |
ThreeSecrets9State |
|
id OptionalThreeSecrets9 |
string |
|
className OptionalThreeSecrets9 |
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--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.
-
871e4895ecac10d9.webp
image/webp · 71.2 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB