Yes Order Box 2
Yes Order Box 2: the enrolment sign-off. A generated clipboard (with today's price on a starburst sticker) sits beside the
Use it in a prompt
Use offer/yes-order-box-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/offer/yes-order-box-2.tsx. - Import it and pass your copy and images (Props tab):
import { YesOrderBox2 } from "@/components/funneldna/offer/yes-order-box-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/yes-order-box-2/component.tsx 510 lines
// layout: clipboard-checklist
// Yes Order Box 2: the enrolment sign-off. A generated clipboard (with today's price on a starburst sticker) sits beside the
// buyer's own "YES! I’m ready to join…" declaration. The buyer ticks each supplied "I understand that…" term, a live count
// reads "3 of 3 confirmed", and the always-enabled, full-colour button gains its raised lip and depth once every line is confirmed.
'use client'
import * as React from 'react'
import { AlertCircle, Check, Loader2, Lock } from 'lucide-react'
import { FX_HOST, Pattern } from '../fx/fx'
/** 'disabled' previews the pending look (every line ticked, button busy); 'error' previews the inline incomplete error. */
export type YesOrderBox2State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
/** Templates use named placeholders, replaced as text: {product}, {understand}, {line}, {guarantee}, {done}, {total}. */
export type YesOrderBox2Copy = {
yes: string
/** '{product}' */
declaration: string
understand: string
/** One confirmation line: '{understand}', '{line}' */
line: string
/** '{understand}', '{guarantee}' */
guaranteeLine: string
/** Instruction above the checklist. */
prompt: string
/** Live count above the button: '{done}', '{total}' */
count: string
/** Inline error when the button is clicked before every line is ticked: '{total}' */
incomplete: string
/** The plain instruction right above the button. */
instruction: string
loading: string
failed: string
/** Small word above the price on the sticker. */
priceLabel: string
}
export type YesOrderBox2Letter = {
salutation?: string
paragraphs?: React.ReactNode[]
/** Name written in the signature face. */
signature?: string
/** Handwritten signature art (slot signature); replaces the typed signature. */
signatureImage?: string
name?: string
role?: string
}
export type YesOrderBox2Props = {
/** Programme or product name; carries the marker stroke in the declaration. */
product: string
/** What they get, written as the clause after "I understand that". */
includes?: React.ReactNode
/** Payment terms, written as the clause after "I understand that". */
payment?: React.ReactNode
/** Guarantee name, e.g. "30-day money-back guarantee". */
guarantee?: string
/** Replaces the lines built from includes, payment and guarantee; each is the clause after "I understand that". */
confirmations?: React.ReactNode[]
/** Today's price on the starburst sticker; omitted hides the sticker. */
price?: string
/** Clipboard or product cut-out (slot product), transparent background. */
productImage?: string
productAlt?: string
/** Transparent starburst art (slot stamp) used only as the sticker's shape; its fill follows the theme. */
stickerShape?: string
imageCaption?: string
/** The owner's short letter and sign-off, shown before the action. */
letter?: YesOrderBox2Letter
label?: string
/** One short line under the button. */
reassurance?: string
copy?: Partial<YesOrderBox2Copy>
headingLevel?: 2 | 3
href?: string
/** Called once every line is ticked; a returned promise shows the loading label, a rejection shows copy.failed. */
onAction?: () => void | Promise<void>
disabled?: boolean
state?: YesOrderBox2State
className?: string
style?: React.CSSProperties
}
const DEFAULT_COPY: YesOrderBox2Copy = {
yes: 'YES!',
declaration: 'I’m ready to join {product}.',
understand: 'I understand that',
line: '{understand} {line}',
guaranteeLine: '{understand} I’m covered by the {guarantee}.',
prompt: 'Tick each line to confirm:',
count: '{done} of {total} confirmed',
incomplete: 'Tick all {total} lines above to confirm your order.',
instruction: 'Click the button below to get instant access.',
loading: 'Opening secure checkout…',
failed: 'We couldn’t open checkout. Please try again.',
priceLabel: 'Today',
}
const SIGNATURE_FONT = 'https://fonts.googleapis.com/css2?family=Mrs+Saint+Delafield&display=swap'
export function YesOrderBox2({
product,
includes,
payment,
guarantee,
confirmations,
price,
productImage,
productAlt = '',
stickerShape,
imageCaption,
letter,
label = 'Order now',
reassurance,
copy,
headingLevel = 2,
href,
onAction,
disabled = false,
state = 'default',
className,
style,
}: YesOrderBox2Props) {
const text = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const ids = { h: `${uid}-h`, count: `${uid}-count`, err: `${uid}-err` }
const H = headingLevel === 3 ? 'h3' : 'h2'
const lead = <strong className='yb2-lead'>{text.understand}</strong>
const clauses = confirmations ?? [includes, payment].filter(isPresent)
const lines: React.ReactNode[] = clauses.map((clause) => fill(text.line, { understand: lead, line: clause }))
if (!confirmations && guarantee) lines.push(fill(text.guaranteeLine, { understand: lead, guarantee }))
const total = lines.length
const [checked, setChecked] = React.useState<boolean[]>(() => seed(state, total))
const [nudge, setNudge] = React.useState(state === 'error')
const [status, setStatus] = React.useState<'idle' | 'loading' | 'failed'>('idle')
const inputs = React.useRef<(HTMLInputElement | null)[]>([])
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
setChecked(seed(state, total))
setNudge(state === 'error')
setStatus('idle')
}, [state, total])
const done = checked.slice(0, total).filter(Boolean).length
const ready = total === 0 || done === total
const pending = status === 'loading' || state === 'disabled'
const off = disabled || pending
const force = state === 'hover' || state === 'active' ? state : undefined
const incomplete = nudge && !ready
const showErr = incomplete || status === 'failed'
const errMessage = status === 'failed' ? text.failed : fillText(text.incomplete, { total })
const describedBy = [total ? ids.count : '', showErr ? ids.err : ''].filter(Boolean).join(' ') || undefined
const toggle = (index: number) => {
setChecked((prev) => prev.map((value, i) => (i === index ? !value : value)))
if (status === 'failed') setStatus('idle')
}
const act = (event: React.MouseEvent<HTMLElement>) => {
if (off) {
event.preventDefault()
return
}
if (!ready) {
event.preventDefault()
setNudge(true)
inputs.current[checked.findIndex((value) => !value)]?.focus()
return
}
if (!onAction) return
if (!href) event.preventDefault()
setStatus('idle')
let result: unknown
try {
result = onAction()
} catch {
setStatus('failed')
return
}
if (result && typeof (result as Promise<void>).then === 'function') {
setStatus('loading')
;(result as Promise<void>).then(
() => {
if (alive.current) setStatus('idle')
},
() => {
if (alive.current) setStatus('failed')
},
)
}
}
const shapeStyle = stickerShape
? ({
WebkitMaskImage: `url("${stickerShape}")`,
maskImage: `url("${stickerShape}")`,
WebkitMaskSize: 'contain',
maskSize: 'contain',
WebkitMaskRepeat: 'no-repeat',
maskRepeat: 'no-repeat',
WebkitMaskPosition: 'center',
maskPosition: 'center',
} as React.CSSProperties)
: undefined
const content = pending ? (
<>
<Loader2 className='yb2-spin' size={20} strokeWidth={2.5} aria-hidden />
<span>{text.loading}</span>
</>
) : (
<span>{label}</span>
)
const typedSignature = Boolean(letter?.signature && !letter?.signatureImage)
return (
<section
className={['cf-yes-order-box-2', className].filter(Boolean).join(' ')}
style={{ ...FX_HOST, ...style }}
aria-labelledby={ids.h}
data-state={state}
>
<style>{css}</style>
{typedSignature ? <link rel='stylesheet' href={SIGNATURE_FONT} /> : null}
<Pattern name='grid' fade='edges' />
<div className='yb2-wrap'>
<div className='yb2-side'>
{productImage || price ? (
<figure className='yb2-media'>
{productImage ? (
<div className='yb2-frame'>
<img src={productImage} alt={productAlt} width={1024} height={1024} decoding='async' fetchPriority='high' />
</div>
) : null}
{price ? (
<div className='yb2-burst' data-shape={stickerShape ? 'burst' : 'tag'} data-solo={productImage ? undefined : ''}>
<span className='yb2-burst-fill' style={shapeStyle} aria-hidden />
<span className='yb2-burst-text'>
<span className='yb2-burst-label'>{text.priceLabel}</span>
<span className='yb2-price'>{price}</span>
</span>
</div>
) : null}
{imageCaption ? <figcaption className='yb2-cap'>{imageCaption}</figcaption> : null}
</figure>
) : null}
{letter ? (
<div className='yb2-letter'>
{letter.salutation ? <p className='yb2-salute'>{letter.salutation}</p> : null}
{letter.paragraphs?.map((paragraph, i) => <p key={i}>{paragraph}</p>)}
{letter.signature || letter.signatureImage || letter.name ? (
<div className='yb2-sign'>
{letter.signatureImage ? (
<img className='yb2-sig-img' src={letter.signatureImage} alt={letter.name ? `${letter.name} signature` : ''} width={480} height={160} loading='lazy' decoding='async' />
) : letter.signature ? (
<p className='yb2-sig' aria-hidden={letter.name ? true : undefined}>{letter.signature}</p>
) : null}
{letter.name ? <p className='yb2-name'>{letter.name}</p> : null}
{letter.role ? <p className='yb2-role'>{letter.role}</p> : null}
</div>
) : null}
</div>
) : null}
</div>
<div className='yb2-card'>
<H className='yb2-h' id={ids.h}>
<span className='yb2-yes'>{text.yes}</span> {fill(text.declaration, { product: <span className='yb2-mark'>{product}</span> })}
</H>
{total ? (
<fieldset className='yb2-set' disabled={off} aria-describedby={incomplete ? ids.err : undefined}>
<legend className='yb2-prompt'>{text.prompt}</legend>
<ul className='yb2-list'>
{lines.map((line, i) => {
const on = Boolean(checked[i])
const bad = incomplete && !on
return (
<li key={i}>
<label
className='yb2-row'
data-on={on ? '' : undefined}
data-bad={bad ? '' : undefined}
style={{ '--i': i } as React.CSSProperties}
>
<input
ref={(el) => {
inputs.current[i] = el
}}
className='yb2-input'
type='checkbox'
checked={on}
onChange={() => toggle(i)}
aria-invalid={bad || undefined}
/>
<span className='yb2-badge' aria-hidden>
<Check size={18} strokeWidth={3} />
</span>
<span className='yb2-line'>{line}</span>
</label>
</li>
)
})}
</ul>
</fieldset>
) : null}
<div className='yb2-close'>
{total ? (
<div className='yb2-meter'>
<p className='yb2-count' id={ids.count} data-done={ready ? '' : undefined} role='status' aria-live='polite'>
{ready ? <Check className='yb2-ico' size={16} strokeWidth={2.5} aria-hidden /> : null}
{fillText(text.count, { done, total })}
</p>
<span className='yb2-segs' aria-hidden>
{Array.from({ length: total }, (_, i) => (
<span key={i} className='yb2-seg' data-on={i < done ? '' : undefined} />
))}
</span>
</div>
) : null}
{showErr ? (
<p className='yb2-err' id={ids.err} role='alert'>
<AlertCircle className='yb2-ico' size={16} strokeWidth={2.5} aria-hidden />
{errMessage}
</p>
) : null}
<p className='yb2-instr'>{text.instruction}</p>
{href ? (
<a
className='yb2-btn'
href={off ? undefined : href}
data-ready={ready ? 'true' : 'false'}
data-force={force}
aria-busy={pending || undefined}
aria-disabled={off || undefined}
aria-describedby={describedBy}
onClick={act}
>
{content}
</a>
) : (
<button
type='button'
className='yb2-btn'
disabled={off}
data-ready={ready ? 'true' : 'false'}
data-force={force}
aria-busy={pending || undefined}
aria-describedby={describedBy}
onClick={act}
>
{content}
</button>
)}
{reassurance ? (
<p className='yb2-note'>
<Lock size={16} strokeWidth={2.5} aria-hidden />
{reassurance}
</p>
) : null}
</div>
</div>
</div>
</section>
)
}
export default YesOrderBox2
function seed(state: YesOrderBox2State, n: number) {
return Array.from({ length: n }, (_, i) =>
state === 'error' ? i === 0 : state === 'hover' || state === 'active' || state === 'disabled',
)
}
function isPresent(value: React.ReactNode): value is React.ReactNode {
return value !== undefined && value !== null && value !== '' && value !== false
}
function fill(template: string, vars: Record<string, React.ReactNode>): React.ReactNode[] {
return template.split(/(\{\w+\})/).map((part, i) => {
const key = part.startsWith('{') && part.endsWith('}') ? part.slice(1, -1) : ''
return key && key in vars ? <React.Fragment key={i}>{vars[key]}</React.Fragment> : part
})
}
function fillText(template: string, vars: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in vars ? String(vars[key]) : match))
}
const R = '.cf-yes-order-box-2'
const css = `
${R}{--yb2-btn:var(--button-bg,var(--cta));--yb2-btn-2:var(--button-bg-2,var(--cta-2));--yb2-btn-ink:var(--button-ink,var(--cta-ink));--yb2-shadow:var(--shadow,oklch(0.22 0.03 260));--yb2-marker:color-mix(in oklch,var(--marker,#fae37c) 82%,transparent);--yb2-focus:var(--field-focus,var(--accent));--yb2-sticker:var(--sticker,var(--accent-fill,var(--accent)));--yb2-sticker-ink:var(--sticker-ink,var(--accent-fill-ink,var(--card)));--yb2-tick-ink:var(--badge-ink,#fff);--signature-font:var(--signature-face,'Mrs Saint Delafield',var(--font-display));position:relative;box-sizing:border-box;width:100%;overflow:hidden;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);background:var(--band);color:var(--band-ink);font-family:var(--font-body);line-height:1.5;-webkit-font-smoothing:antialiased}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} :where(p,h2,h3,ul,li,figure,fieldset,legend){margin:0}
${R} .yb2-wrap{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:clamp(32px,5vw,72px);align-items:start;max-width:1120px;margin:0 auto}
${R} .yb2-side{display:grid;gap:32px;min-width:0}
${R} .yb2-media{position:relative;display:grid;gap:12px;min-width:0}
${R} .yb2-frame{position:relative}
${R} .yb2-frame img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;object-position:center;filter:drop-shadow(0 2px 3px oklch(from var(--yb2-shadow) calc(l - 0.06) c h / 0.5)) drop-shadow(0 18px 22px oklch(from var(--yb2-shadow) calc(l - 0.06) c h / 0.45))}
${R} .yb2-cap{text-align:center;font-size:0.9375rem;font-weight:600;line-height:1.4;color:color-mix(in oklch,var(--band-ink) 86%,var(--band));text-wrap:pretty}
${R} .yb2-burst{position:absolute;top:0;right:0;z-index:2;display:grid;place-items:center;width:clamp(104px,11vw,148px);aspect-ratio:1;transform:rotate(-10deg);filter:drop-shadow(0 2px 2px oklch(from var(--yb2-shadow) l c h / 0.45)) drop-shadow(0 10px 14px oklch(from var(--yb2-shadow) l c h / 0.35))}
${R} .yb2-burst[data-solo]{position:relative;justify-self:start}
${R} .yb2-burst-fill{position:absolute;inset:0;background:linear-gradient(160deg,oklch(from var(--yb2-sticker) calc(l + 0.03) c h),oklch(from var(--yb2-sticker) calc(l - 0.04) c h))}
${R} .yb2-burst[data-shape='tag']{width:auto;aspect-ratio:auto;padding:14px 20px}
${R} .yb2-burst[data-shape='tag'] .yb2-burst-fill{border-radius:var(--radius,12px)}
${R} .yb2-burst-text{position:relative;display:grid;justify-items:center;gap:12px;text-align:center;line-height:1;color:var(--yb2-sticker-ink)}
${R} .yb2-burst-label{display:block;font-size:0.875rem;font-weight:800;line-height:1;letter-spacing:0.08em;text-transform:uppercase}
${R} .yb2-price{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.375rem,2vw,1.875rem);letter-spacing:-0.03em;font-variant-numeric:tabular-nums;white-space:nowrap}
${R} .yb2-letter{display:grid;gap:12px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.55;color:var(--band-ink)}
${R} .yb2-letter p{text-wrap:pretty}
${R} .yb2-salute{font-weight:700}
${R} .yb2-sign{display:grid;gap:2px;margin-top:8px}
${R} .yb2-sig{font-family:var(--signature-font);font-size:clamp(2.5rem,3.6vw,3rem);font-weight:400;line-height:1.1;color:var(--signature-ink,var(--band-ink))}
${R} .yb2-sig-img{display:block;width:auto;height:64px;max-width:240px;object-fit:contain}
${R} .yb2-name{font-size:0.9375rem;font-weight:800;line-height:1.4}
${R} .yb2-role{font-size:0.9375rem;font-weight:500;line-height:1.4;color:color-mix(in oklch,var(--band-ink) 86%,var(--band))}
${R} .yb2-card{min-width:0;padding:clamp(24px,3.4vw,44px);background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--yb2-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--yb2-shadow) l c h / 0.32)))}
${R} .yb2-h{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--ink);text-wrap:balance}
${R} .yb2-yes{color:var(--accent)}
${R} .yb2-mark{color:var(--marker-ink,var(--ink));background:linear-gradient(var(--yb2-marker),var(--yb2-marker)) 0 86% / 100% 58% no-repeat;padding:0 0.1em;margin:0 -0.04em;border-radius:0.14em 0.36em 0.22em 0.4em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
${R} .yb2-set{min-width:0;margin-top:clamp(18px,2vw,24px);padding:0;border:0}
${R} .yb2-prompt{float:left;width:100%;padding:0;margin-bottom:12px;font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
${R} .yb2-list{clear:both;display:grid;gap:10px;padding:0;list-style:none}
${R} .yb2-row{position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);gap:14px;align-items:start;min-height:60px;padding:14px 16px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card));border:1px solid oklch(from var(--ink) l c h / 0.08);cursor:pointer;transition:background-color .16s ease,border-color .16s ease}
${R} .yb2-row:hover{background:color-mix(in oklch,var(--ink) 7%,var(--card))}
${R} .yb2-row[data-on]{background:var(--success-soft);border-color:oklch(from var(--success) l c h / 0.45)}
${R} .yb2-row[data-bad]{border-color:var(--danger)}
${R} .yb2-set:disabled .yb2-row{cursor:not-allowed}
${R} .yb2-input{position:absolute;top:14px;left:16px;width:32px;height:32px;margin:0;opacity:0;cursor:inherit}
${R} .yb2-badge{display:grid;place-items:center;width:32px;height:32px;border-radius:999px;background:var(--field,var(--card));border:2px solid oklch(from var(--ink) l c h / 0.45);transition:background-color .16s ease,border-color .16s ease}
${R} .yb2-badge svg{opacity:0;transform:scale(.6);transition:opacity .16s ease,transform .16s ease}
${R} .yb2-input:checked+.yb2-badge{background:var(--success);border-color:var(--success);color:var(--yb2-tick-ink)}
${R} .yb2-input:checked+.yb2-badge svg{opacity:1;transform:none}
${R} .yb2-row[data-bad] .yb2-badge{border-color:var(--danger)}
${R} .yb2-input:focus-visible+.yb2-badge{outline:3px solid oklch(from var(--yb2-focus) l c h / 0.6);outline-offset:3px}
${R} .yb2-row:has(.yb2-input:focus-visible){border-color:var(--yb2-focus)}
${R} .yb2-line{padding-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;color:var(--ink);text-wrap:pretty}
${R} .yb2-lead{font-weight:800}
${R} .yb2-close{display:grid;gap:12px;margin-top:24px}
${R} .yb2-meter{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
${R} .yb2-count{font-size:0.9375rem;font-weight:800;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--ink)}
${R} .yb2-count[data-done]{color:var(--success)}
${R} .yb2-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em}
${R} .yb2-segs{display:flex;gap:6px;width:min(180px,40%)}
${R} .yb2-seg{position:relative;flex:1;height:8px;overflow:hidden;border-radius:999px;background:color-mix(in oklch,var(--ink) 12%,var(--card))}
${R} .yb2-seg::after{content:'';position:absolute;inset:0;background:var(--success);transform:scaleX(0);transform-origin:left center;transition:transform .3s cubic-bezier(.2,.7,.2,1)}
${R} .yb2-seg[data-on]::after{transform:none}
${R} .yb2-err{padding:10px 14px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:0.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
${R} .yb2-instr{margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.4;color:var(--ink);text-wrap:pretty}
${R} .yb2-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:72px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));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;text-wrap:balance;color:var(--yb2-btn-ink);text-shadow:var(--button-text-shadow,none);cursor:pointer;background:linear-gradient(oklch(from var(--yb2-btn) calc(l + 0.04) c h),oklch(from var(--yb2-btn-2) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--yb2-btn) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--yb2-btn) calc(l - 0.16) c h),0 1px 2px oklch(from var(--yb2-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--yb2-shadow) l c h / 0.45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
${R} .yb2-btn[data-ready='false']{box-shadow:inset 0 1px 0 oklch(from var(--yb2-btn) calc(l + 0.14) c h / 0.6),inset 0 -2px 0 oklch(from var(--yb2-btn) calc(l - 0.12) c h),0 1px 2px oklch(from var(--yb2-shadow) l c h / 0.25)}
${R} .yb2-btn[data-ready='true']:not(:disabled):not([aria-busy]):hover,${R} .yb2-btn[data-ready='true'][data-force='hover']{transform:translateY(-1px);background:linear-gradient(oklch(from var(--yb2-btn) calc(l - 0.01) c h),oklch(from var(--yb2-btn-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--yb2-btn) calc(l + 0.1) c h / 0.6),inset 0 -3px 0 oklch(from var(--yb2-btn) calc(l - 0.2) c h),0 1px 2px oklch(from var(--yb2-shadow) l c h / 0.35),0 12px 20px -8px oklch(from var(--yb2-shadow) l c h / 0.55)}
${R} .yb2-btn[data-ready='false']:not(:disabled):hover,${R} .yb2-btn[data-ready='false'][data-force='hover']{background:linear-gradient(oklch(from var(--yb2-btn) calc(l - 0.01) c h),oklch(from var(--yb2-btn-2) calc(l - 0.07) c h))}
${R} .yb2-btn:not(:disabled):not([aria-busy]):active,${R} .yb2-btn[data-force='active']{transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--yb2-btn) calc(l - 0.22) c h / 0.55),inset 0 -2px 0 oklch(from var(--yb2-btn) calc(l - 0.16) c h),0 1px 1px oklch(from var(--yb2-shadow) l c h / 0.3)}
${R} .yb2-btn:focus-visible{outline:3px solid oklch(from var(--yb2-focus) l c h / 0.6);outline-offset:3px}
${R} .yb2-btn[aria-busy]{cursor:progress}
${R} a.yb2-btn[aria-disabled='true']{pointer-events:none}
${R} .yb2-btn:disabled:not([aria-busy]),${R} a.yb2-btn[aria-disabled='true']:not([aria-busy]){cursor:not-allowed;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
${R} .yb2-spin{flex:none;animation:yb2-spin .8s linear infinite}
${R} .yb2-note{text-align:center;font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:balance}
${R} .yb2-note svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em}
@media (max-width:860px){
${R} .yb2-wrap{grid-template-columns:minmax(0,1fr);gap:24px}
${R} .yb2-side{gap:20px}
${R} .yb2-media{width:100%;max-width:300px;margin-inline:auto}
${R} .yb2-burst{top:0;right:-8px}
}
@media (max-width:480px){
${R} .yb2-card{padding:22px 18px}
${R} .yb2-row{gap:12px;padding:12px 14px}
${R} .yb2-input{top:12px;left:14px}
${R} .yb2-btn{padding:0 20px}
${R} .yb2-burst{width:112px}
${R} .yb2-segs{width:100%}
}
@media (prefers-reduced-motion:no-preference){
${R} .yb2-card,${R} .yb2-media{animation:yb2-in .45s cubic-bezier(.2,.7,.2,1) both}
${R} .yb2-row{animation:yb2-in .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--i,0),4) * .07s)}
${R} .yb2-burst{animation:yb2-burst .3s cubic-bezier(.2,.7,.2,1) .2s both}
${R} .yb2-input:checked+.yb2-badge{animation:yb2-pop .3s cubic-bezier(.2,.7,.2,1)}
${R} .yb2-btn[data-ready='true']{animation:yb2-settle .3s cubic-bezier(.2,.7,.2,1)}
}
@media (prefers-reduced-motion:reduce){
${R} *,${R} *::before,${R} *::after{transition:none!important;animation:none!important}
}
@keyframes yb2-in{from{opacity:.82;transform:translateY(8px)}}
@keyframes yb2-pop{from{transform:scale(.9)}}
@keyframes yb2-burst{from{transform:rotate(-10deg) scale(.9)}to{transform:rotate(-10deg) scale(1)}}
@keyframes yb2-settle{from{transform:scale(.985)}}
@keyframes yb2-spin{to{transform:rotate(360deg)}}
`
pieces/offer/yes-order-box-2/specimen.tsx 50 lines
import __studioImage496feec3 from "../assets/631b47f432b2e8d4.webp";
import __studioImagea2c36e5f from "../assets/bc4c870233f7f738.webp";
// Specimen: the Apex Agency Accelerator enrolment sign-off (fictional 6-month group coaching programme).
import * as React from 'react'
import { YesOrderBox2, type YesOrderBox2State } from '../yes-order-box-2'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function YesOrderBox2Specimen({ state = 'default' }: { state?: YesOrderBox2State }) {
const guarantee = defaults.sample.guarantee
return (
<YesOrderBox2
state={state}
product='Apex Agency Accelerator'
includes='I get 6 months of weekly live group coaching, the Apex client playbook and the private member community.'
payment='my enrolment is $4,997 today, or 6 monthly payments of $897.'
guarantee={guarantee}
price='$4,997'
productImage={slot(
'product',
__studioImage496feec3,
)}
productAlt='Clipboard holding a ticked three-point enrolment checklist'
stickerShape={slot(
'stamp',
__studioImagea2c36e5f,
)}
imageCaption='Your 6-month Accelerator enrolment'
letter={{
salutation: 'Dear agency owner,',
paragraphs: [
'You’ve seen the plan. Now it’s your decision, and I want you to make it with your eyes open.',
'Tick each line on your enrolment form. Then I’ll see you on our first group call.',
],
signature: 'Rhea Calder',
name: 'Rhea Calder',
role: 'Head Coach, Apex Agency Accelerator',
}}
label='Enrol now'
reassurance={`Secure checkout · ${guarantee}`}
copy={{
declaration: 'I’m ready to join the {product}.',
incomplete: 'Tick all {total} lines above to confirm your enrolment.',
instruction: 'Click the button below to start your enrolment.',
}}
/>
)
}
| Name | Type | Details |
|---|---|---|
product RequiredYesOrderBox2 |
string |
|
includes OptionalYesOrderBox2 |
React.ReactNode |
|
payment OptionalYesOrderBox2 |
React.ReactNode |
|
guarantee OptionalYesOrderBox2 |
string |
|
confirmations OptionalYesOrderBox2 |
React.ReactNode[] |
|
price OptionalYesOrderBox2 |
string |
|
productImage OptionalYesOrderBox2 |
string |
|
productAlt OptionalYesOrderBox2 |
string |
Default ''
|
stickerShape OptionalYesOrderBox2 |
string |
|
imageCaption OptionalYesOrderBox2 |
string |
|
letter OptionalYesOrderBox2 |
YesOrderBox2Letter |
|
label OptionalYesOrderBox2 |
string |
Default 'Order now'
|
reassurance OptionalYesOrderBox2 |
string |
|
copy OptionalYesOrderBox2 |
Partial<YesOrderBox2Copy> |
|
headingLevel OptionalYesOrderBox2 |
2 | 3 |
Default 2
|
href OptionalYesOrderBox2 |
string |
|
onAction OptionalYesOrderBox2 |
() => void | Promise<void> |
|
disabled OptionalYesOrderBox2 |
boolean |
Default false
|
state OptionalYesOrderBox2 |
YesOrderBox2State |
Default 'default'
|
className OptionalYesOrderBox2 |
string |
|
style OptionalYesOrderBox2 |
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-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-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.
product- The main product shot or cover (ebook, kit, bottle).
stamp- A stamp or badge graphic, on a transparent background.
-
631b47f432b2e8d4.webp
image/webp · 111 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
bc4c870233f7f738.webp
image/webp · 71.8 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB