Product Selector 10
Product chooser on a numbered rail: big tappable rows with a hang-tag price. The chosen row lifts, its tag swings straight, and the button names the product the buyer chose.
Use it in a prompt
Use offer/product-selector-10 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/product-selector-10.tsx. - Import it and pass your copy and images (Props tab):
import { ProductSelector10 } from "@/components/funneldna/offer/product-selector-10"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/product-selector-10/component.tsx 408 lines
// layout: number-rail
// Product chooser on a numbered rail: big tappable rows with a hang-tag price. The chosen row lifts, its tag swings straight, and the button names the product the buyer chose.
import * as React from 'react'
import { AlertCircle, Check, Download, Lock, ShieldCheck, ShoppingBag } from 'lucide-react'
export type ProductSelector10Option = {
id: string
name: string
/** One-line benefit under the name. */
benefit?: string
/** Supplied price, shown exactly as written (e.g. $47). */
price: string
/** Supplied regular price, struck through in marker on the tag. Empty hides it. */
regularPrice?: string
/** Product image; fills a square frame (object-fit: cover). */
image: string
imageAlt?: string
}
export type ProductSelector10State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type ProductSelector10Props = {
/** 2 to 4 products or packages, numbered down the rail in this order. */
options: ProductSelector10Option[]
/** Preselected option id. Defaults to the first option; pass null for none. */
defaultSelectedId?: string | null
headline?: string
/** One phrase inside the headline that gets the marker stroke. */
headlineEmphasis?: string
subhead?: string
/** Screen-reader label for the option group. */
legend?: string
/** Line on a row that is not chosen. */
selectLabel?: string
/** Line on the chosen row. */
selectedLabel?: string
/** Screen-reader words before the struck price. */
regularPriceLabel?: string
/** Screen-reader words before today's price. */
todayPriceLabel?: string
/** Button label; {name} and {price} are replaced with the chosen option. */
buttonLabel?: string
emptyButtonLabel?: string
/** First item of the line under the button; {price} is set in bold. Empty hides it. */
priceLine?: string
/** Short supplied reassurance lines under the button. */
reassurance?: string[]
errorMessage?: string
disabledNote?: string
disabled?: boolean
inputName?: string
/** Studio/demo state driver. */
state?: ProductSelector10State
onSelect?: (option: ProductSelector10Option) => void
/** Receives the chosen option on submit. Never sends data by itself. */
onSubmit?: (option: ProductSelector10Option) => void
className?: string
}
export function ProductSelector10({
options,
defaultSelectedId,
headline = 'Choose the one you want',
headlineEmphasis,
subhead = '',
legend = 'Choose one option',
selectLabel = 'Choose this',
selectedLabel = 'Your pick',
regularPriceLabel = 'Regular price',
todayPriceLabel = 'today',
buttonLabel = 'Yes! I Want {name}',
emptyButtonLabel = 'Yes! Add It To My Order',
priceLine = '{price} today',
reassurance = [],
errorMessage = 'Choose one of the options above, then tap the button.',
disabledNote = 'Adding to your order is unavailable right now.',
disabled = false,
inputName,
state = 'default',
onSelect,
onSubmit,
className = '',
}: ProductSelector10Props) {
const list = (options ?? []).slice(0, 4)
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, '')
const group = inputName ?? `ps10-${uid}`
const titleId = `ps10-title-${uid}`
const errId = `ps10-err-${uid}`
const assureId = `ps10-assure-${uid}`
const noteId = `ps10-note-${uid}`
const firstId = defaultSelectedId === undefined ? list[0]?.id ?? null : defaultSelectedId
const [selectedId, setSelectedId] = React.useState<string | null>(state === 'error' ? null : firstId)
const [error, setError] = React.useState(state === 'error')
React.useEffect(() => {
setSelectedId(state === 'error' ? null : firstId)
setError(state === 'error')
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
if (list.length === 0) return null
const isDisabled = disabled || state === 'disabled'
const selected = list.find((o) => o.id === selectedId) ?? null
const force = state === 'hover' || state === 'active' ? state : undefined
const demoHoverId = state === 'hover' ? list.find((o) => o.id !== selectedId)?.id : undefined
const label = selected ? fill(buttonLabel, selected) : emptyButtonLabel
const priceParts = selected && priceLine ? priceLine.split('{price}') : null
const showAssure = !isDisabled && (Boolean(priceParts) || reassurance.length > 0)
const describedBy =
[error ? errId : '', showAssure ? assureId : '', isDisabled ? noteId : ''].filter(Boolean).join(' ') || undefined
const choose = (option: ProductSelector10Option) => {
if (isDisabled) return
setSelectedId(option.id)
if (error) setError(false)
onSelect?.(option)
}
const submit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault()
if (isDisabled) return
if (!selected) {
setError(true)
return
}
onSubmit?.(selected)
}
return (
<div
className={`cf-product-selector-10 ${className}`.trim()}
data-force={force}
data-error={error ? 'true' : 'false'}
data-disabled={isDisabled ? 'true' : 'false'}
>
<style>{CSS}</style>
<form className='ps10-form' onSubmit={submit} noValidate aria-labelledby={titleId}>
<div className='ps10-head'>
<h2 id={titleId} className='ps10-title'>
<Headline text={headline} emphasis={headlineEmphasis} />
</h2>
{subhead ? <p className='ps10-sub'>{subhead}</p> : null}
</div>
<fieldset className='ps10-fieldset' disabled={isDisabled} aria-describedby={error ? errId : undefined}>
<legend className='ps10-sr'>{legend}</legend>
<ol className='ps10-list'>
{list.map((option, i) => {
const on = option.id === selectedId
const n = `${uid}-${i}`
const nameId = `ps10-name-${n}`
const benefitId = `ps10-ben-${n}`
const priceId = `ps10-price-${n}`
return (
<li key={option.id} className='ps10-item' style={{ '--ps10-i': i } as React.CSSProperties}>
<label
className='ps10-row'
data-selected={on ? 'true' : 'false'}
data-demo-hover={option.id === demoHoverId ? 'true' : undefined}
>
<input
className='ps10-sr ps10-input'
type='radio'
name={group}
value={option.id}
checked={on}
onChange={() => choose(option)}
aria-labelledby={nameId}
aria-describedby={[option.benefit ? benefitId : '', priceId].filter(Boolean).join(' ')}
/>
<span className='ps10-rail' aria-hidden='true'>
<span className='ps10-num'>{i + 1}</span>
<span className='ps10-seg' />
</span>
<span className='ps10-card'>
<span className='ps10-media'>
<img
src={option.image}
alt={option.imageAlt ?? ''}
width={256}
height={256}
loading='lazy'
decoding='async'
draggable={false}
/>
</span>
<span id={nameId} className='ps10-name'>
{option.name}
</span>
{option.benefit ? (
<span id={benefitId} className='ps10-benefit'>
{option.benefit}
</span>
) : null}
<span className='ps10-pick' aria-hidden='true'>
<span className='ps10-dot'>
<Check size={16} strokeWidth={3} />
</span>
{on ? selectedLabel : selectLabel}
</span>
<span id={priceId} className='ps10-tag'>
{option.regularPrice ? (
<>
<span className='ps10-sr'>{regularPriceLabel} </span>
<s className='ps10-was'>{option.regularPrice}</s>
<span className='ps10-sr'>, {todayPriceLabel} </span>
</>
) : null}
<span className='ps10-now'>{option.price}</span>
</span>
</span>
</label>
</li>
)
})}
</ol>
</fieldset>
<div className='ps10-close'>
<span className='ps10-close-rail' aria-hidden='true'>
<span className='ps10-close-seg' />
<span className='ps10-disc'>
<ShoppingBag size={20} strokeWidth={2.5} />
</span>
</span>
<div className='ps10-action'>
<button type='submit' className='ps10-btn' disabled={isDisabled} aria-describedby={describedBy}>
{label}
</button>
{error ? (
<p id={errId} className='ps10-error' role='alert'>
<AlertCircle className='ps10-ico' size={18} strokeWidth={2.5} aria-hidden='true' />
{errorMessage}
</p>
) : null}
{isDisabled ? (
<p id={noteId} className='ps10-assure'>
<Lock className='ps10-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{disabledNote}
</p>
) : null}
{showAssure ? (
<p id={assureId} className='ps10-assure'>
{priceParts && selected ? (
<span className='ps10-assure-item'>
{priceParts.map((part, k) => (
<React.Fragment key={k}>
{k > 0 ? <b>{selected.price}</b> : null}
{part}
</React.Fragment>
))}
</span>
) : null}
{reassurance.map((line) => (
<span key={line} className='ps10-assure-item'>
<AssureIcon text={line} />
{line}
</span>
))}
</p>
) : null}
</div>
</div>
</form>
</div>
)
}
export default ProductSelector10
function fill(template: string, option: ProductSelector10Option) {
return template.split('{name}').join(option.name).split('{price}').join(option.price)
}
function Headline({ text, emphasis }: { text: string; emphasis?: string }) {
if (!emphasis || !text.includes(emphasis)) return <>{text}</>
const at = text.indexOf(emphasis)
return (
<>
{text.slice(0, at)}
<span className='ps10-mark'>{emphasis}</span>
{text.slice(at + emphasis.length)}
</>
)
}
function AssureIcon({ text }: { text: string }) {
const props = { className: 'ps10-ico', size: 16, strokeWidth: 2.5, 'aria-hidden': true as const }
if (/guarantee|money|refund/i.test(text)) return <ShieldCheck {...props} />
if (/secure|checkout|safe/i.test(text)) return <Lock {...props} />
if (/access|download|instant/i.test(text)) return <Download {...props} />
return <Check {...props} />
}
const CSS = `
.cf-product-selector-10 {
--ps10-shadow: var(--shadow, oklch(0.22 0.03 260));
--ps10-marker: color-mix(in oklch, var(--marker, #fae37c) 85%, transparent);
--ps10-hair: oklch(from var(--ink) l c h / 0.14);
--ps10-rail: clamp(44px, 7vw, 84px);
--ps10-gap: clamp(12px, 2vw, 24px);
--ps10-pad: clamp(18px, 2.4vw, 28px);
--ps10-img: clamp(76px, 11vw, 128px);
--ps10-step: 16px;
container: ps10 / inline-size;
width: 100%;
max-width: 920px;
margin-inline: auto;
color: var(--ink);
font-family: var(--font-body);
-webkit-font-smoothing: antialiased;
}
.cf-product-selector-10 *, .cf-product-selector-10 *::before, .cf-product-selector-10 *::after { box-sizing: border-box; }
.cf-product-selector-10 .ps10-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.cf-product-selector-10 .ps10-form { margin: 0; }
.cf-product-selector-10 .ps10-head { margin: 0 0 clamp(24px, 3.4vw, 40px); }
.cf-product-selector-10 .ps10-title { margin: 0; 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; }
.cf-product-selector-10 .ps10-mark { background-image: linear-gradient(180deg, transparent 0 50%, var(--ps10-marker) 50% 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 0.12em; margin: 0 -0.06em; border-radius: 0.1em 0.32em 0.16em 0.4em; }
.cf-product-selector-10 .ps10-sub { margin: 14px 0 0; max-width: 60ch; font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.4; font-weight: 500; color: var(--muted); text-wrap: pretty; }
.cf-product-selector-10 .ps10-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.cf-product-selector-10 .ps10-list { list-style: none; margin: 0; padding: 0; }
.cf-product-selector-10 .ps10-item { padding-bottom: var(--ps10-step); }
.cf-product-selector-10 .ps10-row { position: relative; display: grid; grid-template-columns: var(--ps10-rail) minmax(0, 1fr); column-gap: var(--ps10-gap); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cf-product-selector-10 .ps10-rail { display: flex; flex-direction: column; align-items: center; padding-top: calc(var(--ps10-pad) - 4px); }
.cf-product-selector-10 .ps10-num { display: block; font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(2.75rem, 5.4vw, 4.25rem); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--muted); }
.cf-product-selector-10 .ps10-seg { flex: 1 1 auto; width: 2px; min-height: 12px; margin-top: 10px; margin-bottom: calc(-1 * (var(--ps10-step) + var(--ps10-pad) - 14px)); border-radius: 2px; background: var(--ps10-hair); }
.cf-product-selector-10 .ps10-item:last-child .ps10-seg { margin-bottom: calc(-1 * var(--ps10-step)); }
.cf-product-selector-10 .ps10-card { --ps10-row-bg: var(--card); position: relative; display: grid; grid-template-columns: var(--ps10-img) minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; grid-template-areas: 'media name tag' 'media benefit tag' 'media pick tag'; column-gap: clamp(16px, 2.4vw, 28px); row-gap: 6px; align-items: start; min-width: 0; padding: var(--ps10-pad); background: var(--ps10-row-bg); 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-sm, 0 1px 2px oklch(from var(--ps10-shadow) l c h / 0.2))); }
.cf-product-selector-10 .ps10-media { grid-area: media; display: block; width: var(--ps10-img); aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: color-mix(in oklch, var(--ink) 4%, var(--card)); }
.cf-product-selector-10 .ps10-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cf-product-selector-10 .ps10-name { grid-area: name; display: block; font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.cf-product-selector-10 .ps10-benefit { grid-area: benefit; display: block; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.cf-product-selector-10 .ps10-pick { grid-area: pick; justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.9375rem; font-weight: 700; line-height: 1.2; color: var(--muted); }
.cf-product-selector-10 .ps10-dot { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 999px; border: 2px solid oklch(from var(--ink) l c h / 0.3); color: transparent; }
.cf-product-selector-10 .ps10-tag { --ps10-tilt: -3deg; grid-area: tag; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 108px; margin-top: 14px; padding: 30px 18px 16px; border-radius: 10px; text-align: center; background: color-mix(in oklch, var(--ink) 4%, var(--card)); border: 1px solid oklch(from var(--ink) l c h / 0.1); transform: rotate(var(--ps10-tilt)); transform-origin: 50% 12px; }
.cf-product-selector-10 .ps10-tag::before { content: ''; position: absolute; top: 9px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 999px; background: var(--ps10-row-bg); box-shadow: inset 0 1px 2px oklch(from var(--ps10-shadow) l c h / 0.35), 0 0 0 1px oklch(from var(--ink) l c h / 0.14); }
.cf-product-selector-10 .ps10-tag::after { content: ''; position: absolute; left: 50%; bottom: calc(100% - 14px); width: 2px; height: 26px; margin-left: -1px; border-radius: 2px; background: oklch(from var(--ink) l c h / 0.38); transform: rotate(calc(var(--ps10-tilt) * -1)); transform-origin: 50% 100%; }
.cf-product-selector-10 .ps10-was { position: relative; display: inline-block; padding: 0 3px; font-size: 0.9375rem; font-weight: 600; line-height: 1.2; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.cf-product-selector-10 .ps10-was::after { content: ''; position: absolute; left: -3px; right: -3px; top: 50%; height: 3px; margin-top: -1px; border-radius: 3px 1px 3px 2px; background: var(--danger); transform: rotate(-10deg); }
.cf-product-selector-10 .ps10-now { display: block; font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.cf-product-selector-10 .ps10-row[data-selected='true'] .ps10-card { --ps10-row-bg: color-mix(in oklch, var(--accent) 7%, var(--card)); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-lg, 0 2px 4px oklch(from var(--ps10-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--ps10-shadow) l c h / 0.32)); }
.cf-product-selector-10 .ps10-row[data-selected='true'] .ps10-num { color: var(--accent); }
.cf-product-selector-10 .ps10-row[data-selected='true'] .ps10-pick { color: var(--accent); }
.cf-product-selector-10 .ps10-row[data-selected='true'] .ps10-dot { background: var(--accent-fill, var(--accent)); border-color: var(--accent-fill, var(--accent)); color: var(--accent-fill-ink, var(--card)); }
.cf-product-selector-10 .ps10-row[data-selected='true'] .ps10-tag { --ps10-tilt: 0deg; background: var(--card); border-color: oklch(from var(--accent) l c h / 0.5); }
@media (hover: hover) {
.cf-product-selector-10[data-disabled='false'] .ps10-row:not([data-selected='true']):hover .ps10-card { border-color: oklch(from var(--ink) l c h / 0.28); box-shadow: var(--shadow-md, 0 1px 2px oklch(from var(--ps10-shadow) l c h / 0.22), 0 4px 10px -2px oklch(from var(--ps10-shadow) l c h / 0.2)); }
.cf-product-selector-10[data-disabled='false'] .ps10-row:not([data-selected='true']):hover .ps10-num { color: var(--ink); }
.cf-product-selector-10[data-disabled='false'] .ps10-row:not([data-selected='true']):hover .ps10-dot { border-color: var(--accent); }
.cf-product-selector-10[data-disabled='false'] .ps10-row:not([data-selected='true']):hover .ps10-tag { --ps10-tilt: -1.5deg; }
}
.cf-product-selector-10[data-force='hover'] .ps10-row[data-demo-hover='true'] .ps10-card { border-color: oklch(from var(--ink) l c h / 0.28); box-shadow: var(--shadow-md, 0 1px 2px oklch(from var(--ps10-shadow) l c h / 0.22), 0 4px 10px -2px oklch(from var(--ps10-shadow) l c h / 0.2)); }
.cf-product-selector-10[data-force='hover'] .ps10-row[data-demo-hover='true'] .ps10-num { color: var(--ink); }
.cf-product-selector-10[data-force='hover'] .ps10-row[data-demo-hover='true'] .ps10-dot { border-color: var(--accent); }
.cf-product-selector-10[data-force='hover'] .ps10-row[data-demo-hover='true'] .ps10-tag { --ps10-tilt: -1.5deg; }
.cf-product-selector-10 .ps10-row:has(.ps10-input:focus-visible) .ps10-card { outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / 0.5); outline-offset: 3px; }
.cf-product-selector-10[data-error='true'] .ps10-card { border-color: var(--danger); }
.cf-product-selector-10 .ps10-close { display: grid; grid-template-columns: var(--ps10-rail) minmax(0, 1fr); column-gap: var(--ps10-gap); }
.cf-product-selector-10 .ps10-close-rail { display: flex; flex-direction: column; align-items: center; }
.cf-product-selector-10 .ps10-close-seg { width: 2px; height: 30px; margin-bottom: 10px; border-radius: 2px; background: var(--ps10-hair); }
.cf-product-selector-10 .ps10-disc { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--accent-fill, var(--accent)); color: var(--accent-fill-ink, var(--card)); }
.cf-product-selector-10 .ps10-action { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 0; padding-top: 24px; text-align: center; }
.cf-product-selector-10 .ps10-btn { display: flex; align-items: center; justify-content: center; width: 100%; max-width: none; min-height: 72px; margin: 0 auto; padding: 14px 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; letter-spacing: -0.005em; text-align: center; text-wrap: balance; color: var(--button-ink, var(--cta-ink)); text-shadow: var(--button-text-shadow, none); background: linear-gradient(180deg, oklch(from var(--button-bg, var(--cta)) calc(l + 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.02) c h)); box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--ps10-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--ps10-shadow) l c h / 0.45)); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cf-product-selector-10 .ps10-btn:hover:not(:disabled), .cf-product-selector-10[data-force='hover'] .ps10-btn:not(:disabled) { background: linear-gradient(180deg, oklch(from var(--button-bg, var(--cta)) calc(l - 0.01) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.07) c h)); box-shadow: inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.1) c h / 0.6), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--ps10-shadow) l c h / 0.32), 0 10px 18px -6px oklch(from var(--ps10-shadow) l c h / 0.5); }
.cf-product-selector-10 .ps10-btn:active:not(:disabled), .cf-product-selector-10[data-force='active'] .ps10-btn:not(:disabled) { background: linear-gradient(180deg, oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.04) c h), oklch(from var(--button-bg, var(--cta)) calc(l - 0.06) c h)); box-shadow: inset 0 2px 4px oklch(from var(--button-bg, var(--cta)) calc(l - 0.24) c h / 0.55), inset 0 -2px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--ps10-shadow) l c h / 0.3); }
.cf-product-selector-10 .ps10-btn:focus-visible { outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / 0.55); outline-offset: 3px; }
.cf-product-selector-10 .ps10-btn:disabled { background: var(--button-2-bg, var(--secondary)); color: var(--button-2-ink, var(--secondary-ink)); box-shadow: var(--button-2-shadow, var(--shadow-sm)); text-shadow: none; cursor: not-allowed; }
.cf-product-selector-10 .ps10-error { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--danger); text-align: center; text-wrap: pretty; }
.cf-product-selector-10 .ps10-assure { margin: 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.6; color: var(--muted); text-align: center; text-wrap: pretty; }
.cf-product-selector-10 .ps10-assure-item { display: inline-block; max-width: 100%; margin-inline: 8px; }
.cf-product-selector-10 .ps10-assure b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.cf-product-selector-10 .ps10-ico { display: inline-block; vertical-align: -0.18em; margin-inline-end: 0.4em; }
.cf-product-selector-10[data-disabled='true'] .ps10-row { cursor: not-allowed; }
.cf-product-selector-10[data-disabled='true'] .ps10-row .ps10-card { --ps10-row-bg: color-mix(in oklch, var(--ink) 3%, var(--card)); border-color: oklch(from var(--ink) l c h / 0.12); box-shadow: none; }
.cf-product-selector-10[data-disabled='true'] .ps10-media img { filter: grayscale(0.7); }
.cf-product-selector-10[data-disabled='true'] .ps10-row[data-selected='true'] .ps10-num, .cf-product-selector-10[data-disabled='true'] .ps10-row[data-selected='true'] .ps10-pick { color: var(--muted); }
.cf-product-selector-10[data-disabled='true'] .ps10-row[data-selected='true'] .ps10-dot { background: var(--muted); border-color: var(--muted); color: var(--card); }
.cf-product-selector-10[data-disabled='true'] .ps10-disc { background: var(--secondary); color: var(--secondary-ink); }
@container ps10 (max-width: 600px) {
.cf-product-selector-10 .ps10-card { --ps10-img: 72px; grid-template-columns: var(--ps10-img) minmax(0, 1fr) auto; grid-template-rows: auto; grid-template-areas: 'media name name' 'benefit benefit benefit' 'pick pick tag'; column-gap: 14px; row-gap: 12px; }
.cf-product-selector-10 .ps10-name { align-self: center; }
.cf-product-selector-10 .ps10-pick { align-self: center; margin-top: 0; }
.cf-product-selector-10 .ps10-tag { margin-top: 12px; min-width: 100px; }
.cf-product-selector-10 .ps10-action { padding-top: 20px; }
}
@keyframes ps10-rise { from { opacity: 0.82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
.cf-product-selector-10 .ps10-item { animation: ps10-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: min(calc(var(--ps10-i, 0) * 0.07s), 0.28s); }
.cf-product-selector-10 .ps10-card { transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease; }
.cf-product-selector-10 .ps10-tag { transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.16s ease, border-color 0.16s ease; }
.cf-product-selector-10 .ps10-tag::after { transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1); }
.cf-product-selector-10 .ps10-num, .cf-product-selector-10 .ps10-pick { transition: color 0.16s ease; }
.cf-product-selector-10 .ps10-dot { transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease; }
.cf-product-selector-10 .ps10-media img { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.cf-product-selector-10 .ps10-btn { transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
.cf-product-selector-10 .ps10-btn:hover:not(:disabled), .cf-product-selector-10[data-force='hover'] .ps10-btn:not(:disabled) { transform: translateY(-1px); }
.cf-product-selector-10 .ps10-btn:active:not(:disabled), .cf-product-selector-10[data-force='active'] .ps10-btn:not(:disabled) { transform: translateY(1px); }
.cf-product-selector-10[data-disabled='false'] .ps10-row:active .ps10-card { transform: scale(0.995); }
.cf-product-selector-10[data-force='hover'] .ps10-row[data-demo-hover='true'] .ps10-card { transform: translateY(-2px); }
.cf-product-selector-10[data-force='hover'] .ps10-row[data-demo-hover='true'] .ps10-media img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
.cf-product-selector-10[data-disabled='false'] .ps10-row:not([data-selected='true']):hover .ps10-card { transform: translateY(-2px); }
.cf-product-selector-10[data-disabled='false'] .ps10-row:hover .ps10-media img { transform: scale(1.04); }
}
`
pieces/offer/product-selector-10/specimen.tsx 57 lines
import __studioImage0288424d from "../assets/cfb3c7e495e47653.webp";
// Specimen: the Funnel Starter Kit offer on a three-step rail, with the complete kit chosen first.
import * as React from 'react'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { ProductSelector10, type ProductSelector10State } from '../product-selector-10'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function ProductSelector10Specimen({ state = 'default' }: { state?: ProductSelector10State }) {
const sample = defaults.sample
const workbook = sample.items[1]
const checklist = sample.items[2]
const options = [
{
id: 'kit',
name: sample.name,
benefit: 'The guide, workbook and checklist in one download.',
price: sample.price,
regularPrice: sample.regularPrice,
image: slot(
'product',
__studioImage0288424d
),
imageAlt: 'The Funnel Starter Kit: planning guide, copy workbook and launch checklist together',
},
{
id: 'workbook',
name: workbook.name,
benefit: workbook.detail,
price: workbook.value,
image: slot('item-2', workbook.image),
imageAlt: workbook.imageAlt,
},
{
id: 'checklist',
name: checklist.name,
benefit: checklist.detail,
price: checklist.value,
image: slot('item-3', checklist.image),
imageAlt: checklist.imageAlt,
},
]
return (
<ProductSelector10
options={options}
defaultSelectedId='kit'
headline='Pick how you want to build your first funnel'
headlineEmphasis='build your first funnel'
subhead='Start with one tool, or take all three in the complete kit.'
reassurance={sample.reassurance}
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
options RequiredProductSelector10 |
ProductSelector10Option[] |
|
defaultSelectedId OptionalProductSelector10 |
string | null |
|
headline OptionalProductSelector10 |
string |
Default 'Choose the one you want'
|
headlineEmphasis OptionalProductSelector10 |
string |
|
subhead OptionalProductSelector10 |
string |
Default ''
|
legend OptionalProductSelector10 |
string |
Default 'Choose one option'
|
selectLabel OptionalProductSelector10 |
string |
Default 'Choose this'
|
selectedLabel OptionalProductSelector10 |
string |
Default 'Your pick'
|
regularPriceLabel OptionalProductSelector10 |
string |
Default 'Regular price'
|
todayPriceLabel OptionalProductSelector10 |
string |
Default 'today'
|
buttonLabel OptionalProductSelector10 |
string |
Default 'Yes! I Want {name}'
|
emptyButtonLabel OptionalProductSelector10 |
string |
Default 'Yes! Add It To My Order'
|
priceLine OptionalProductSelector10 |
string |
Default '{price} today'
|
reassurance OptionalProductSelector10 |
string[] |
Default []
|
errorMessage OptionalProductSelector10 |
string |
Default 'Choose one of the options above, then tap the button.'
|
disabledNote OptionalProductSelector10 |
string |
Default 'Adding to your order is unavailable right now.'
|
disabled OptionalProductSelector10 |
boolean |
Default false
|
inputName OptionalProductSelector10 |
string |
|
state OptionalProductSelector10 |
ProductSelector10State |
Default 'default'
|
onSelect OptionalProductSelector10 |
(option: ProductSelector10Option) => void |
|
onSubmit OptionalProductSelector10 |
(option: ProductSelector10Option) => void |
|
className OptionalProductSelector10 |
string |
Default ''
|
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.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
product- The main product shot or cover (ebook, kit, bottle).
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
cfb3c7e495e47653.webp
image/webp · 116 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB