Alternatives Table 1
Compares the offer with the usual alternatives row by row and ends in the buy button.
Use it in a prompt
Use content/alternatives-table 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/alternatives-table.tsx. - Import it and pass your copy and images (Props tab):
import { AlternativesTable } from "@/components/funneldna/content/alternatives-table"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/alternatives-table/component.tsx 728 lines
// Compares the offer with the usual alternatives row by row and ends in the buy button.
// layout: product-stage
// Alternatives table: the offer stands on a lit stage at the head of its own raised column, so buyers read row by row what they get against the usual ways to start (honest marks, scoped footnote), and the column ends in the buy button.
import * as React from "react"
import { Check, Contrast, ShieldCheck, X } from "lucide-react"
export type AlternativesStatus = "yes" | "partial" | "no" | "info"
export type AlternativesCell = {
/** yes = included, partial = honest partial mark, no = not included, info = plain fact such as a price. */
status: AlternativesStatus
text: string
/** Item thumbnail for an offer cell (slot item-n). */
image?: string
imageAlt?: string
}
export type AlternativesRow = {
/** What buyers care about, e.g. "Page copy". */
label: string
/** The offer's answer for this row. */
offer: AlternativesCell
/** One answer per alternative, in the order of `alternatives`. */
alternatives: AlternativesCell[]
}
export type AlternativesOption = {
name: string
/** Short qualifier under the name. */
note?: string
}
export type AlternativesTableProps = {
headline?: string
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string
subheadline?: string
/** Heading over the row labels. */
labelHeading?: string
productName?: string
/** Slot: product (transparent cut-out works best). */
productImage?: string
productImageAlt?: string
/** Alternatives the owner names. Never invent competitor claims. */
alternatives?: AlternativesOption[]
rows?: AlternativesRow[]
/** Words for each mark, used in the legend and for screen readers. */
statusLabels?: { yes: string; partial: string; no: string }
/** Label for the phone switcher between alternatives. */
compareLabel?: string
/** Button action line. */
label?: string
/** Button reassurance line. */
sublabel?: string
/** One line under the button. */
reassurance?: string
href?: string
onAction?: () => void
disabled?: boolean
/** Scope and sources of the comparison. */
footnote?: React.ReactNode
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
const DEFAULT_ALTERNATIVES: AlternativesOption[] = [
{ name: "A blank page", note: "Start from zero" },
{ name: "Free tutorials", note: "Pieced together online" },
]
const DEFAULT_ROWS: AlternativesRow[] = [
{
label: "Funnel plan",
offer: { status: "yes", text: "Funnel Planning Guide" },
alternatives: [
{ status: "no", text: "You map it alone" },
{ status: "partial", text: "Scattered across videos" },
],
},
{
label: "Page copy",
offer: { status: "yes", text: "Page Copy Workbook" },
alternatives: [
{ status: "no", text: "Write from scratch" },
{ status: "partial", text: "Varies by source" },
],
},
{
label: "Pre-launch check",
offer: { status: "yes", text: "Launch Checklist" },
alternatives: [
{ status: "no", text: "Nothing to check against" },
{ status: "partial", text: "Varies by source" },
],
},
{
label: "All in one place",
offer: { status: "yes", text: "One download" },
alternatives: [
{ status: "no", text: "Nothing to download" },
{ status: "no", text: "Spread across sites" },
],
},
{
label: "Cost",
offer: { status: "info", text: "$47, one payment" },
alternatives: [
{ status: "info", text: "Free" },
{ status: "info", text: "Free" },
],
},
]
const DEFAULT_STATUS = { yes: "Included", partial: "Partly", no: "Not included" }
const DEFAULT_FOOTNOTE =
"Alternatives are general ways people start, not named products or companies. Kit details come from the offer itself."
const EMPTY_CELL: AlternativesCell = { status: "info", text: "" }
export function AlternativesTable(props: AlternativesTableProps) {
const {
headline = "Build your first funnel with a clear plan",
highlight = "a clear plan",
subheadline = "See what's inside the kit, side by side with the usual ways people start.",
labelHeading = "What matters",
productName = "The Funnel Starter Kit",
productImage,
productImageAlt = "The Funnel Starter Kit: guide, workbook and checklist",
alternatives = DEFAULT_ALTERNATIVES,
rows = DEFAULT_ROWS,
statusLabels = DEFAULT_STATUS,
compareLabel = "Compare with",
label = "Send Me the Starter Kit",
sublabel = "$47 once · Instant download",
reassurance = "30-day money-back guarantee",
href,
onAction,
disabled = false,
footnote = DEFAULT_FOOTNOTE,
state = "default",
className,
} = props
const headingId = React.useId()
const [active, setActive] = React.useState(0)
const [hot, setHot] = React.useState<number | null>(null)
const isDisabled = disabled || state === "disabled"
const forced = state === "hover" || state === "active" ? state : undefined
const activeAlt = Math.min(active, Math.max(alternatives.length - 1, 0))
const gridStyle = {
gridTemplateRows: `auto repeat(${rows.length}, auto) auto`,
"--alt-count": String(Math.max(alternatives.length, 1)),
} as React.CSSProperties
const buttonInner = (
<>
<span className="cf-alt-btn-label">{label}</span>
{sublabel ? <span className="cf-alt-btn-sub">{sublabel}</span> : null}
</>
)
const button =
href && !isDisabled ? (
<a className="cf-alt-btn" href={href} data-state={forced} onClick={onAction ? () => onAction() : undefined}>
{buttonInner}
</a>
) : (
<button
type="button"
className="cf-alt-btn"
data-state={forced}
disabled={isDisabled}
onClick={() => onAction?.()}
>
{buttonInner}
</button>
)
return (
<div className={className ? `cf-alternatives-table ${className}` : "cf-alternatives-table"}>
<style>{CSS}</style>
<div className="cf-alt-heading">
<h2 className="cf-alt-title" id={headingId}>
{withMarker(headline, highlight)}
</h2>
{subheadline ? <p className="cf-alt-sub">{subheadline}</p> : null}
</div>
{alternatives.length > 1 ? (
<div className="cf-alt-seg" role="group" aria-label={compareLabel}>
<span className="cf-alt-seg-label" aria-hidden="true">
{compareLabel}
</span>
{alternatives.map((alt, j) => (
<button key={alt.name} type="button" aria-pressed={j === activeAlt} onClick={() => setActive(j)}>
{alt.name}
</button>
))}
</div>
) : null}
<div className="cf-alt-grid" style={gridStyle} onPointerLeave={() => setHot(null)}>
<div className="cf-alt-col cf-alt-col--label" aria-hidden="true">
<div className="cf-alt-head cf-alt-strip">
<span className="cf-alt-strip-name">{labelHeading}</span>
</div>
{rows.map((row, i) => (
<div
key={row.label}
className="cf-alt-cell cf-alt-cell--label"
data-hot={hot === i || undefined}
onPointerEnter={() => setHot(i)}
>
{row.label}
</div>
))}
<div className="cf-alt-spacer" />
</div>
<div className="cf-alt-col cf-alt-col--offer" aria-hidden="true">
<div className="cf-alt-head cf-alt-offer-head">
{productImage ? (
<div className="cf-alt-stage">
<img
className="cf-alt-product"
src={productImage}
alt={productImageAlt}
width={500}
height={368}
decoding="async"
/>
<span className="cf-alt-floor" />
</div>
) : null}
<div className="cf-alt-name">{productName}</div>
</div>
{rows.map((row, i) => (
<div
key={row.label}
className="cf-alt-cell"
data-hot={hot === i || undefined}
onPointerEnter={() => setHot(i)}
>
<CellBody cell={row.offer} i={i} offer />
</div>
))}
<div className="cf-alt-spacer" />
</div>
{alternatives.map((alt, j) => (
<div
key={alt.name}
className="cf-alt-col cf-alt-col--alt"
data-on={j === activeAlt || undefined}
data-last={j === alternatives.length - 1 || undefined}
style={{ "--c": String(j + 3) } as React.CSSProperties}
aria-hidden="true"
>
<div className="cf-alt-head cf-alt-strip">
<span className="cf-alt-strip-name">{alt.name}</span>
{alt.note ? <span className="cf-alt-strip-note">{alt.note}</span> : null}
</div>
{rows.map((row, i) => (
<div
key={row.label}
className="cf-alt-cell"
data-hot={hot === i || undefined}
onPointerEnter={() => setHot(i)}
>
<CellBody cell={row.alternatives[j] ?? EMPTY_CELL} i={i} />
</div>
))}
<div className="cf-alt-spacer" />
</div>
))}
<div className="cf-alt-action">
{button}
{reassurance ? (
<p className="cf-alt-assure">
<ShieldCheck aria-hidden="true" strokeWidth={2.4} />
<span>{reassurance}</span>
</p>
) : null}
</div>
</div>
<table className="cf-alt-sr" aria-labelledby={headingId}>
<thead>
<tr>
<th scope="col">{labelHeading}</th>
<th scope="col">{productName}</th>
{alternatives.map((alt) => (
<th scope="col" key={alt.name}>
{alt.note ? `${alt.name}, ${alt.note}` : alt.name}
</th>
))}
</tr>
</thead>
<tbody>
{rows.map((row) => (
<tr key={row.label}>
<th scope="row">{row.label}</th>
<td>{srText(row.offer, statusLabels)}</td>
{alternatives.map((alt, j) => (
<td key={alt.name}>{srText(row.alternatives[j] ?? EMPTY_CELL, statusLabels)}</td>
))}
</tr>
))}
</tbody>
</table>
<div className="cf-alt-foot">
<ul className="cf-alt-legend" aria-hidden="true">
{(["yes", "partial", "no"] as const).map((s) => (
<li key={s}>
<StatusChip status={s} still />
<span>{statusLabels[s]}</span>
</li>
))}
</ul>
{footnote ? <p className="cf-alt-note">{footnote}</p> : null}
</div>
</div>
)
}
export default AlternativesTable
function StatusChip({
status,
i = 0,
mini = false,
still = false,
}: {
status: AlternativesStatus
i?: number
mini?: boolean
still?: boolean
}) {
if (status === "info") return null
const Icon = status === "yes" ? Check : status === "partial" ? Contrast : X
const cls = `cf-alt-chip cf-alt-chip--${status}${mini ? " cf-alt-chip--mini" : ""}${still ? " cf-alt-chip--still" : ""}`
return (
<span className={cls} style={{ "--i": String(i) } as React.CSSProperties}>
<Icon aria-hidden="true" strokeWidth={status === "partial" ? 2.4 : 3} />
</span>
)
}
function CellBody({ cell, i, offer = false }: { cell: AlternativesCell; i: number; offer?: boolean }) {
return (
<>
{offer && cell.image ? (
<span className="cf-alt-thumb">
<img src={cell.image} alt={cell.imageAlt ?? cell.text} width={46} height={46} loading="lazy" decoding="async" />
<StatusChip status={cell.status} i={i} mini />
</span>
) : (
<StatusChip status={cell.status} i={i} />
)}
<span className={`cf-alt-text cf-alt-text--${cell.status}`}>{cell.text}</span>
</>
)
}
function withMarker(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="cf-alt-marker">{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
function srText(cell: AlternativesCell, labels: { yes: string; partial: string; no: string }) {
if (cell.status === "info") return cell.text
return cell.text ? `${labels[cell.status]}: ${cell.text}` : labels[cell.status]
}
const CSS = `
.cf-alternatives-table{
--alt-ink:var(--ink, oklch(0.21 0.034 263));
--alt-muted:var(--muted, oklch(0.446 0.03 258));
--alt-surface:var(--surface, oklch(1 0 0));
--alt-card:var(--card, oklch(1 0 0));
--alt-accent:var(--accent, oklch(0.5 0.171 257));
--alt-band:var(--band, oklch(0.273 0.067 256));
--alt-band-ink:var(--band-ink, oklch(1 0 0));
--alt-shadow:var(--shadow, oklch(0.22 0.03 256));
--alt-cta:var(--button-bg, var(--cta, oklch(0.576 0.209 29.5)));
--alt-cta-2:var(--button-bg-2, var(--cta-2, oklch(0.506 0.206 29.5)));
--alt-cta-ink:var(--button-ink, var(--cta-ink, oklch(1 0 0)));
--alt-success:var(--success, oklch(0.5 0.138 150));
--alt-radius:var(--radius, 10px);
--alt-line:color-mix(in oklch, var(--alt-ink) 12%, transparent);
--alt-marker:var(--marker, #fae37c);
container-type:inline-size;
position:relative;
width:100%;
max-width:1100px;
margin-inline:auto;
color:var(--alt-ink);
font-family:var(--font-body, system-ui, sans-serif);
font-size:1rem;
line-height:1.45;
-webkit-font-smoothing:antialiased;
}
.cf-alternatives-table *,.cf-alternatives-table *::before,.cf-alternatives-table *::after{box-sizing:border-box}
.cf-alt-heading{max-width:820px;margin:0 auto 28px;text-align:center}
.cf-alt-title{
margin:0;
font-family:var(--font-display, system-ui, sans-serif);
font-weight:var(--display-weight, 800);
text-transform:var(--display-case, none);
letter-spacing:var(--display-tracking, -0.025em);
font-size:clamp(2rem, 5.2cqi, 3.375rem);
line-height:1.06;
color:var(--alt-ink);
text-wrap:balance;
}
.cf-alt-marker{
color:var(--field-ink, var(--alt-ink));
background-image:linear-gradient(to bottom, transparent 0 10%, color-mix(in oklch, var(--alt-marker) 92%, transparent) 10% 97%, transparent 97%);
-webkit-box-decoration-break:clone;
box-decoration-break:clone;
padding-inline:.1em;
border-radius:.18em .42em .3em .22em;
}
.cf-alt-sub{
margin:18px auto 0;
max-width:60ch;
font-size:clamp(1.0625rem, 1.9cqi, 1.25rem);
font-weight:500;
line-height:1.5;
color:var(--alt-muted);
text-wrap:pretty;
}
.cf-alt-seg{display:none;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin:0 0 6px}
.cf-alt-seg-label{width:100%;font-size:.9375rem;font-weight:700;color:var(--alt-ink);text-align:center}
.cf-alt-seg button{
appearance:none;
min-height:44px;
padding:0 16px;
border:1px solid color-mix(in oklch, var(--alt-ink) 14%, transparent);
border-radius:999px;
background:color-mix(in oklch, var(--alt-ink) 4%, var(--alt-surface));
color:var(--alt-ink);
font:inherit;
font-size:.9375rem;
font-weight:700;
cursor:pointer;
transition:background-color .15s ease, border-color .15s ease;
}
.cf-alt-seg button:hover{background:color-mix(in oklch, var(--alt-ink) 8%, var(--alt-surface))}
.cf-alt-seg button[aria-pressed="true"]{background:color-mix(in oklch, var(--alt-accent) 12%, var(--alt-card));border-color:var(--alt-accent)}
.cf-alt-seg button:focus-visible{outline:3px solid var(--field-focus, var(--alt-accent));outline-offset:2px}
.cf-alt-grid{
--alt-lift:64px;
--alt-stage-h:184px;
display:grid;
grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) repeat(var(--alt-count), minmax(0,1fr));
gap:0;
padding-top:calc(var(--alt-lift) + 12px);
}
.cf-alt-col{display:grid;grid-template-rows:subgrid;grid-row:1 / -1;min-width:0}
.cf-alt-col--label{grid-column:1}
.cf-alt-col--alt{grid-column:var(--c)}
.cf-alt-col--offer{
grid-column:2;
position:relative;
z-index:1;
margin-inline:10px;
background:var(--alt-card);
border:2px solid color-mix(in oklch, var(--accent-fill, var(--alt-accent)) 42%, var(--alt-card));
border-radius:var(--card-radius, calc(var(--alt-radius) + 6px));
box-shadow:var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--alt-shadow) l c h / .22), 0 12px 24px -8px oklch(from var(--alt-shadow) l c h / .32)));
animation:cf-alt-rise .45s cubic-bezier(.22,1,.36,1) both;
}
.cf-alt-head{min-width:0}
.cf-alt-strip{
align-self:end;
display:flex;
flex-direction:column;
justify-content:center;
gap:2px;
min-height:76px;
padding:12px 18px;
background:color-mix(in oklch, var(--alt-ink) 5%, var(--alt-surface));
border-bottom:2px solid color-mix(in oklch, var(--alt-ink) 60%, var(--alt-surface));
}
.cf-alt-col--label .cf-alt-strip{border-top-left-radius:var(--alt-radius)}
.cf-alt-col--alt[data-last] .cf-alt-strip{border-top-right-radius:var(--alt-radius)}
.cf-alt-strip-name{
font-family:var(--font-display, system-ui, sans-serif);
font-weight:var(--display-weight, 800);
font-size:1.0625rem;
line-height:1.2;
color:var(--alt-ink);
text-wrap:balance;
}
.cf-alt-strip-note{font-size:.875rem;font-weight:500;line-height:1.3;color:var(--alt-muted);text-wrap:pretty}
.cf-alt-offer-head{align-self:end;display:flex;flex-direction:column;align-items:stretch;padding:0 10px 8px}
.cf-alt-stage{position:relative;display:flex;flex-direction:column;align-items:center;margin-top:calc(var(--alt-lift) * -1);margin-bottom:12px}
.cf-alt-product{
position:relative;
z-index:1;
display:block;
width:100%;
max-width:250px;
height:var(--alt-stage-h);
object-fit:contain;
object-position:50% 100%;
filter:drop-shadow(0 3px 3px oklch(from var(--alt-shadow) l c h / .3)) drop-shadow(0 12px 14px oklch(from var(--alt-shadow) l c h / .22));
animation:cf-alt-rise .5s .08s cubic-bezier(.22,1,.36,1) both;
}
.cf-alt-floor{
width:74%;
height:26px;
margin-top:-20px;
border-radius:50%;
background:color-mix(in oklch, var(--alt-ink) 7%, var(--alt-card));
box-shadow:inset 0 -2px 0 color-mix(in oklch, var(--alt-ink) 11%, var(--alt-card));
}
.cf-alt-name{
display:flex;
align-items:center;
justify-content:center;
min-height:68px;
padding:10px 14px;
border-radius:calc(var(--alt-radius) * .8);
background:var(--alt-band);
color:var(--alt-band-ink);
font-family:var(--font-display, system-ui, sans-serif);
font-weight:var(--display-weight, 800);
font-size:1.0625rem;
line-height:1.2;
text-align:center;
text-wrap:balance;
}
.cf-alt-cell{
display:flex;
align-items:center;
gap:12px;
min-width:0;
min-height:70px;
padding:14px 18px;
border-top:1px solid var(--alt-line);
transition:background-color .18s ease;
}
.cf-alt-head + .cf-alt-cell{border-top-color:transparent}
.cf-alt-spacer{border-top:1px solid var(--alt-line)}
.cf-alt-col--offer .cf-alt-cell,.cf-alt-col--offer .cf-alt-spacer{border-top-color:color-mix(in oklch, var(--alt-ink) 9%, var(--alt-card))}
.cf-alt-col--offer .cf-alt-head + .cf-alt-cell{border-top-color:transparent}
.cf-alt-cell[data-hot]{background:color-mix(in oklch, var(--alt-ink) 4%, var(--alt-surface))}
.cf-alt-col--offer .cf-alt-cell[data-hot]{background:color-mix(in oklch, var(--accent-fill, var(--alt-accent)) 8%, var(--alt-card))}
.cf-alt-cell--label{
font-family:var(--font-display, system-ui, sans-serif);
font-weight:var(--display-weight, 800);
font-size:1.0625rem;
line-height:1.25;
text-wrap:balance;
}
.cf-alt-text{min-width:0;overflow-wrap:break-word;text-wrap:pretty}
.cf-alt-col--offer .cf-alt-text{font-weight:700;color:var(--alt-ink)}
.cf-alt-col--offer .cf-alt-text--info{
font-family:var(--font-display, system-ui, sans-serif);
font-weight:var(--display-weight, 800);
font-size:1.1875rem;
line-height:1.2;
font-variant-numeric:tabular-nums;
}
.cf-alt-col--alt .cf-alt-text{font-weight:500;color:var(--alt-ink)}
.cf-alt-col--alt .cf-alt-text--no{color:var(--alt-muted)}
.cf-alt-col--alt .cf-alt-text--info{font-weight:700}
.cf-alt-chip{
flex:none;
display:inline-grid;
place-items:center;
width:28px;
height:28px;
border-radius:50%;
animation:cf-alt-pop .32s calc(.15s + var(--i, 0) * .05s) cubic-bezier(.34,1.4,.64,1) both;
}
.cf-alt-chip svg{width:16px;height:16px}
.cf-alt-chip--yes{background:var(--success-soft, oklch(0.93 0.019 150));color:var(--success, oklch(0.5 0.138 150))}
.cf-alt-chip--partial{background:var(--warning-soft, oklch(0.93 0.014 85));color:var(--warning, oklch(0.5 0.102 85))}
.cf-alt-chip--no{background:var(--danger-soft, oklch(0.93 0.024 27));color:var(--danger, oklch(0.5 0.17 27))}
.cf-alt-chip--mini{position:absolute;right:-7px;bottom:-7px;width:23px;height:23px;border:2px solid var(--alt-card)}
.cf-alt-chip--mini svg{width:12px;height:12px}
.cf-alt-chip--still{width:24px;height:24px;animation:none}
.cf-alt-chip--still svg{width:14px;height:14px}
.cf-alt-thumb{position:relative;flex:none;width:46px;height:46px}
.cf-alt-thumb img{
display:block;
width:100%;
height:100%;
object-fit:cover;
border-radius:8px;
filter:drop-shadow(0 1px 2px oklch(from var(--alt-shadow) l c h / .3));
}
.cf-alt-action{
grid-column:2;
grid-row:-2 / -1;
position:relative;
z-index:2;
margin-inline:10px;
padding:20px 14px 22px;
display:flex;
flex-direction:column;
align-items:center;
gap:12px;
}
.cf-alt-btn{
appearance:none;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:3px;
width:100%;
min-height:66px;
margin:0;
padding:12px 18px 14px;
border:1px solid oklch(from var(--alt-cta) calc(l - 0.12) c h);
border-radius:var(--button-radius, var(--alt-radius));
background:linear-gradient(oklch(from var(--alt-cta) calc(l + 0.04) c h), var(--alt-cta-2));
color:var(--alt-cta-ink);
text-align:center;
text-decoration:none;
text-shadow:var(--button-text-shadow, none);
box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--alt-cta) calc(l + 0.14) c h / .6), inset 0 -3px 0 oklch(from var(--alt-cta) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--alt-shadow) l c h / .32), 0 6px 12px -4px oklch(from var(--alt-shadow) l c h / .38));
cursor:pointer;
transition:transform .15s ease, box-shadow .15s ease;
}
.cf-alt-btn:hover:not(:disabled),.cf-alt-btn[data-state="hover"]{
background:linear-gradient(oklch(from var(--alt-cta) calc(l - 0.02) c h), oklch(from var(--alt-cta-2) calc(l - 0.05) c h));
transform:translateY(-1px);
box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--alt-cta) calc(l + 0.1) c h / .55), inset 0 -3px 0 oklch(from var(--alt-cta) calc(l - 0.2) c h), 0 2px 3px oklch(from var(--alt-shadow) l c h / .32), 0 9px 16px -5px oklch(from var(--alt-shadow) l c h / .42));
}
.cf-alt-btn:active:not(:disabled),.cf-alt-btn[data-state="active"]{
background:linear-gradient(oklch(from var(--alt-cta-2) calc(l - 0.04) c h), oklch(from var(--alt-cta-2) calc(l - 0.08) c h));
transform:translateY(1px);
box-shadow:inset 0 2px 3px oklch(from var(--alt-cta) calc(l - 0.24) c h / .45), 0 1px 1px oklch(from var(--alt-shadow) l c h / .3);
}
.cf-alt-btn:focus-visible{outline:3px solid var(--field-focus, var(--alt-accent));outline-offset:3px}
.cf-alt-btn:disabled{
cursor:not-allowed;
background:var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263)));
color:var(--button-2-ink, var(--secondary-ink, var(--alt-ink)));
border-color:oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263))) calc(l - 0.08) c h);
text-shadow:none;
box-shadow:none;
transform:none;
}
.cf-alt-btn-label{
font-family:var(--button-font, var(--font-display, system-ui, sans-serif));
font-weight:var(--button-weight, 800);
text-transform:var(--button-case, none);
font-size:clamp(1.0625rem, 1.9cqi, 1.1875rem);
line-height:1.15;
text-wrap:balance;
}
.cf-alt-btn-sub{font-family:var(--font-body, system-ui, sans-serif);font-size:.875rem;font-weight:600;line-height:1.25;text-wrap:pretty}
.cf-alt-assure{display:inline-flex;align-items:center;justify-content:center;gap:6px;margin:0;font-size:.875rem;font-weight:600;line-height:1.3;color:var(--alt-muted);text-align:center}
.cf-alt-assure svg{flex:none;width:16px;height:16px;color:var(--alt-success)}
.cf-alt-foot{margin-top:28px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.cf-alt-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 22px;margin:0;padding:0;list-style:none}
.cf-alt-legend li{display:inline-flex;align-items:center;gap:8px;font-size:.9375rem;font-weight:700;color:var(--alt-ink)}
.cf-alt-note{margin:0;max-width:70ch;font-size:.875rem;line-height:1.5;color:var(--alt-muted);text-wrap:pretty}
.cf-alt-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
@keyframes cf-alt-rise{from{opacity:.82;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes cf-alt-pop{from{opacity:.82;transform:scale(.7)}to{opacity:1;transform:none}}
@container (max-width: 820px){
.cf-alt-seg{display:flex}
.cf-alt-grid{
--alt-lift:34px;
--alt-stage-h:104px;
grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr) minmax(0,1fr);
}
.cf-alt-col{grid-row:1 / -2}
.cf-alt-spacer{display:none}
.cf-alt-col--alt{display:none}
.cf-alt-col--alt[data-on]{display:grid;grid-column:3}
.cf-alt-col--alt[data-on] .cf-alt-strip{border-top-right-radius:var(--alt-radius)}
.cf-alt-col--offer{margin-inline:4px}
.cf-alt-offer-head{padding:0 6px 6px}
.cf-alt-stage{margin-bottom:8px}
.cf-alt-floor{height:16px;margin-top:-12px}
.cf-alt-strip{min-height:62px;padding:10px}
.cf-alt-name{min-height:56px;padding:8px;font-size:.9375rem}
.cf-alt-strip-name,.cf-alt-cell--label{font-size:.9375rem}
.cf-alt-cell{flex-direction:column;align-items:flex-start;gap:8px;min-height:0;padding:12px 10px;font-size:.9375rem}
.cf-alt-col--offer .cf-alt-text--info{font-size:1.0625rem}
.cf-alt-thumb{width:36px;height:36px}
.cf-alt-chip{width:26px;height:26px}
.cf-alt-chip--mini{width:21px;height:21px;right:-6px;bottom:-6px}
.cf-alt-action{grid-column:1 / -1;margin:20px 0 0;padding:0}
.cf-alt-btn{max-width:440px}
}
@media (prefers-reduced-motion: reduce){
.cf-alt-col--offer,.cf-alt-product,.cf-alt-chip{animation:none}
.cf-alt-btn,.cf-alt-cell,.cf-alt-seg button{transition:none}
.cf-alt-btn:hover:not(:disabled),.cf-alt-btn:active:not(:disabled),.cf-alt-btn[data-state]{transform:none}
}
`
pieces/content/alternatives-table/specimen.tsx 80 lines
import __studioImage2487dfab from "../assets/c91067663501e342.webp";
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { AlternativesTable, type AlternativesRow } from "../alternatives-table"
export const states = ["default", "hover", "active", "disabled"]
type SpecimenState = "default" | "hover" | "active" | "disabled"
export default function AlternativesTableSpecimen({ state = "default" }: { state?: SpecimenState }) {
const sample = defaults.sample
const [guide, workbook, checklist] = sample.items
const rows: AlternativesRow[] = [
{
label: "Funnel plan",
offer: { status: "yes", text: guide.name, image: slot("item-1", guide.image), imageAlt: guide.imageAlt },
alternatives: [
{ status: "no", text: "You map it alone" },
{ status: "partial", text: "Scattered across videos" },
],
},
{
label: "Page copy",
offer: { status: "yes", text: workbook.name, image: slot("item-2", workbook.image), imageAlt: workbook.imageAlt },
alternatives: [
{ status: "no", text: "Write from scratch" },
{ status: "partial", text: "Varies by source" },
],
},
{
label: "Pre-launch check",
offer: { status: "yes", text: checklist.name, image: slot("item-3", checklist.image), imageAlt: checklist.imageAlt },
alternatives: [
{ status: "no", text: "Nothing to check against" },
{ status: "partial", text: "Varies by source" },
],
},
{
label: "All in one place",
offer: { status: "yes", text: "One download" },
alternatives: [
{ status: "no", text: "Nothing to download" },
{ status: "no", text: "Spread across sites" },
],
},
{
label: "Cost",
offer: { status: "info", text: `${sample.price}, one payment` },
alternatives: [
{ status: "info", text: "Free" },
{ status: "info", text: "Free" },
],
},
]
return (
<AlternativesTable
state={state}
headline={sample.headline}
highlight="a clear plan"
subheadline="See what's inside the kit, side by side with the usual ways people start."
productName={sample.name}
productImage={slot(
"product",
__studioImage2487dfab
)}
productImageAlt={`${sample.name}: guide, workbook and checklist`}
alternatives={[
{ name: "A blank page", note: "Start from zero" },
{ name: "Free tutorials", note: "Pieced together online" },
]}
rows={rows}
label="Send Me the Starter Kit"
sublabel={`${sample.price} once · Instant download`}
reassurance={sample.guarantee.charAt(0).toUpperCase() + sample.guarantee.slice(1)}
footnote="Alternatives are general ways people start, not named products or companies. Kit details come from the offer itself."
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalAlternativesTable |
string |
|
highlight OptionalAlternativesTable |
string |
|
subheadline OptionalAlternativesTable |
string |
|
labelHeading OptionalAlternativesTable |
string |
|
productName OptionalAlternativesTable |
string |
|
productImage OptionalAlternativesTable |
string |
|
productImageAlt OptionalAlternativesTable |
string |
|
alternatives OptionalAlternativesTable |
AlternativesOption[] |
|
rows OptionalAlternativesTable |
AlternativesRow[] |
|
statusLabels OptionalAlternativesTable |
{ yes: string; partial: string; no: string } |
|
compareLabel OptionalAlternativesTable |
string |
|
label OptionalAlternativesTable |
string |
|
sublabel OptionalAlternativesTable |
string |
|
reassurance OptionalAlternativesTable |
string |
|
href OptionalAlternativesTable |
string |
|
onAction OptionalAlternativesTable |
() => void |
|
disabled OptionalAlternativesTable |
boolean |
|
footnote OptionalAlternativesTable |
React.ReactNode |
|
state OptionalAlternativesTable |
"default" | "hover" | "active" | "disabled" |
|
className OptionalAlternativesTable |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink- Secondary button.
--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--field-ink- 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-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
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
-
c91067663501e342.webp
image/webp · 131 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB