Is This You 1
Lets readers identify their needs before taking the next offer action.
Use it in a prompt
Use content/is-this-you 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/is-this-you.tsx. - Import it and pass your copy and images (Props tab):
import { IsThisYou } from "@/components/funneldna/content/is-this-you"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/is-this-you/component.tsx 365 lines
// Lets readers identify their needs before taking the next offer action.
"use client"
import * as React from "react"
import { AlertCircle, Check, Loader2, Lock } from "lucide-react"
export type IsThisYouProps = {
headline?: string
/** Part of the headline set in the marker colour. */
emphasis?: string
lead?: string
/** Record text is submitted as strings; legacy string lists remain supported. */
statements?: Array<{ text: string } | string>
/** Indexes ticked on first render (leave empty on a live page). */
defaultChecked?: number[]
/** Small confirmation that appears on a ticked row (desktop). */
tagLabel?: string
/** Default verdict templates use {count} and {total}. */
copy?: Partial<IsThisYouCopy>
/** Overrides the generated verdict. */
verdict?: (count: number, total: number) => string
label?: string
loadingLabel?: string
sublabel?: string
/** @deprecated No longer rendered: the builder wires what happens after the click. */
successText?: string
errorText?: string
disabled?: boolean
/** Navigation destination; the button renders as a link when set. */
href?: string
/** Receives the ticked lines. A returned promise shows the loading label; a rejection shows errorText. */
onAction?: (checked: string[]) => void | Promise<void>
/** "success" is accepted for older callers and renders as default. */
state?: IsThisYouState
className?: string
style?: React.CSSProperties
}
export function IsThisYou({
headline = "Is this you?",
emphasis = "you?",
lead = "Tick every line that sounds like you right now.",
statements = DEFAULT_STATEMENTS,
defaultChecked = [],
tagLabel = "That’s me",
verdict,
copy,
label = "Yes! That’s Me, Show Me How",
loadingLabel = "One moment",
sublabel = "Takes you straight to the next step",
errorText = "That didn’t go through. Please try again.",
disabled = false,
href,
onAction,
state = "default",
className,
style,
}: IsThisYouProps) {
const text = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const titleId = `${uid}-title`
const total = statements.length
const [checked, setChecked] = React.useState<boolean[]>(() => statements.map((_, i) => defaultChecked.includes(i)))
const [status, setStatus] = React.useState<Status>(() => statusFromState(state))
const mounted = React.useRef(true)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
React.useEffect(() => {
setStatus(statusFromState(state))
}, [state])
const isDisabled = disabled || state === "disabled"
const count = checked.filter(Boolean).length
const level = count === 0 || total === 0 ? 0 : count < Math.ceil(total / 2) ? 1 : 2
const force = state === "hover" || state === "active" ? state : undefined
const toggle = (index: number) => {
if (isDisabled) return
setChecked((prev) => prev.map((on, i) => (i === index ? !on : on)))
if (status === "error") setStatus("idle")
}
const handleAction = async (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled || status === "loading") {
event.preventDefault()
return
}
if (!onAction) return
const picked = statements.filter((_, i) => checked[i]).map(item => typeof item === "string" ? item : item.text)
try {
const result = onAction(picked)
if (!result) return
setStatus("loading")
await result
if (mounted.current) setStatus("idle")
} catch {
if (mounted.current) setStatus("error")
}
}
const labelContent = status === "loading" ? (
<>
<Loader2 className="itu-spin" aria-hidden="true" />
<span>{loadingLabel}</span>
</>
) : (
<span className="itu-label">{label}</span>
)
return (
<section
className={`cf-is-this-you itu${className ? ` ${className}` : ""}`}
style={style}
data-level={level}
data-disabled={isDisabled ? "" : undefined}
aria-labelledby={titleId}
>
<style>{CSS}</style>
<header className="itu-head">
<span className="itu-qmark" aria-hidden="true">
{text.questionMark}
</span>
<h2 className="itu-title" id={titleId}>
<Title text={headline} emphasis={emphasis} />
</h2>
{lead ? <p className="itu-lead">{lead}</p> : null}
</header>
<div className="itu-body">
<div role="group" aria-labelledby={titleId}>
<ul className="itu-list">
{statements.map((text, i) => {
const on = checked[i]
return (
<li key={i} style={{ "--i": i } as React.CSSProperties}>
<label className="itu-row" data-on={on ? "" : undefined}>
<input
type="checkbox"
className="itu-input"
checked={!!on}
disabled={isDisabled}
onChange={() => toggle(i)}
/>
<span className="itu-checkbox" aria-hidden="true">
<Check />
</span>
<span className="itu-text">{typeof text === "string" ? text : text.text}</span>
<span className="itu-tag" aria-hidden="true">
{tagLabel}
</span>
</label>
</li>
)
})}
</ul>
</div>
<div className="itu-result">
<div className="itu-meter" aria-hidden="true">
{statements.map((_, i) => (
<span key={i} className="itu-seg" data-on={i < count ? "" : undefined} />
))}
</div>
<p className="itu-verdict" data-level={level} aria-live="polite" aria-atomic="true">
<span key={count} className="itu-verdict-in">
<VerdictText text={verdict ? verdict(count, total) : defaultVerdict(count, total, text)} />
</span>
</p>
<div className="itu-cta">
{href && !isDisabled ? (
<a
href={href}
className="itu-btn"
data-force={force}
aria-busy={status === "loading" ? true : undefined}
onClick={handleAction}
>
{labelContent}
</a>
) : (
<button
type="button"
className="itu-btn"
data-force={force}
disabled={isDisabled}
aria-busy={status === "loading" ? true : undefined}
onClick={handleAction}
>
{labelContent}
</button>
)}
</div>
{status === "error" ? (
<p className="itu-error" role="alert">
<AlertCircle aria-hidden="true" />
<span>{errorText}</span>
</p>
) : null}
{sublabel ? (
<p className="itu-sub">
<Lock aria-hidden="true" />
<span>{sublabel}</span>
</p>
) : null}
</div>
</div>
</section>
)
}
export default IsThisYou
export type IsThisYouState = "default" | "hover" | "active" | "disabled" | "error" | "success"
type Status = "idle" | "loading" | "error"
const DEFAULT_STATEMENTS = [
"You have an offer in your head, but no page to send people to.",
"You opened a page builder and froze on what each page should say.",
"You keep rewriting the same headline and still aren’t happy with it.",
"You’re not sure which pages your funnel actually needs.",
"You keep putting off launch in case a link or form breaks.",
].map(text => ({ text }))
type IsThisYouCopy = {
emptyVerdict: string
partialVerdict: string
fullVerdict: string
questionMark: string
}
const DEFAULT_COPY: IsThisYouCopy = {
emptyVerdict: "Tick the lines that sound like you.",
partialVerdict: "You checked {count} of {total}: you’re in the right place.",
fullVerdict: "You checked {count} of {total}: this was made for you.",
questionMark: "?",
}
function defaultVerdict(count: number, total: number, copy: IsThisYouCopy) {
const template = count <= 0 ? copy.emptyVerdict : count < Math.ceil(total / 2) ? copy.partialVerdict : copy.fullVerdict
return formatCopy(template, { count, total })
}
function Title({ text, emphasis }: { text: string; emphasis?: string }) {
const at = emphasis ? text.indexOf(emphasis) : -1
if (!emphasis || at < 0) return <>{text}</>
return (
<>
{text.slice(0, at)}
<span className="itu-em">{emphasis}</span>
{text.slice(at + emphasis.length)}
</>
)
}
function VerdictText({ text }: { text: string }) {
const parts = text.split(/([0-9]+ of [0-9]+)/)
return (
<>
{parts.map((part, i) =>
/^[0-9]+ of [0-9]+$/.test(part) ? <strong key={i}>{part}</strong> : <React.Fragment key={i}>{part}</React.Fragment>,
)}
</>
)
}
const statusFromState = (state?: IsThisYouState): Status =>
state === "error" ? "error" : "idle"
function formatCopy(template: string, values: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => key in values ? String(values[key]) : match)
}
const CSS = `
.cf-is-this-you{--itu-marker:var(--marker,#fae37c);--itu-err:var(--danger);--itu-err-bg:var(--danger-soft);--itu-r:var(--radius,14px);--itu-ease:cubic-bezier(.23,1,.32,1);position:relative;width:100%;max-width:760px;margin-inline:auto;overflow:hidden;background:var(--card,#fff);color:var(--ink,#101828);font-family:var(--font-body,Arial,sans-serif);border:1px solid oklch(from var(--band,#0f2747) l c h / 0.24);border-radius:var(--card-radius,calc(var(--itu-r) + 6px));box-shadow:var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12))}
.cf-is-this-you *,.cf-is-this-you *::before,.cf-is-this-you *::after{box-sizing:border-box}
.cf-is-this-you :where(h2,p,ul){margin:0}
:where(.cf-is-this-you) .itu-head{position:relative;isolation:isolate;overflow:hidden;padding:clamp(1.9rem,4.4vw,2.75rem) clamp(1.25rem,4vw,2.75rem) clamp(1.75rem,4vw,2.5rem);background:var(--band,#0f2747);color:var(--band-ink,#fff);text-align:center;box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .14),inset 0 -3px 0 oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .18)}
:where(.cf-is-this-you) .itu-qmark{position:absolute;z-index:-1;top:50%;right:clamp(-1.5rem,2vw,1.75rem);font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(8rem,20vw,13rem);line-height:1;color:oklch(from var(--band-ink,#fff) l c h / 0.07);transform:translateY(-50%) rotate(10deg);pointer-events:none;user-select:none;text-transform:var(--display-case,none)}
:where(.cf-is-this-you) .itu-title{margin-inline:auto;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(2.5rem,7vw,4.125rem);font-weight:var(--display-weight,900);line-height:1;letter-spacing:var(--display-tracking,-.035em);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-is-this-you) .itu-em{color:var(--band-ink)}
:where(.cf-is-this-you) .itu-lead{max-width:38ch;margin:clamp(.85rem,1.8vw,1.25rem) auto 0;font-size:clamp(1.0625rem,1.9vw,1.25rem);font-weight:500;line-height:1.45;color:oklch(from var(--band-ink,#fff) l c h / 0.88);text-wrap:pretty}
:where(.cf-is-this-you) .itu-body{position:relative;padding:clamp(1.5rem,3.6vw,2.25rem) clamp(.9rem,3.4vw,2.25rem) clamp(1rem,3.4vw,2.25rem)}
:where(.cf-is-this-you) .itu-body::before{content:'';position:absolute;top:-1px;left:50%;width:30px;height:14px;background:var(--band,#0f2747);clip-path:polygon(0 0,100% 0,50% 100%);transform:translateX(-50%)}
:where(.cf-is-this-you) .itu-list{display:grid;gap:.7rem;padding:0;list-style:none}
:where(.cf-is-this-you) .itu-row{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:.9rem;min-height:62px;padding:1rem 1.1rem;background:var(--card,#fff);border:1.5px solid oklch(from var(--ink,#101828) l c h / 0.13);border-radius:var(--card-radius,var(--itu-r));box-shadow:var(--card-shadow,inset 0 -2px 0 oklch(from var(--ink) l c h / 0.05),0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .06));cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .18s var(--itu-ease),border-color .18s,background-color .18s,box-shadow .18s;animation:itu-in .45s var(--itu-ease) backwards;animation-delay:calc(min(var(--i,0),4) * 60ms);border-color:var(--card-border,oklch(from var(--ink) l c h / 0.13))}
:where(.cf-is-this-you) .itu-input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none;accent-color:var(--field-focus,var(--accent))}
:where(.cf-is-this-you) .itu-checkbox{display:grid;place-items:center;width:30px;height:30px;border-radius:var(--field-radius,var(--radius,8px));background:var(--field,#fff);border:2px solid oklch(from var(--ink,#101828) l c h / 0.32);box-shadow:inset 0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .1);color:var(--field-ink);transition:background-color .18s,border-color .18s,box-shadow .18s;border-color:var(--field-border,oklch(from var(--ink) l c h / 0.32))}
:where(.cf-is-this-you) .itu-checkbox svg{width:20px;height:20px;stroke-width:3.25}
:where(.cf-is-this-you) .itu-checkbox svg path{stroke-dasharray:24;stroke-dashoffset:24;transition:stroke-dashoffset .3s ease .06s}
:where(.cf-is-this-you) .itu-text{padding-top:2px;font-size:clamp(1.0625rem,1.7vw,1.125rem);font-weight:600;line-height:1.45;color:var(--label-ink,var(--ink));text-wrap:pretty}
:where(.cf-is-this-you) .itu-tag{align-self:center;padding:.3rem .75rem;border-radius:999px;background:var(--success-soft);color:var(--success);font-size:.875rem;font-weight:800;white-space:nowrap;opacity:0;transform:scale(.8);transition:opacity .2s,transform .25s var(--itu-ease)}
:where(.cf-is-this-you) .itu-row[data-on]{background:var(--success-soft);border-color:var(--card-border,var(--success));box-shadow:var(--card-shadow,inset 0 -2px 0 var(--success-soft),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-is-this-you) .itu-row[data-on] .itu-checkbox{background:var(--success-soft);border-color:var(--success);box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .3),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.35);animation:itu-pop .32s var(--itu-ease);color:var(--success)}
:where(.cf-is-this-you) .itu-row[data-on] .itu-checkbox svg path{stroke-dashoffset:0}
:where(.cf-is-this-you) .itu-row[data-on] .itu-tag{opacity:1;transform:scale(1)}
:where(.cf-is-this-you) .itu-row:has(.itu-input:focus-visible){outline:3px solid oklch(from var(--accent,#0f5fc2) l c h / 0.6);outline-offset:3px;outline-color:var(--field-focus,var(--accent))}
@media (hover:hover) and (pointer:fine){
.cf-is-this-you:not([data-disabled]) .itu-row:hover{transform:translateY(-2px);border-color:var(--card-border,oklch(from var(--accent) l c h / 0.45));box-shadow:var(--card-shadow,inset 0 -2px 0 oklch(from var(--ink) l c h / 0.05),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
.cf-is-this-you:not([data-disabled]) .itu-row:hover .itu-checkbox{border-color:var(--accent,#0f5fc2)}
}
.cf-is-this-you:not([data-disabled]) .itu-row:active{transform:scale(.99)}
.cf-is-this-you[data-disabled] .itu-row{cursor:not-allowed;opacity:.62}
:where(.cf-is-this-you) .itu-result{margin-top:clamp(1.1rem,2.6vw,1.6rem);padding:clamp(1.25rem,3vw,1.75rem) clamp(.9rem,3vw,1.75rem);background:oklch(from var(--card) calc(l - 0.03) c h);border:1px solid oklch(from var(--band,#0f2747) l c h / 0.13);border-radius:var(--card-radius,var(--itu-r));text-align:center;border-color:var(--card-border,oklch(from var(--ink) l c h / 0.13));box-shadow:var(--card-shadow,none)}
:where(.cf-is-this-you) .itu-meter{display:flex;gap:6px;max-width:260px;margin-inline:auto}
:where(.cf-is-this-you) .itu-seg{position:relative;flex:1;height:10px;overflow:hidden;border-radius:999px;background:oklch(from var(--card) calc(l - 0.03) c h)}
:where(.cf-is-this-you) .itu-seg::after{content:'';position:absolute;inset:0;border-radius:inherit;background:var(--success);transform:scaleX(0);transform-origin:left center;transition:transform .35s var(--itu-ease)}
:where(.cf-is-this-you) .itu-seg[data-on]::after{transform:scaleX(1)}
:where(.cf-is-this-you) .itu-verdict{margin:.9rem auto 0;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.25rem,2.8vw,1.625rem);font-weight:var(--display-weight,800);line-height:1.2;letter-spacing:var(--display-tracking,-.015em);color:var(--ink,#101828);text-transform:var(--display-case,none);text-wrap:balance}
:where(.cf-is-this-you) .itu-verdict[data-level='0']{color:var(--muted,#4a5565);font-weight:var(--display-weight,700)}
:where(.cf-is-this-you) .itu-verdict strong{color:var(--ink);font-weight:inherit}
:where(.cf-is-this-you) .itu-verdict-in{display:block;text-wrap:balance;animation:itu-rise .35s var(--itu-ease) backwards}
:where(.cf-is-this-you) .itu-cta{position:relative;max-width:520px;margin:clamp(1rem,2.4vw,1.35rem) auto 0}
:where(.cf-is-this-you) .itu-cta::before{content:'';position:absolute;inset:-7px;border-radius:calc(var(--itu-r) + 7px);background:oklch(from var(--cta,#d92d20) l c h / 0.15);opacity:0;transform:scale(.96);transition:opacity .3s,transform .3s var(--itu-ease);pointer-events:none}
.cf-is-this-you[data-level='1'] .itu-cta::before{opacity:.7;transform:scale(1)}
.cf-is-this-you[data-level='2'] .itu-cta::before{opacity:1;transform:scale(1);animation:itu-halo 1.8s ease-out .2s 3}
.cf-is-this-you[data-disabled] .itu-cta::before{display:none}
:where(.cf-is-this-you) .itu-btn{position:relative;display:flex;width:100%;min-height:68px;align-items:center;justify-content:center;gap:.6rem;padding:.9rem 1.15rem;overflow:hidden;border:1px solid oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h);border-radius:var(--button-radius,var(--itu-r));background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) l c h),oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-size:clamp(1.0625rem,4.2vw,1.375rem);font-weight:var(--button-weight,800);line-height:1.1;letter-spacing:var(--display-tracking,-.005em);text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .35),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));transition:transform .16s var(--itu-ease),box-shadow .16s,filter .16s;text-transform:var(--button-case,none);border-color:var(--button-bg-2,var(--cta-2))}
.cf-is-this-you[data-level='0'] .itu-btn{box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .35),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-is-this-you) .itu-btn::after{content:'';position:absolute;top:0;bottom:0;left:-45%;width:30%;background:linear-gradient(100deg,transparent,oklch(from var(--button-ink,var(--cta-ink)) l c h / 0.38),transparent);transform:skewX(-18deg);opacity:0;pointer-events:none}
.cf-is-this-you[data-level='2'] .itu-btn:not(:disabled)::after{animation:itu-shine .9s ease-out .15s 1 backwards}
:where(.cf-is-this-you) .itu-btn:hover:not(:disabled),:where(.cf-is-this-you) .itu-btn[data-force='hover']:not(:disabled){transform:translateY(-2px);background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .35),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-is-this-you) .itu-btn:active:not(:disabled),:where(.cf-is-this-you) .itu-btn[data-force='active']:not(:disabled){transform:translateY(3px);background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h);color:contrast-color(oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .35),inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14)))}
:where(.cf-is-this-you) .itu-btn:focus-visible{outline:3px solid var(--accent,#0f5fc2);outline-offset:4px}
:where(.cf-is-this-you) .itu-btn:disabled{cursor:not-allowed;background:var(--button-2-bg,var(--card));border-color:var(--button-2-border,oklch(from var(--ink) l c h / 0.22));color:var(--button-2-ink,var(--ink));text-shadow:none;box-shadow:var(--button-2-shadow, var(--shadow-sm))}
:where(.cf-is-this-you) .itu-btn[aria-busy='true']{cursor:progress}
:where(.cf-is-this-you) .itu-spin{flex:0 0 auto;width:1.1em;height:1.1em;animation:itu-spin .8s linear infinite}
:where(.cf-is-this-you) .itu-error{display:flex;align-items:center;justify-content:center;gap:.5rem;max-width:44ch;margin:.8rem auto 0;padding:.65rem .9rem;border-radius:10px;background:var(--itu-err-bg);border:1px solid var(--danger);color:var(--itu-err);font-size:.9375rem;font-weight:700;line-height:1.35;text-align:left;text-wrap:pretty}
:where(.cf-is-this-you) .itu-error svg{flex:0 0 auto;width:18px;height:18px}
:where(.cf-is-this-you) .itu-sub{display:block;text-align:center;margin-top:.8rem;color:var(--muted,#4a5565);font-size:.9375rem;font-weight:600;line-height:1.35;text-wrap:pretty}
:where(.cf-is-this-you) .itu-sub svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;width:15px;height:15px}
@keyframes itu-in{from{opacity:.82;transform:translateY(8px)}}
@keyframes itu-rise{from{opacity:.4;transform:translateY(6px)}}
@keyframes itu-pop{0%{transform:scale(.8)}60%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes itu-halo{0%{box-shadow:0 0 0 0 oklch(from var(--cta,#d92d20) l c h / 0.38)}100%{box-shadow:0 0 0 16px transparent}}
@keyframes itu-shine{from{left:-45%;opacity:1}to{left:125%;opacity:1}}
@keyframes itu-spin{to{transform:rotate(360deg)}}
@media (max-width:559px){
:where(.cf-is-this-you) .itu-row{grid-template-columns:auto minmax(0,1fr);gap:.75rem;padding:.9rem .95rem}
:where(.cf-is-this-you) .itu-tag{display:none}
}
@media (prefers-reduced-motion:reduce){
.cf-is-this-you *,.cf-is-this-you *::before,.cf-is-this-you *::after{animation:none !important;transition:none !important}
}
`
pieces/content/is-this-you/specimen.tsx 42 lines
import * as React from "react"
import { IsThisYou, type IsThisYouState } from "../is-this-you"
import defaults from "../../studio-defaults.json"
export const states = ["default", "hover", "active", "disabled", "error"]
const PRESET: Record<string, number[]> = {
default: [],
hover: [0, 1, 3],
active: [0, 1, 3],
disabled: [],
error: [0, 1, 3],
}
export default function IsThisYouSpecimen({ state = "default" }: { state?: string }) {
const s = defaults.sample
const current = (states.includes(state) ? state : "default") as IsThisYouState
return (
<div>
<IsThisYou
key={current}
state={current}
headline="Is this you?"
emphasis="you?"
lead="Tick every line that sounds like you right now."
statements={[
"You have an offer in your head, but no funnel to send people to.",
"You opened a page builder and froze on what each page should say.",
"You keep rewriting the same headline and still aren’t happy with it.",
"You’re not sure which pages your funnel actually needs.",
"You keep putting off launch in case a link or form breaks.",
].map(text => ({ text }))}
defaultChecked={PRESET[current]}
label={s.label}
loadingLabel="Opening secure checkout"
sublabel={`One payment · ${s.guarantee}`}
errorText="We couldn’t open checkout. Please try again."
/>
</div>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalIsThisYou |
string |
Default "Is this you?"
|
emphasis OptionalIsThisYou |
string |
Default "you?"
|
lead OptionalIsThisYou |
string |
Default "Tick every line that sounds like you right now."
|
statements OptionalIsThisYou |
Array<{ text: string } | string> |
Default DEFAULT_STATEMENTS
|
defaultChecked OptionalIsThisYou |
number[] |
Default []
|
tagLabel OptionalIsThisYou |
string |
Default "That’s me"
|
copy OptionalIsThisYou |
Partial<IsThisYouCopy> |
|
verdict OptionalIsThisYou |
(count: number, total: number) => string |
|
label OptionalIsThisYou |
string |
Default "Yes! That’s Me, Show Me How"
|
loadingLabel OptionalIsThisYou |
string |
Default "One moment"
|
sublabel OptionalIsThisYou |
string |
Default "Takes you straight to the next step"
|
successText OptionalIsThisYou |
string |
|
errorText OptionalIsThisYou |
string |
Default "That didn’t go through. Please try again."
|
disabled OptionalIsThisYou |
boolean |
Default false
|
href OptionalIsThisYou |
string |
|
onAction OptionalIsThisYou |
(checked: string[]) => void | Promise<void> |
|
state OptionalIsThisYou |
IsThisYouState |
Default "default"
|
className OptionalIsThisYou |
string |
|
style OptionalIsThisYou |
React.CSSProperties |
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--field-border--field-focus--field-ink--field-radius- 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.
This piece reads no image slots.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB