Is This You 2
Friction meter: the visitor rates each pain never / sometimes / every week, and a dark scoreboard reads their fit live, echoes their worst answers in their own words and wakes the action tile.
Use it in a prompt
Use content/is-this-you-2 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-2.tsx. - Import it and pass your copy and images (Props tab):
import { IsThisYou2 } from "@/components/funneldna/content/is-this-you-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/is-this-you-2/component.tsx 546 lines
// layout: fact-scoreboard
// Friction meter: the visitor rates each pain never / sometimes / every week, and a dark scoreboard reads their fit live, echoes their worst answers in their own words and wakes the action tile.
// Theme notes: every colour is a token or an OKLCH recipe on one; literals appear only as var() fallbacks. Board tiles mix --band-ink into --band (neutral, so they never turn muddy on dark or gold themes). The top fit is marked by the fit title and meter in the lifted accent fill, never a tinted tile. Selected segments read the accent-fill pair, the quiet button reads the secondary-button role tokens and the live button reads the primary role tokens. The pattern's fade mask uses an opaque token because masks read alpha only.
'use client'
import * as React from 'react'
import { AlertCircle, Loader2, ShieldCheck } from 'lucide-react'
import { FX_HOST, Pattern } from '../fx/fx'
export type IsThisYou2State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type IsThisYou2Statement = {
/** The pain in the visitor's own words; it labels its row. */
text: string
/** Shorter first-person echo shown on the scoreboard; falls back to text. */
echo?: string
}
export type IsThisYou2Tier = {
/** Lowest score that earns this read. Each line scores its step index (never 0, sometimes 1, every week 2). */
min: number
title: string
line: string
}
export type IsThisYou2Answer = { text: string; level: number; label: string }
export type IsThisYou2Result = { answers: IsThisYou2Answer[]; score: number; fit: string }
export type IsThisYou2Copy = {
/** Small label at the top of the fit tile. */
fitLabel: string
/** Fit tile title before any answer. */
idleTitle: string
/** Fit tile line before any answer. */
idleLine: string
/** Uses {answered} and {total}. */
progress: string
/** Label on the first echo tile. */
worstLabel: string
/** Label on the second echo tile. */
nextLabel: string
/** Echo tile text while it has nothing to echo. */
worstEmpty: string
/** Inline error under the first line when the action is pressed before any answer. */
nudge: string
/** Accessible name of the list of lines. */
groupLabel: string
/** Accessible name of the scoreboard. */
boardLabel: string
}
export type IsThisYou2Props = {
headline?: string
/** Phrase inside the headline set in the accent colour. */
emphasis?: string
lead?: string
/** The pains to rate; plain strings are accepted. */
statements?: Array<IsThisYou2Statement | string>
/** The frequency steps, from no friction to the most. */
levels?: string[]
/** Step index per line on first render (leave empty on a live page). */
defaultAnswers?: Array<number | null>
/** The scoring map: the fit read for each score band. */
tiers?: IsThisYou2Tier[]
/** Scoreboard labels and messages; any key left out keeps its default. */
copy?: Partial<IsThisYou2Copy>
/** Outcome photo beside the headline on desktop (page slot: scene). */
sceneImage?: string
sceneAlt?: string
/** Plain caption under the photo. */
sceneCaption?: string
/** Button label in the action tile. */
label?: string
/** Short button label for the phone bar. */
barLabel?: string
/** Button label while a promise returned by onAction is pending. */
loadingLabel?: string
/** One reassurance line under the button; hidden when empty. */
reassurance?: string
/** Quiet secondary line under the button; shown when secondaryHref is set. */
secondaryLabel?: string
secondaryHref?: string
/** Shown when onAction rejects, and in the error state. */
errorText?: string
/** Locks the lines and the button. */
disabled?: boolean
/** Navigation destination once the button is live. */
href?: string
/** Receives the answers, score and fit read. A returned promise shows loadingLabel; a rejection shows errorText. */
onAction?: (result: IsThisYou2Result) => void | Promise<void>
/** Preview state: hover and active are forced looks, disabled and error are the real states. */
state?: IsThisYou2State
className?: string
style?: React.CSSProperties
}
type Status = 'idle' | 'loading' | 'error'
const DEFAULT_STATEMENTS: IsThisYou2Statement[] = [
{ text: 'I stare at a blank page before every funnel.', echo: 'I stare at a blank page' },
{ text: 'I rewrite my headline again and again.', echo: 'I keep rewriting my headline' },
{ text: 'I’m not sure which pages my funnel needs.', echo: 'I’m unsure which pages I need' },
{ text: 'I launch, then find a broken link or form.', echo: 'I find broken links after launch' },
]
const DEFAULT_LEVELS = ['Never', 'Sometimes', 'Every week']
const DEFAULT_TIERS: IsThisYou2Tier[] = [
{ min: 5, title: 'Built for you', line: 'This is the friction The Funnel Starter Kit was made to clear.' },
{ min: 2, title: 'Probably for you', line: 'Some of this slows you down. The kit covers each one.' },
{ min: 0, title: 'Maybe not yet', line: 'Your funnel sounds on track. Keep this page for later.' },
]
const DEFAULT_COPY: IsThisYou2Copy = {
fitLabel: 'Your read, from your answers',
idleTitle: 'Your fit shows here',
idleLine: 'Answer any line and watch this tile.',
progress: '{answered} of {total} answered',
worstLabel: 'Costing you the most',
nextLabel: 'Close behind',
worstEmpty: 'Your toughest answer lands here.',
nudge: 'Pick how often this happens to see your fit.',
groupLabel: 'How often does each of these happen?',
boardLabel: 'Your fit scoreboard',
}
export function IsThisYou2({
headline = 'How often does this happen to you?',
emphasis = 'to you?',
lead = 'Rate four quick lines. The scoreboard tells you straight if this kit is built for you.',
statements = DEFAULT_STATEMENTS,
levels = DEFAULT_LEVELS,
defaultAnswers = [],
tiers = DEFAULT_TIERS,
copy,
sceneImage,
sceneAlt = '',
sceneCaption = '',
label = 'Get The Funnel Starter Kit',
barLabel = 'Get the kit',
loadingLabel = 'One moment…',
reassurance = '',
secondaryLabel = 'or keep reading to see what’s inside',
secondaryHref,
errorText = 'That didn’t go through. Please try again.',
disabled = false,
href,
onAction,
state = 'default',
className,
style,
}: IsThisYou2Props) {
const text = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const titleId = `${uid}-title`
const assureId = `${uid}-assure`
const errId = `${uid}-err`
const rows = statements.map((s) => (typeof s === 'string' ? { text: s } : s))
const total = rows.length
const steps = levels.length
const [answers, setAnswers] = React.useState<Array<number | null>>(() => rows.map((_, i) => normal(defaultAnswers[i], steps)))
const [status, setStatus] = React.useState<Status>(state === 'error' ? 'error' : 'idle')
const [nudge, setNudge] = React.useState(false)
const firstRadio = React.useRef<HTMLInputElement>(null)
const mounted = React.useRef(true)
const busy = React.useRef(false)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
React.useEffect(() => {
setStatus(state === 'error' ? 'error' : 'idle')
}, [state])
const isDisabled = disabled || state === 'disabled'
const force = state === 'hover' || state === 'active' ? state : undefined
const picks = rows.map((_, i) => normal(answers[i], steps))
const answered = picks.filter((p) => p !== null).length
const score = picks.reduce<number>((n, p) => n + (p ?? 0), 0)
const live = answered > 0
const ladder = [...tiers].sort((a, b) => b.min - a.min)
const tierIndex = live && ladder.length ? findTier(ladder, score) : -1
const tier = tierIndex >= 0 ? ladder[tierIndex] : undefined
const cells = total * Math.max(steps - 1, 1)
const hottest = steps - 1
const worst = picks
.map((level, i) => ({ i, level: level ?? 0 }))
.filter((w) => w.level > 0)
.sort((a, b) => b.level - a.level || a.i - b.i)
.slice(0, 2)
const showNudge = nudge && !live
const loading = status === 'loading'
const ctaLive = live && !isDisabled
const describedBy = reassurance ? assureId : undefined
const choose = (row: number, level: number) => {
if (isDisabled || busy.current) return
setAnswers((prev) => rows.map((_, i) => (i === row ? level : normal(prev[i], steps))))
setNudge(false)
if (status === 'error') setStatus('idle')
}
const run = async (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled || busy.current) {
event.preventDefault()
return
}
if (!live) {
event.preventDefault()
setNudge(true)
firstRadio.current?.focus()
return
}
if (!onAction) return
const payload: IsThisYou2Result = {
answers: picks.flatMap((level, i) => (level === null ? [] : [{ text: rows[i].text, level, label: levels[level] ?? '' }])),
score,
fit: tier ? tier.title : '',
}
try {
const result = onAction(payload)
if (!result) return
busy.current = true
setStatus('loading')
await result
if (mounted.current) setStatus('idle')
} catch {
if (mounted.current) setStatus('error')
} finally {
busy.current = false
}
}
const ctaContent = loading ? (
<>
<Loader2 className='its-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{loadingLabel}</span>
</>
) : (
<>
<span className='its-cta-long'>{label}</span>
<span className='its-cta-short'>{barLabel || label}</span>
</>
)
const cta =
ctaLive && href ? (
<a className='its-cta' href={href} onClick={run} data-live='' aria-busy={loading || undefined} aria-describedby={describedBy}>
{ctaContent}
</a>
) : (
<button
type='button'
className='its-cta'
onClick={run}
disabled={isDisabled}
data-live={ctaLive ? '' : undefined}
aria-busy={loading || undefined}
aria-describedby={describedBy}
>
{ctaContent}
</button>
)
return (
<section
className={`cf-is-this-you-2${className ? ` ${className}` : ''}`}
style={style}
aria-labelledby={titleId}
data-fig={sceneImage ? '' : undefined}
data-force={force}
data-disabled={isDisabled ? '' : undefined}
>
<style>{CSS}</style>
<div className='its-fx' aria-hidden='true'>
<div className='its-fx-host' style={FX_HOST}>
<Pattern name='grid' fade='corner' />
</div>
</div>
<div className='its-inner'>
<header className='its-head'>
<h2 className='its-title' id={titleId}>
<Title text={headline} emphasis={emphasis} />
</h2>
{lead ? <p className='its-lead'>{lead}</p> : null}
</header>
{sceneImage ? (
<figure className='its-fig'>
<img src={sceneImage} alt={sceneAlt} width={1600} height={1000} decoding='async' />
{sceneCaption ? <figcaption>{sceneCaption}</figcaption> : null}
</figure>
) : null}
<ol className='its-qs' aria-label={text.groupLabel}>
{rows.map((row, i) => {
const pick = picks[i]
const invalid = showNudge && i === 0
return (
<li className='its-q' key={i} data-invalid={invalid ? '' : undefined} style={{ '--i': Math.min(i, 4) } as React.CSSProperties}>
<span className='its-num' aria-hidden='true'>
{String(i + 1).padStart(2, '0')}
</span>
<fieldset className='its-fs' disabled={isDisabled} aria-describedby={invalid ? errId : undefined}>
<legend className='its-stmt'>{row.text}</legend>
<div
className='its-track'
data-picked={pick !== null ? '' : undefined}
style={{ '--pick': pick ?? 0, '--n': steps } as React.CSSProperties}
>
{levels.map((step, j) => (
<label className='its-seg' key={j} data-on={pick === j ? '' : undefined}>
<input
ref={i === 0 && j === 0 ? firstRadio : undefined}
type='radio'
name={`${uid}-q${i}`}
value={j}
checked={pick === j}
onChange={() => choose(i, j)}
/>
<span className='its-seg-face'>{step}</span>
</label>
))}
</div>
{invalid ? (
<p className='its-ferr' id={errId} role='alert'>
<AlertCircle className='its-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{text.nudge}
</p>
) : null}
</fieldset>
</li>
)
})}
</ol>
<aside className='its-board' aria-label={text.boardLabel}>
<div className='its-tile its-tile--fit' data-top={tierIndex === 0 ? '' : undefined}>
<p className='its-tlabel'>{text.fitLabel}</p>
<div className='its-fit' data-idle={tier ? undefined : ''} aria-live='polite' aria-atomic='true'>
<p className='its-fit-title' key={tier ? tier.title : 'idle'}>
{tier ? tier.title : text.idleTitle}
</p>
<p className='its-fit-line'>{tier ? tier.line : text.idleLine}</p>
</div>
<div className='its-gauge'>
<div className='its-meter' aria-hidden='true' style={{ '--cells': cells } as React.CSSProperties}>
{Array.from({ length: cells }, (_, c) => (
<span className='its-cell' key={c} data-on={c < score ? '' : undefined} style={{ '--c': c } as React.CSSProperties} />
))}
</div>
<p className='its-progress'>{fill(text.progress, { answered, total })}</p>
</div>
</div>
{[0, 1].map((n) => {
const w = worst[n]
return (
<div className='its-tile its-tile--worst' key={n}>
<p className='its-tlabel'>{n === 0 ? text.worstLabel : text.nextLabel}</p>
{w ? (
<>
<p className='its-echo' key={`${w.i}-${w.level}`}>
“{rows[w.i].echo || rows[w.i].text}”
</p>
<span className='its-chip' data-hot={w.level === hottest ? '' : undefined}>
{levels[w.level]}
</span>
</>
) : (
<p className='its-empty'>{text.worstEmpty}</p>
)}
</div>
)
})}
<div className='its-tile its-tile--act'>
{cta}
{reassurance ? (
<p className='its-assure' id={assureId}>
<ShieldCheck className='its-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
{secondaryLabel && secondaryHref ? (
<a className='its-quiet-link' href={secondaryHref}>
{secondaryLabel}
</a>
) : null}
</div>
{status === 'error' ? (
<p className='its-alert' role='alert'>
<AlertCircle className='its-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{errorText}
</p>
) : null}
</aside>
</div>
</section>
)
}
export default IsThisYou2
function Title({ text, emphasis }: { text: string; emphasis?: string }) {
const at = emphasis ? text.lastIndexOf(emphasis) : -1
if (!emphasis || at < 0) return <>{text}</>
return (
<>
{text.slice(0, at)}
<span className='its-em'>{emphasis}</span>
{text.slice(at + emphasis.length)}
</>
)
}
function fill(template: string, values: Record<string, string | number>) {
return Object.keys(values).reduce((out, key) => out.split(`{${key}}`).join(String(values[key])), template)
}
function normal(value: number | null | undefined, steps: number) {
return typeof value === 'number' && Number.isInteger(value) && value >= 0 && value < steps ? value : null
}
function findTier(ladder: IsThisYou2Tier[], score: number) {
const index = ladder.findIndex((tier) => score >= tier.min)
return index >= 0 ? index : ladder.length - 1
}
const CSS = `
.cf-is-this-you-2{--its-gutter:clamp(16px,5vw,48px);--its-soft:color-mix(in oklch, var(--band-ink) 84%, var(--band));--its-hot:oklch(from var(--accent-fill, var(--accent)) max(l, 0.72) c h);--its-sh:var(--shadow, oklch(0.22 0.03 260));position:relative;box-sizing:border-box;overflow-x:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) var(--its-gutter) clamp(64px,8.5vw,120px)}
.cf-is-this-you-2 *,.cf-is-this-you-2 *::before,.cf-is-this-you-2 *::after{box-sizing:border-box}
.cf-is-this-you-2 .its-fx{position:absolute;inset:0 0 auto 0;height:min(620px,80%);overflow:hidden;pointer-events:none;-webkit-mask-image:linear-gradient(to bottom, var(--ink) 50%, transparent);mask-image:linear-gradient(to bottom, var(--ink) 50%, transparent)}
.cf-is-this-you-2 .its-fx-host{height:100%}
.cf-is-this-you-2 .its-inner{position:relative;z-index:1;max-width:1120px;margin-inline:auto;display:grid;grid-template-columns:minmax(0,1.12fr) minmax(360px,.88fr);grid-template-areas:'head head' 'qs board';column-gap:clamp(32px,5vw,72px);row-gap:clamp(32px,4vw,48px)}
.cf-is-this-you-2[data-fig] .its-inner{grid-template-areas:'head fig' 'qs fig' 'qs board'}
.cf-is-this-you-2 .its-head{grid-area:head;align-self:start;min-width:0}
.cf-is-this-you-2 .its-title{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--ink);text-wrap:balance}
.cf-is-this-you-2 .its-em{color:var(--accent)}
.cf-is-this-you-2 .its-lead{margin:0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-is-this-you-2 .its-fig{grid-area:fig;align-self:start;min-width:0;margin:0}
.cf-is-this-you-2 .its-fig img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:center 40%;border-radius:12px;background:color-mix(in oklch, var(--ink) 6%, var(--surface))}
.cf-is-this-you-2 .its-fig figcaption{margin-top:12px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-is-this-you-2 .its-qs{grid-area:qs;min-width:0;margin:0;padding:0;list-style:none}
.cf-is-this-you-2 .its-q{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:20px;padding:24px 0}
.cf-is-this-you-2 .its-q:first-child{padding-top:0}
.cf-is-this-you-2 .its-q + .its-q{border-top:1px solid oklch(from var(--ink) l c h / .12)}
.cf-is-this-you-2 .its-num{min-width:2ch;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--accent);font-variant-numeric:lining-nums tabular-nums}
.cf-is-this-you-2 .its-fs{min-width:0;margin:0;padding:0;border:0}
.cf-is-this-you-2 .its-stmt{display:block;margin:0 0 14px;padding:0;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;line-height:1.35;color:var(--ink);text-wrap:pretty}
.cf-is-this-you-2 .its-track{position:relative;display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));max-width:480px;padding:4px;border:1px solid oklch(from var(--ink) l c h / .12);border-radius:var(--field-radius, var(--radius,12px));background:color-mix(in oklch, var(--ink) 6%, var(--surface))}
.cf-is-this-you-2 .its-track::before{content:'';position:absolute;top:4px;bottom:4px;left:4px;width:calc((100% - 8px) / var(--n,3));border-radius:calc(var(--field-radius, var(--radius,12px)) - 4px);background:linear-gradient(oklch(from var(--accent-fill, var(--accent)) calc(l + .03) c h), oklch(from var(--accent-fill, var(--accent)) calc(l - .03) c h));box-shadow:inset 0 1px 0 oklch(from var(--accent-fill, var(--accent)) calc(l + .12) c h / .55),0 1px 2px oklch(from var(--its-sh) l c h / .28),0 4px 8px -3px oklch(from var(--its-sh) l c h / .3);transform:translateX(calc(var(--pick,0) * 100%));opacity:0}
.cf-is-this-you-2 .its-track[data-picked]::before{opacity:1}
.cf-is-this-you-2 .its-seg{position:relative;z-index:1;display:block;min-width:0;cursor:pointer}
.cf-is-this-you-2 .its-seg input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}
.cf-is-this-you-2 .its-seg-face{display:flex;align-items:center;justify-content:center;min-height:48px;padding:6px 8px;border-radius:calc(var(--field-radius, var(--radius,12px)) - 4px);font-size:1rem;font-weight:700;line-height:1.15;color:var(--ink);text-align:center;text-wrap:balance}
.cf-is-this-you-2 .its-seg[data-on] .its-seg-face{color:var(--accent-fill-ink, var(--card))}
.cf-is-this-you-2 .its-seg input:focus-visible + .its-seg-face{outline:2px solid var(--field-focus, var(--accent));outline-offset:2px}
.cf-is-this-you-2 .its-fs:disabled .its-seg{cursor:not-allowed}
.cf-is-this-you-2 .its-fs:disabled .its-track{opacity:.6}
.cf-is-this-you-2 .its-q[data-invalid] .its-track{border-color:var(--danger);box-shadow:inset 0 0 0 1px var(--danger)}
.cf-is-this-you-2 .its-ferr{margin:10px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
.cf-is-this-you-2 .its-ico{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-is-this-you-2 .its-board{grid-area:board;position:sticky;top:24px;align-self:start;min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border-radius:var(--card-radius, var(--radius,14px));background:var(--band);color:var(--band-ink);box-shadow:var(--shadow-lg, 0 2px 4px oklch(from var(--its-sh) l c h / .22), 0 12px 24px -8px oklch(from var(--its-sh) l c h / .32))}
.cf-is-this-you-2 .its-tile{min-width:0;padding:clamp(16px,2vw,24px);border-radius:10px;background:color-mix(in oklch, var(--band-ink) 7%, var(--band))}
.cf-is-this-you-2 .its-tile--fit{grid-column:1 / -1;display:flex;flex-direction:column}
.cf-is-this-you-2 .its-tlabel{margin:0 0 12px;font-size:.875rem;font-weight:700;line-height:1.2;color:var(--its-soft)}
.cf-is-this-you-2 .its-tile--fit[data-top] .its-fit-title{color:var(--its-hot)}
.cf-is-this-you-2 .its-fit-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--band-ink);text-wrap:balance}
.cf-is-this-you-2 .its-fit[data-idle] .its-fit-title{font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--its-soft)}
.cf-is-this-you-2 .its-fit-line{margin:12px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--its-soft);text-wrap:pretty}
.cf-is-this-you-2 .its-gauge{margin-top:auto;padding-top:32px}
.cf-is-this-you-2 .its-meter{display:grid;grid-template-columns:repeat(var(--cells,8),minmax(0,1fr));gap:4px;height:10px}
.cf-is-this-you-2 .its-cell{border-radius:3px;background:oklch(from var(--band-ink) l c h / .16)}
.cf-is-this-you-2 .its-cell[data-on]{background:var(--its-hot)}
.cf-is-this-you-2 .its-progress{margin:10px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--its-soft);font-variant-numeric:lining-nums tabular-nums}
.cf-is-this-you-2 .its-tile--worst{display:flex;flex-direction:column;align-items:flex-start}
.cf-is-this-you-2 .its-echo{margin:0 0 12px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.35;color:var(--band-ink);text-wrap:pretty}
.cf-is-this-you-2 .its-chip{display:inline-flex;align-items:center;gap:8px;min-height:28px;margin-top:auto;padding:4px 12px;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}
.cf-is-this-you-2 .its-chip::before{content:'';flex:none;width:8px;height:8px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .55)}
.cf-is-this-you-2 .its-chip[data-hot]::before{background:var(--its-hot)}
.cf-is-this-you-2 .its-empty{margin:0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--its-soft);text-wrap:pretty}
.cf-is-this-you-2 .its-tile--act{grid-column:1 / -1;display:grid;justify-items:center;gap:12px;text-align:center}
.cf-is-this-you-2 .its-assure{margin:0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--its-soft);text-wrap:pretty}
.cf-is-this-you-2 .its-quiet-link{border-radius:4px;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--band-ink);text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / .45);text-underline-offset:.18em}
.cf-is-this-you-2 .its-quiet-link:hover{text-decoration-color:var(--band-ink)}
.cf-is-this-you-2 .its-quiet-link:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-is-this-you-2 .its-alert{grid-column:1 / -1;margin:0;padding:10px 12px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
.cf-is-this-you-2 .its-cta{--its-b:var(--button-bg, var(--cta));--its-b2:var(--button-bg-2, var(--cta-2));display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;padding:0 28px;border:1px solid var(--button-2-border, transparent);border-radius:var(--button-radius, var(--radius,12px));background:var(--button-2-bg, var(--secondary));color:var(--button-2-ink, var(--secondary-ink));box-shadow:var(--button-2-shadow, var(--shadow-sm));font-family:var(--button-font, var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.cf-is-this-you-2 .its-cta-short{display:none}
.cf-is-this-you-2 .its-cta[data-live]{border-color:transparent;background:linear-gradient(oklch(from var(--its-b) calc(l + .04) c h), oklch(from var(--its-b2) calc(l - .02) c h));color:var(--button-ink, var(--cta-ink));text-shadow:var(--button-text-shadow, none);box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--its-b) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--its-b) calc(l - .16) c h), 0 1px 2px oklch(from var(--its-sh) l c h / .4), 0 8px 16px -6px oklch(from var(--its-sh) l c h / .5))}
.cf-is-this-you-2[data-force='hover'] .its-cta[data-live]{transform:translateY(-1px);background:linear-gradient(oklch(from var(--its-b) calc(l - .01) c h), oklch(from var(--its-b2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--its-b) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--its-b) calc(l - .2) c h), 0 1px 2px oklch(from var(--its-sh) l c h / .45), 0 10px 18px -6px oklch(from var(--its-sh) l c h / .55)}
.cf-is-this-you-2 .its-cta[data-live]:active,.cf-is-this-you-2[data-force='active'] .its-cta[data-live]{transform:translateY(1px);background:linear-gradient(oklch(from var(--its-b) calc(l - .04) c h), oklch(from var(--its-b2) calc(l - .08) c h));box-shadow:inset 0 2px 3px oklch(from var(--its-b) calc(l - .24) c h / .55), inset 0 -2px 0 oklch(from var(--its-b) calc(l - .16) c h), 0 1px 1px oklch(from var(--its-sh) l c h / .35)}
.cf-is-this-you-2 .its-cta:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-is-this-you-2 .its-cta:disabled{cursor:not-allowed;opacity:.55;box-shadow:none}
@media (hover:hover){
.cf-is-this-you-2 .its-cta[data-live]:hover:not(:active){transform:translateY(-1px);background:linear-gradient(oklch(from var(--its-b) calc(l - .01) c h), oklch(from var(--its-b2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--its-b) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--its-b) calc(l - .2) c h), 0 1px 2px oklch(from var(--its-sh) l c h / .45), 0 10px 18px -6px oklch(from var(--its-sh) l c h / .55)}
.cf-is-this-you-2 .its-cta:not([data-live]):not(:disabled):hover{background:oklch(from var(--button-2-bg, var(--secondary)) calc(l - .04) c h)}
.cf-is-this-you-2 .its-seg:not([data-on]):hover .its-seg-face{background:color-mix(in oklch, var(--ink) 8%, transparent)}
.cf-is-this-you-2 .its-fs:disabled .its-seg:hover .its-seg-face{background:none}
}
@media (prefers-reduced-motion:no-preference){
.cf-is-this-you-2 .its-q{animation:cf-itsy2-rise .45s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:calc(var(--i,0) * .07s)}
.cf-is-this-you-2 .its-echo{animation:cf-itsy2-rise .45s cubic-bezier(.2,.7,.2,1) backwards}
.cf-is-this-you-2 .its-fit-title,.cf-is-this-you-2 .its-cta[data-live]{animation:cf-itsy2-pop .3s cubic-bezier(.2,.7,.2,1) backwards}
.cf-is-this-you-2 .its-track::before{transition:transform .22s cubic-bezier(.2,.7,.2,1),opacity .16s ease}
.cf-is-this-you-2 .its-seg-face{transition:color .16s ease,background-color .16s ease}
.cf-is-this-you-2 .its-cell{transition:background-color .2s ease;transition-delay:calc(var(--c,0) * 30ms)}
.cf-is-this-you-2 .its-cta{transition:transform .16s ease,box-shadow .16s ease,background .16s ease,color .16s ease}
.cf-is-this-you-2 .its-spin{animation:cf-itsy2-spin .8s linear infinite}
}
@keyframes cf-itsy2-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes cf-itsy2-pop{from{transform:scale(.9)}}
@keyframes cf-itsy2-spin{to{transform:rotate(360deg)}}
@media (max-width:980px){
.cf-is-this-you-2 .its-inner,.cf-is-this-you-2[data-fig] .its-inner{grid-template-columns:minmax(0,1fr);grid-template-areas:'head' 'qs' 'board'}
.cf-is-this-you-2[data-fig] .its-inner{grid-template-areas:'head' 'fig' 'qs' 'board'}
.cf-is-this-you-2 .its-fig img{aspect-ratio:16/9}
.cf-is-this-you-2 .its-board{position:relative;top:auto}
.cf-is-this-you-2 .its-gauge{padding-top:24px}
}
@media (max-width:560px){
.cf-is-this-you-2 .its-q{column-gap:12px;padding:20px 0}
.cf-is-this-you-2 .its-num{width:2rem;font-size:1.125rem;line-height:1.35}
.cf-is-this-you-2 .its-stmt{font-size:1.125rem}
.cf-is-this-you-2 .its-track{max-width:none;margin-inline-start:calc(-2rem - 12px)}
.cf-is-this-you-2 .its-seg-face{padding:6px 4px;white-space:nowrap}
.cf-is-this-you-2 .its-board{padding:10px;gap:8px}
.cf-is-this-you-2 .its-tile{padding:20px}
}
@media (max-width:420px){
.cf-is-this-you-2 .its-tile--worst{grid-column:1 / -1}
}
@media (max-width:359px){
.cf-is-this-you-2 .its-cta-long{display:none}
.cf-is-this-you-2 .its-cta-short{display:inline}
.cf-is-this-you-2 .its-seg-face{white-space:normal}
}
`
pieces/content/is-this-you-2/specimen.tsx 37 lines
import __studioImaged262b303 from "../assets/918d080b6ada0996.webp";
import IsThisYou2, { type IsThisYou2State } from '../is-this-you-2'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function IsThisYou2Specimen({ state = 'default' }: { state?: IsThisYou2State }) {
return (
<IsThisYou2
state={state}
headline='How often does the rota run your week?'
emphasis='run your week?'
lead='Rate four quick lines. The scoreboard tells you straight whether Shiftly is built for your café or clinic.'
statements={[
{ text: 'I rebuild next week’s rota from scratch.', echo: 'I rebuild the rota from scratch' },
{ text: 'Shift swaps get sorted in a group chat.', echo: 'Swaps live in the group chat' },
{ text: 'A sick call means an hour on the phone.', echo: 'A sick call costs me an hour' },
{ text: 'We find out we’re short after we open.', echo: 'We open short-staffed' },
]}
defaultAnswers={[2, 1, 2, null]}
tiers={[
{ min: 5, title: 'Built for you', line: 'This is the weekly mess Shiftly was made to clear.' },
{ min: 2, title: 'Probably for you', line: 'Some weeks the rota wins. Shiftly takes those weeks back.' },
{ min: 0, title: 'Maybe not yet', line: 'Your rota sounds under control. Bookmark Shiftly for busy season.' },
]}
sceneImage={slot('scene', __studioImaged262b303)}
sceneAlt='Café manager checking next week’s staff rota on a tablet at the counter'
sceneCaption='Next week’s rota, set before the morning rush.'
label='Get Shiftly for my team'
barLabel='Get Shiftly'
reassurance={defaults.sample.guarantee}
secondaryLabel='or keep reading to see how Shiftly works'
secondaryHref='#how-it-works'
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalIsThisYou2 |
string |
Default 'How often does this happen to you?'
|
emphasis OptionalIsThisYou2 |
string |
Default 'to you?'
|
lead OptionalIsThisYou2 |
string |
Default 'Rate four quick lines. The scoreboard tells you straight if this kit is built for you.'
|
statements OptionalIsThisYou2 |
Array<IsThisYou2Statement | string> |
Default DEFAULT_STATEMENTS
|
levels OptionalIsThisYou2 |
string[] |
Default DEFAULT_LEVELS
|
defaultAnswers OptionalIsThisYou2 |
Array<number | null> |
Default []
|
tiers OptionalIsThisYou2 |
IsThisYou2Tier[] |
Default DEFAULT_TIERS
|
copy OptionalIsThisYou2 |
Partial<IsThisYou2Copy> |
|
sceneImage OptionalIsThisYou2 |
string |
|
sceneAlt OptionalIsThisYou2 |
string |
Default ''
|
sceneCaption OptionalIsThisYou2 |
string |
Default ''
|
label OptionalIsThisYou2 |
string |
Default 'Get The Funnel Starter Kit'
|
barLabel OptionalIsThisYou2 |
string |
Default 'Get the kit'
|
loadingLabel OptionalIsThisYou2 |
string |
Default 'One moment…'
|
reassurance OptionalIsThisYou2 |
string |
Default ''
|
secondaryLabel OptionalIsThisYou2 |
string |
Default 'or keep reading to see what’s inside'
|
secondaryHref OptionalIsThisYou2 |
string |
|
errorText OptionalIsThisYou2 |
string |
Default 'That didn’t go through. Please try again.'
|
disabled OptionalIsThisYou2 |
boolean |
Default false
|
href OptionalIsThisYou2 |
string |
|
onAction OptionalIsThisYou2 |
(result: IsThisYou2Result) => void | Promise<void> |
|
state OptionalIsThisYou2 |
IsThisYou2State |
Default 'default'
|
className OptionalIsThisYou2 |
string |
|
style OptionalIsThisYou2 |
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-radius- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
918d080b6ada0996.webp
image/webp · 56.6 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB