Diy Vs Done 1
DIY vs done: three lanes (do it yourself, hire it out, our way) compared row by row so the ticked "our way" lane is the obvious pick;
Use it in a prompt
Use content/diy-vs-done 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/diy-vs-done.tsx. - Import it and pass your copy and images (Props tab):
import { DiyVsDone } from "@/components/funneldna/content/diy-vs-done"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/diy-vs-done/component.tsx 512 lines
// layout: comparison-columns
// DIY vs done: three lanes (do it yourself, hire it out, our way) compared row by row so the ticked "our way" lane is the obvious pick;
// the winning lane closes with a centred price, a guarantee commitment and the action.
// Theme exception (documented): status badge glyphs are white (#fff) on a solid --success/--danger circle, read through the
// unset component variable --dvd-glyph so the hex stays a var() fallback. Every other colour, face and element style reads the tokens.
import * as React from "react"
import { AlertCircle, Check, Clock3, Flag, Hammer, Handshake, Lock, Minus, ShieldCheck, Wallet, X } from "lucide-react"
export type DiyVsDoneOption = {
title: string
/** One short line under the lane title. */
detail?: string
}
export type DiyVsDoneRow = {
/** Row name, shown as a caps label (Time, Cost, Risk, Result). */
label: string
/** Icon beside the row label in the desktop label column. */
icon?: "time" | "cost" | "risk" | "result"
/** The do-it-yourself lane's answer for this row. */
diy: React.ReactNode
/** The hire-it-out lane's answer for this row. */
hire: React.ReactNode
/** Your offer's answer for this row, shown with a tick. Supplied facts only. */
ours: React.ReactNode
}
export type DiyVsDoneItem = { name: string; image?: string; imageAlt?: string }
export type DiyVsDoneProps = {
/** Section headline; may carry a `.dvd-mark` marker span. */
headline?: React.ReactNode
/** Supporting line under the headline. */
lead?: string
/** The do-it-yourself lane header. */
diy?: DiyVsDoneOption
/** The hire-it-out lane header. */
hire?: DiyVsDoneOption
/** The winning lane header (your offer). */
ours?: DiyVsDoneOption
/** Comparison rows, one answer per lane. */
rows?: DiyVsDoneRow[]
/** Mark beside the two alternative lanes: a quiet dash (default) or a red cross. */
altMark?: "neutral" | "cross"
/** Up to three product images (slots item-1 to item-3) fanned in the winning lane's header. */
items?: DiyVsDoneItem[]
/** Optional small caps label above the price. Empty by default (no label shown). */
priceLabel?: string
price?: string
/** Template; the named placeholder "{price}" is replaced by the price. */
priceLine?: string
/** Small line under the price. */
priceNote?: string
/** Small caps label above the commitment checkbox. */
guaranteeLabel?: string
/** The ticked commitment line above the button. */
commitLabel?: string
/** Inline error when the commitment is unticked and the button is pressed. */
commitError?: string
/** Button text. */
label?: string
/** Reassurance line under the button, with an inline lock icon. */
sublabel?: string
/** Label over the phone toggle that picks which alternative to compare against. */
compareLabel?: string
/** Navigation destination; renders the action as a link. */
href?: string
/** Called on an action click once the commitment is ticked. */
onAction?: () => void
disabled?: boolean
/** Forces a visual state for previews. */
state?: "default" | "hover" | "active" | "disabled" | "error"
/** Root class for page-level placement. */
className?: string
}
export function DiyVsDone(props: DiyVsDoneProps) {
const {
headline = (
<>
Three ways to build your first funnel. <span className="dvd-mark">Pick the one with a plan.</span>
</>
),
lead = "Same goal, three roads. Here's how each one stacks up on time, cost, risk and result.",
diy = { title: "Do it yourself", detail: "You figure out every step" },
hire = { title: "Hire it out", detail: "Someone builds it for you" },
ours = { title: "Our way", detail: "The Funnel Starter Kit" },
rows = DEFAULT_ROWS,
altMark = "neutral",
items = [],
priceLabel = "",
price = "$47",
priceLine = "{price} today. That's it.",
priceNote = "One payment · Lifetime access",
guaranteeLabel = "The guarantee",
commitLabel = "I understand I'm covered by the 30-day money-back guarantee.",
commitError = "Tick the box above to continue.",
label = "Get The Starter Kit",
sublabel = "Secure checkout · Instant download",
compareLabel = "Compare our way with",
href,
onAction,
disabled = false,
state,
className,
} = props
const uid = React.useId()
const forced = state ?? "default"
const isDisabled = disabled || forced === "disabled"
const [hot, setHot] = React.useState(-1)
const [compare, setCompare] = React.useState(0)
const [checked, setChecked] = React.useState(forced !== "error")
const [showError, setShowError] = React.useState(forced === "error")
const boxRef = React.useRef<HTMLInputElement>(null)
React.useEffect(() => {
setChecked(forced !== "error")
setShowError(forced === "error")
}, [forced])
const n = rows.length
const gridVars = { "--dvd-body": n + 1, "--dvd-rows": n + 2 } as React.CSSProperties
const thumbs = items.filter((it) => it.image).slice(0, 3)
const ids = {
title: `${uid}-title`,
cmp: `${uid}-cmp`,
ours: `${uid}-ours`,
guar: `${uid}-guar`,
box: `${uid}-box`,
err: `${uid}-err`,
}
const alts = [
{ key: "diy" as const, opt: diy, Icon: Hammer },
{ key: "hire" as const, opt: hire, Icon: Handshake },
]
const describedBy = showError ? ids.err : undefined
function act(event: React.MouseEvent<HTMLElement>) {
if (isDisabled) {
event.preventDefault()
return
}
if (!checked) {
event.preventDefault()
setShowError(true)
boxRef.current?.focus()
return
}
onAction?.()
}
function cell(row: DiyVsDoneRow, i: number, lane: "alt" | "ours", content: React.ReactNode) {
const mark = lane === "ours" ? "check" : altMark === "cross" ? "cross" : "neutral"
return (
<li
key={`${lane}-${i}`}
role="listitem"
className="dvd-cell"
data-hot={hot === i ? "" : undefined}
style={{ "--dvd-i": i } as React.CSSProperties}
onMouseEnter={() => setHot(i)}
>
<span className={`dvd-ic dvd-ic-${mark}`} aria-hidden="true">
{mark === "check" ? (
<Check size={15} strokeWidth={3.25} />
) : mark === "cross" ? (
<X size={14} strokeWidth={3} />
) : (
<Minus size={14} strokeWidth={3} />
)}
</span>
<span className="dvd-lbl">
{row.label}
<span className="dvd-sr">: </span>
</span>
<span className="dvd-txt">{content}</span>
</li>
)
}
return (
<div className={["cf-diy-vs-done", className].filter(Boolean).join(" ")} data-state={forced}>
<style dangerouslySetInnerHTML={{ __html: CSS }} />
{headline || lead ? (
<div className="dvd-head">
{headline ? (
<h2 id={ids.title} className="dvd-title">
{headline}
</h2>
) : null}
{lead ? <p className="dvd-lead">{lead}</p> : null}
</div>
) : null}
<div className="dvd-compare">
<span className="dvd-compare-label" id={ids.cmp}>
{compareLabel}
</span>
<div className="dvd-seg" role="group" aria-labelledby={ids.cmp}>
{alts.map((a, i) => (
<button key={a.key} type="button" className="dvd-seg-btn" aria-pressed={compare === i} onClick={() => setCompare(i)}>
{a.opt.title}
</button>
))}
</div>
</div>
<div className="dvd-grid" style={gridVars} onMouseLeave={() => setHot(-1)}>
<div className="dvd-labels" aria-hidden="true">
<span />
{rows.map((row, i) => {
const Icon = row.icon ? ROW_ICONS[row.icon] : null
return (
<span
key={`label-${i}`}
className="dvd-label"
data-hot={hot === i ? "" : undefined}
onMouseEnter={() => setHot(i)}
>
{Icon ? <Icon size={18} strokeWidth={2.25} /> : null}
<span>{row.label}</span>
</span>
)
})}
</div>
{alts.map((a, ai) => (
<div
key={a.key}
className="dvd-lane dvd-lane-alt"
data-lane={a.key}
data-active={compare === ai ? "true" : "false"}
role="group"
aria-labelledby={`${uid}-${a.key}`}
>
<div className="dvd-lane-head">
<span className="dvd-badge" aria-hidden="true">
<a.Icon size={19} strokeWidth={2.25} />
</span>
<h3 id={`${uid}-${a.key}`} className="dvd-lane-title">
{a.opt.title}
</h3>
{a.opt.detail ? <p className="dvd-detail">{a.opt.detail}</p> : null}
</div>
<ul role="list" className="dvd-list">
{rows.map((row, i) => cell(row, i, "alt", a.key === "diy" ? row.diy : row.hire))}
</ul>
</div>
))}
<div className="dvd-lane dvd-lane-ours" role="group" aria-labelledby={ids.ours}>
<div className="dvd-ours-head">
{thumbs.length ? (
<div className="dvd-thumbs">
{thumbs.map((it, i) => (
<img
key={`${it.name}-${i}`}
src={it.image}
alt={it.imageAlt ?? it.name}
width={104}
height={104}
loading="lazy"
decoding="async"
/>
))}
</div>
) : null}
<h3 id={ids.ours} className="dvd-ours-title">
{ours.title}
</h3>
{ours.detail ? <p className="dvd-ours-detail">{ours.detail}</p> : null}
</div>
<ul role="list" className="dvd-list">
{rows.map((row, i) => cell(row, i, "ours", row.ours))}
</ul>
<div className="dvd-foot-slot" aria-hidden="true" />
</div>
<div className="dvd-foot">
<div className="dvd-pricebox">
{priceLabel ? <span className="dvd-caps">{priceLabel}</span> : null}
<p className="dvd-price">{renderPriceLine(priceLine, price)}</p>
{priceNote ? <p className="dvd-note">{priceNote}</p> : null}
</div>
<div className="dvd-guar">
{guaranteeLabel ? (
<span className="dvd-caps" id={ids.guar}>
{guaranteeLabel}
</span>
) : null}
<label className="dvd-commit" htmlFor={ids.box}>
<span className="dvd-box">
<input
ref={boxRef}
id={ids.box}
type="checkbox"
checked={checked}
disabled={isDisabled}
aria-invalid={showError || undefined}
aria-describedby={describedBy}
onChange={(e) => {
setChecked(e.target.checked)
if (e.target.checked) setShowError(false)
}}
/>
<Check className="dvd-box-tick" size={16} strokeWidth={3.5} aria-hidden="true" />
</span>
<span>{commitLabel}</span>
</label>
{showError ? (
<p id={ids.err} className="dvd-err" role="alert">
<AlertCircle size={16} strokeWidth={2.5} aria-hidden="true" />
<span>{commitError}</span>
</p>
) : null}
</div>
<div className="dvd-action">
{href ? (
<a
className="dvd-btn"
href={isDisabled ? undefined : href}
aria-disabled={isDisabled || undefined}
aria-describedby={describedBy}
onClick={act}
>
{label}
</a>
) : (
<button type="button" className="dvd-btn" disabled={isDisabled} aria-describedby={describedBy} onClick={act}>
{label}
</button>
)}
{sublabel ? (
<p className="dvd-sub">
<Lock size={14} strokeWidth={2.5} aria-hidden="true" />
{sublabel}
</p>
) : null}
</div>
</div>
</div>
</div>
)
}
export default DiyVsDone
const DEFAULT_ROWS: DiyVsDoneRow[] = [
{ label: "Time", icon: "time", diy: "Fit it around your own schedule", hire: "Set by your provider's timeline", ours: "Instant digital access" },
{ label: "Cost", icon: "cost", diy: "Whatever tools you pick", hire: "Your provider's quote", ours: "$47, one payment" },
{ label: "Risk", icon: "risk", diy: "Every decision rests on you", hire: "Your provider's terms", ours: "30-day money-back guarantee" },
{ label: "Result", icon: "result", diy: "Pages you create from scratch", hire: "The deliverables you agree on", ours: "Guide, workbook and checklist, yours to keep" },
]
const ROW_ICONS = { time: Clock3, cost: Wallet, risk: ShieldCheck, result: Flag } as const
/** Splits a price-line template at its "{price}" placeholder so the price renders large between the text runs. */
function renderPriceLine(line: string, price: string): React.ReactNode {
const token = "{price}"
const at = line.indexOf(token)
if (at < 0) return <span className="dvd-price-rest">{line}</span>
const before = line.slice(0, at).trim()
const after = line.slice(at + token.length).trim()
return (
<>
{before ? <span className="dvd-price-rest">{before}</span> : null}
<strong className="dvd-price-num">{price}</strong>
{after ? <span className="dvd-price-rest">{after}</span> : null}
</>
)
}
const CSS = `
.cf-diy-vs-done{container:dvd / inline-size;width:100%;max-width:72rem;margin-inline:auto;font-family:var(--font-body);color:var(--ink);
--dvd-line:oklch(from var(--ink) l c h / 0.1);
--dvd-well:color-mix(in oklch,var(--ink) 4%,var(--surface,#ffffff));
--dvd-pick:color-mix(in oklch,var(--accent-fill,var(--accent)) 7%,var(--card,#ffffff));
--dvd-radius:var(--card-radius,var(--radius,14px));
--dvd-lg:var(--shadow-lg,0 2px 4px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.22),0 12px 24px -8px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.32));
--dvd-md:var(--shadow-md,0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.22),0 4px 10px -2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.2));
--dvd-sm:var(--shadow-sm,0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.18),0 1px 3px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.14));
}
.cf-diy-vs-done *,.cf-diy-vs-done *::before,.cf-diy-vs-done *::after{box-sizing:border-box}
.cf-diy-vs-done .dvd-head{margin:0 0 2.5rem;text-align:center}
.cf-diy-vs-done .dvd-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.02em);font-size:clamp(1.875rem,1.15rem + 2.6vw,3.125rem);line-height:1.08;color:var(--ink);text-wrap:balance}
.cf-diy-vs-done .dvd-mark{padding-inline:.1em;border-radius:.14em;background:linear-gradient(180deg,transparent 54%,color-mix(in oklch,var(--marker,#fae37c) 85%,transparent) 54%,color-mix(in oklch,var(--marker,#fae37c) 85%,transparent) 93%,transparent 93%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-diy-vs-done .dvd-lead{margin:1rem auto 0;max-width:60ch;font-size:clamp(1.0625rem,1rem + .3vw,1.25rem);font-weight:500;line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-diy-vs-done .dvd-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-diy-vs-done .dvd-compare{display:none;flex-direction:column;align-items:center;gap:.625rem;margin:0 0 1.5rem}
.cf-diy-vs-done .dvd-compare-label{font-size:.875rem;font-weight:700;color:var(--muted)}
.cf-diy-vs-done .dvd-seg{display:inline-flex;gap:.25rem;max-width:100%;padding:.25rem;border-radius:999px;background:var(--button-2-bg,var(--secondary,color-mix(in oklch,var(--ink) 8%,var(--surface,#ffffff))))}
.cf-diy-vs-done .dvd-seg-btn{appearance:none;border:0;min-height:2.75rem;padding:0 1.125rem;border-radius:999px;background:transparent;color:var(--button-2-ink,var(--secondary-ink,var(--ink)));font-family:var(--font-body);font-size:.9375rem;font-weight:700;white-space:nowrap;cursor:pointer;transition:background-color .2s ease,box-shadow .2s ease}
.cf-diy-vs-done .dvd-seg-btn[aria-pressed="true"]{background:var(--card,#ffffff);color:var(--ink);box-shadow:var(--dvd-sm)}
.cf-diy-vs-done .dvd-seg-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-diy-vs-done .dvd-grid{display:grid;grid-template-columns:minmax(6.75rem,.58fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.22fr);grid-template-rows:repeat(var(--dvd-rows),auto);column-gap:.75rem}
.cf-diy-vs-done .dvd-labels{grid-column:1;grid-row:1 / span var(--dvd-body);display:grid;grid-template-rows:subgrid}
.cf-diy-vs-done .dvd-label{display:flex;align-items:center;gap:.5rem;padding:1rem .25rem 1rem 0;border-top:1px solid var(--dvd-line);font-size:.875rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);transition:color .2s ease}
.cf-diy-vs-done .dvd-label svg{flex:none}
.cf-diy-vs-done .dvd-label[data-hot]{color:var(--ink)}
.cf-diy-vs-done .dvd-lane{display:grid;grid-template-rows:subgrid;grid-row:1 / span var(--dvd-body);min-width:0;border-radius:var(--dvd-radius)}
.cf-diy-vs-done .dvd-lane-alt{margin-top:1.75rem;background:var(--dvd-well);border:1px solid oklch(from var(--ink) l c h / 0.07)}
.cf-diy-vs-done .dvd-lane-alt[data-lane="diy"]{grid-column:2}
.cf-diy-vs-done .dvd-lane-alt[data-lane="hire"]{grid-column:3}
.cf-diy-vs-done .dvd-lane-ours{grid-column:4;grid-row:1 / span var(--dvd-rows);overflow:hidden;background:var(--dvd-pick);border:1px solid color-mix(in oklch,var(--accent-fill,var(--accent)) 30%,transparent);box-shadow:var(--card-shadow,var(--dvd-lg))}
.cf-diy-vs-done .dvd-list{display:contents;margin:0;padding:0;list-style:none}
.cf-diy-vs-done .dvd-lane-head{display:grid;grid-template-columns:auto minmax(0,1fr);align-content:end;align-items:center;column-gap:.75rem;row-gap:.25rem;padding:1.25rem 1.125rem 1.125rem}
.cf-diy-vs-done .dvd-badge{grid-row:span 2;display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:999px;background:oklch(from var(--ink) l c h / 0.08);color:var(--ink)}
.cf-diy-vs-done .dvd-lane-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:1.25rem;line-height:1.15;color:var(--ink);text-wrap:balance}
.cf-diy-vs-done .dvd-detail{margin:0;font-size:.9375rem;font-weight:500;line-height:1.35;color:var(--muted);text-wrap:pretty}
.cf-diy-vs-done .dvd-ours-head{display:grid;justify-items:center;align-content:end;gap:.375rem;padding:1.5rem 1.375rem 1.375rem;background:var(--band);color:var(--band-ink);text-align:center}
.cf-diy-vs-done .dvd-thumbs{display:flex;justify-content:center;align-items:flex-end;margin:0 0 .75rem;padding:0}
.cf-diy-vs-done .dvd-thumbs img{display:block;width:3.5rem;height:3.5rem;object-fit:cover;object-position:center;border-radius:.5rem;outline:2px solid var(--band);filter:drop-shadow(0 2px 3px oklch(from var(--shadow,oklch(0.22 0.03 260)) calc(l - 0.08) c h / 0.5));transition:transform .25s ease}
.cf-diy-vs-done .dvd-thumbs img + img{margin-left:-.625rem}
.cf-diy-vs-done .dvd-thumbs img:nth-child(1){transform:rotate(-7deg)}
.cf-diy-vs-done .dvd-thumbs img:nth-child(2){position:relative;z-index:1;transform:translateY(-.25rem)}
.cf-diy-vs-done .dvd-thumbs img:nth-child(3){transform:rotate(7deg)}
.cf-diy-vs-done .dvd-lane-ours:hover .dvd-thumbs img:nth-child(1){transform:rotate(-11deg) translateX(-.125rem)}
.cf-diy-vs-done .dvd-lane-ours:hover .dvd-thumbs img:nth-child(3){transform:rotate(11deg) translateX(.125rem)}
.cf-diy-vs-done .dvd-ours-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.01em);font-size:clamp(1.625rem,1.25rem + 1vw,2rem);line-height:1.05;color:var(--band-ink);text-wrap:balance}
.cf-diy-vs-done .dvd-ours-detail{margin:0;font-size:1rem;font-weight:700;line-height:1.3;color:var(--band-ink);text-wrap:balance}
.cf-diy-vs-done .dvd-cell{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:.75rem;min-height:4.25rem;padding:1rem 1.125rem;border-top:1px solid var(--dvd-line);transition:background-color .2s ease}
.cf-diy-vs-done .dvd-lane-ours .dvd-cell:first-child{border-top-color:transparent}
.cf-diy-vs-done .dvd-lane-alt .dvd-cell[data-hot]{background:oklch(from var(--ink) l c h / 0.045)}
.cf-diy-vs-done .dvd-lane-ours .dvd-cell[data-hot]{background:color-mix(in oklch,var(--accent-fill,var(--accent)) 13%,var(--card,#ffffff))}
.cf-diy-vs-done .dvd-lbl{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cf-diy-vs-done .dvd-txt{font-size:1rem;font-weight:500;line-height:1.4;color:var(--ink);text-wrap:pretty}
.cf-diy-vs-done .dvd-lane-ours .dvd-txt{font-size:1.0625rem;font-weight:700}
.cf-diy-vs-done .dvd-ic{display:grid;place-items:center;flex:none;width:1.75rem;height:1.75rem;border-radius:999px;transition:transform .2s ease}
.cf-diy-vs-done .dvd-ic-neutral{background:oklch(from var(--ink) l c h / 0.08);color:var(--muted)}
.cf-diy-vs-done .dvd-ic-cross{background:var(--danger);color:var(--dvd-glyph,#fff)}
.cf-diy-vs-done .dvd-ic-check{background:var(--success);color:var(--dvd-glyph,#fff);animation:cf-dvd-pop .5s cubic-bezier(.34,1.56,.64,1) backwards;animation-delay:calc(var(--dvd-i,0) * 90ms + 160ms)}
.cf-diy-vs-done .dvd-cell[data-hot] .dvd-ic-check{transform:scale(1.1)}
@keyframes cf-dvd-pop{from{transform:scale(.45)}to{transform:scale(1)}}
.cf-diy-vs-done .dvd-foot-slot{min-height:1px}
.cf-diy-vs-done .dvd-foot{grid-column:4;grid-row:var(--dvd-rows);position:relative;z-index:1;display:grid;align-content:start;gap:1.5rem;min-width:0;padding:1.5rem 1.375rem 1.5rem;text-align:center}
.cf-diy-vs-done .dvd-caps{display:block;margin:0 0 .75rem;font-size:.875rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);text-align:center}
.cf-diy-vs-done .dvd-pricebox{display:grid;justify-items:center}
.cf-diy-vs-done .dvd-price{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;column-gap:.5rem;row-gap:.25rem;margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);color:var(--ink);text-align:center}
.cf-diy-vs-done .dvd-price-num{font-size:clamp(2.75rem,2.3rem + 1.4vw,3.375rem);font-weight:inherit;line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink)}
.cf-diy-vs-done .dvd-price-rest{font-size:1.1875rem;line-height:1.2;text-wrap:balance}
.cf-diy-vs-done .dvd-note{margin:.75rem 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-align:center;text-wrap:balance}
.cf-diy-vs-done .dvd-guar{display:grid;justify-items:center}
.cf-diy-vs-done .dvd-commit{display:flex;align-items:flex-start;gap:.75rem;width:fit-content;max-width:100%;margin-inline:auto;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--ink);text-align:left;cursor:pointer;text-wrap:pretty}
.cf-diy-vs-done .dvd-box{position:relative;display:inline-grid;place-items:center;flex:none;width:1.5rem;height:1.5rem;margin-top:.0625rem}
.cf-diy-vs-done .dvd-box input{appearance:none;-webkit-appearance:none;width:100%;height:100%;margin:0;border:2px solid var(--field-border,color-mix(in oklch,var(--ink) 38%,transparent));border-radius:.375rem;background:var(--field,#ffffff);cursor:pointer;transition:background-color .15s ease,border-color .15s ease}
.cf-diy-vs-done .dvd-box input:hover:not(:disabled){border-color:var(--field-focus,var(--accent))}
.cf-diy-vs-done .dvd-box input:checked{background:var(--field-focus,var(--accent));border-color:var(--field-focus,var(--accent))}
.cf-diy-vs-done .dvd-box input:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-diy-vs-done .dvd-box input[aria-invalid="true"]{border-color:var(--danger)}
.cf-diy-vs-done .dvd-box input:disabled{cursor:not-allowed;opacity:.6}
.cf-diy-vs-done .dvd-box-tick{position:absolute;inset:0;margin:auto;color:var(--card,#ffffff);opacity:0;pointer-events:none;transform:scale(.6);transition:opacity .15s ease,transform .15s ease}
.cf-diy-vs-done .dvd-box input:checked + .dvd-box-tick{opacity:1;transform:scale(1)}
.cf-diy-vs-done .dvd-err{display:flex;align-items:flex-start;gap:.5rem;width:fit-content;max-width:100%;margin:.75rem auto 0;padding:.5rem .75rem;border-radius:calc(var(--dvd-radius) * .6);background:var(--danger-soft);color:var(--danger);font-size:.875rem;font-weight:700;line-height:1.4;text-align:left}
.cf-diy-vs-done .dvd-err svg{flex:none;margin-top:.125rem}
.cf-diy-vs-done .dvd-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:3.75rem;padding:.875rem 1.125rem;border:1px solid oklch(from var(--button-bg,var(--cta)) calc(l - 0.12) c h);border-radius:var(--button-radius,var(--radius,10px));background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) calc(l + 0.04) c h),var(--button-bg-2,var(--cta-2)));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.0625rem,.98rem + .35vw,1.25rem);line-height:1.15;text-align:center;text-decoration:none;text-wrap:balance;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),var(--dvd-md));cursor:pointer;transition:transform .15s ease,background .15s ease,box-shadow .15s ease}
.cf-diy-vs-done .dvd-btn:hover:not(:disabled):not([aria-disabled="true"]),.cf-diy-vs-done[data-state="hover"] .dvd-btn{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.05) c h));transform:translateY(-1px)}
.cf-diy-vs-done .dvd-btn:active:not(:disabled):not([aria-disabled="true"]),.cf-diy-vs-done[data-state="active"] .dvd-btn{background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.08) c h));box-shadow:inset 0 2px 3px oklch(from var(--button-bg,var(--cta)) calc(l - 0.22) c h / 0.5),var(--dvd-sm);transform:translateY(2px)}
.cf-diy-vs-done .dvd-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-diy-vs-done .dvd-btn:disabled,.cf-diy-vs-done .dvd-btn[aria-disabled="true"]{border-color:transparent;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:none;cursor:not-allowed;transform:none}
.cf-diy-vs-done .dvd-sub{margin:.75rem 0 0;font-size:.875rem;font-weight:600;line-height:1.35;color:var(--muted);text-align:center;text-wrap:pretty}
.cf-diy-vs-done .dvd-sub svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
@container dvd (max-width: 860px){
.cf-diy-vs-done .dvd-head{margin-bottom:1.75rem}
.cf-diy-vs-done .dvd-compare{display:flex}
.cf-diy-vs-done .dvd-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);column-gap:.5rem}
.cf-diy-vs-done .dvd-labels{display:none}
.cf-diy-vs-done .dvd-lane-alt[data-lane]{grid-column:1;margin-top:1.25rem}
.cf-diy-vs-done .dvd-lane-alt[data-active="false"]{display:none}
.cf-diy-vs-done .dvd-lane-ours{grid-column:2;grid-row:1 / span var(--dvd-body)}
.cf-diy-vs-done .dvd-foot-slot{display:none}
.cf-diy-vs-done .dvd-foot{grid-column:1 / -1;margin-top:.875rem;padding:1.5rem 1.25rem;background:var(--card,#ffffff);border:1px solid var(--card-border,color-mix(in oklch,var(--ink) 12%,transparent));border-radius:var(--dvd-radius);box-shadow:var(--card-shadow,var(--dvd-md))}
.cf-diy-vs-done .dvd-lane-head{grid-template-columns:minmax(0,1fr);padding:1rem .875rem .875rem}
.cf-diy-vs-done .dvd-badge{grid-row:auto;width:2.125rem;height:2.125rem;margin-bottom:.375rem}
.cf-diy-vs-done .dvd-lane-title{font-size:1.0625rem}
.cf-diy-vs-done .dvd-detail{font-size:.875rem}
.cf-diy-vs-done .dvd-ours-head{gap:.25rem;padding:1rem .75rem .875rem}
.cf-diy-vs-done .dvd-thumbs{margin-bottom:.5rem}
.cf-diy-vs-done .dvd-thumbs img{width:2.5rem;height:2.5rem}
.cf-diy-vs-done .dvd-thumbs img + img{margin-left:-.5rem}
.cf-diy-vs-done .dvd-ours-title{font-size:1.375rem}
.cf-diy-vs-done .dvd-ours-detail{font-size:.875rem}
.cf-diy-vs-done .dvd-cell{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"ic lbl" "txt txt";align-content:start;row-gap:.5rem;column-gap:.5rem;min-height:0;padding:.875rem .75rem}
.cf-diy-vs-done .dvd-ic{grid-area:ic;width:1.5rem;height:1.5rem}
.cf-diy-vs-done .dvd-lbl{grid-area:lbl;position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:normal;font-size:.875rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-diy-vs-done .dvd-txt{grid-area:txt;font-size:.9375rem}
.cf-diy-vs-done .dvd-lane-ours .dvd-txt{font-size:1rem}
}
@media (prefers-reduced-motion: reduce){
.cf-diy-vs-done .dvd-ic-check{animation:none}
.cf-diy-vs-done .dvd-cell,.cf-diy-vs-done .dvd-ic,.cf-diy-vs-done .dvd-label,.cf-diy-vs-done .dvd-btn,.cf-diy-vs-done .dvd-thumbs img,.cf-diy-vs-done .dvd-seg-btn,.cf-diy-vs-done .dvd-box input,.cf-diy-vs-done .dvd-box-tick{transition:none}
.cf-diy-vs-done .dvd-cell[data-hot] .dvd-ic-check{transform:none}
.cf-diy-vs-done .dvd-lane-ours:hover .dvd-thumbs img:nth-child(1){transform:rotate(-7deg)}
.cf-diy-vs-done .dvd-lane-ours:hover .dvd-thumbs img:nth-child(3){transform:rotate(7deg)}
}
`
pieces/content/diy-vs-done/specimen.tsx 56 lines
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { DiyVsDone, type DiyVsDoneProps } from "../diy-vs-done"
const sample = defaults.sample
export const states = ["default", "hover", "active", "disabled", "error"]
export default function DiyVsDoneSpecimen({ state }: { state?: DiyVsDoneProps["state"] }) {
return (
<DiyVsDone
state={state}
ours={{ title: "Our way", detail: sample.name }}
rows={[
{
label: "Time",
icon: "time",
diy: "Fit it around your own schedule",
hire: "Set by your provider's timeline",
ours: sample.reassurance[0],
},
{
label: "Cost",
icon: "cost",
diy: "Whatever tools you pick",
hire: "Your provider's quote",
ours: `${sample.price}, one payment`,
},
{
label: "Risk",
icon: "risk",
diy: "Every decision rests on you",
hire: "Your provider's terms",
ours: sample.guarantee,
},
{
label: "Result",
icon: "result",
diy: "Pages you create from scratch",
hire: "The deliverables you agree on",
ours: "Guide, workbook and checklist, yours to keep",
},
]}
items={sample.items.map((item, i) => ({
name: item.name,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
price={sample.price}
priceNote={sample.note}
commitLabel={`I understand I'm covered by the ${sample.guarantee}.`}
label="Get The Starter Kit"
sublabel={sample.sublabel}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalDiyVsDone |
React.ReactNode |
|
lead OptionalDiyVsDone |
string |
|
diy OptionalDiyVsDone |
DiyVsDoneOption |
|
hire OptionalDiyVsDone |
DiyVsDoneOption |
|
ours OptionalDiyVsDone |
DiyVsDoneOption |
|
rows OptionalDiyVsDone |
DiyVsDoneRow[] |
|
altMark OptionalDiyVsDone |
"neutral" | "cross" |
|
items OptionalDiyVsDone |
DiyVsDoneItem[] |
|
priceLabel OptionalDiyVsDone |
string |
|
price OptionalDiyVsDone |
string |
|
priceLine OptionalDiyVsDone |
string |
|
priceNote OptionalDiyVsDone |
string |
|
guaranteeLabel OptionalDiyVsDone |
string |
|
commitLabel OptionalDiyVsDone |
string |
|
commitError OptionalDiyVsDone |
string |
|
label OptionalDiyVsDone |
string |
|
sublabel OptionalDiyVsDone |
string |
|
compareLabel OptionalDiyVsDone |
string |
|
href OptionalDiyVsDone |
string |
|
onAction OptionalDiyVsDone |
() => void |
|
disabled OptionalDiyVsDone |
boolean |
|
state OptionalDiyVsDone |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalDiyVsDone |
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-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus- 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-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB