Quote Estimator 1
Quote estimator: three quick taps turn the supplied rate card into a live price range, so the visitor trusts the number before asking for the exact quote.
Use it in a prompt
Use content/quote-estimator 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/quote-estimator.tsx. - Import it and pass your copy and images (Props tab):
import { QuoteEstimator } from "@/components/funneldna/content/quote-estimator"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/quote-estimator/component.tsx 818 lines
// layout: segmented-stepper
// Quote estimator: three quick taps turn the supplied rate card into a live price range, so the visitor trusts the number before asking for the exact quote.
import * as React from "react";
import { AlertCircle, Check, Minus, Plus } from "lucide-react";
import { FX_HOST, Pattern, Spot } from "../fx/fx";
import savings from "../fx/spots/savings";
export type QuoteUnitKey = "room" | "sqft";
export type QuoteUnit = {
label: string; // toggle label, e.g. "Rooms"
singular: string; // "room"
plural: string; // "rooms"
per: string; // fills {per} in fromLabel, e.g. "a room"
fieldLabel: string;
hint?: string;
placeholder: string; // a realistic example answer
min: number;
max: number;
step: number; // increment for the − / + buttons
};
export type QuoteService = {
id: string;
label: string;
detail?: string;
icon?: React.ReactNode; // a lucide icon at 20px
rates: Partial<Record<QuoteUnitKey, [number, number]>>; // low and high price per unit
minimum?: number; // job minimum applied to both ends of the range
};
export type QuoteTiming = {
id: string;
label: string;
detail?: string;
note?: string; // short chip, e.g. "+10% priority"
factor: number; // multiplies the range
};
export type QuoteEstimatorAnswers = {
serviceId: string;
service: string;
unit: QuoteUnitKey;
size: number;
timingId: string;
timing: string;
low: number;
high: number;
currency: string;
};
export type QuoteEstimatorProps = {
services: QuoteService[]; // the job cards on step 1, each with its rate card
timings: QuoteTiming[]; // the timing cards on step 3
units?: Record<QuoteUnitKey, QuoteUnit>; // copy and limits for each way of measuring
currency?: string; // ISO code, e.g. "USD"
locale?: string; // number and currency formatting, e.g. "en-US"
roundTo?: number; // the range is rounded outward to this amount
headline?: string;
highlight?: string; // phrase inside the headline set in the accent colour
lead?: string;
stepLabels?: [string, string, string]; // segmented stepper tabs
stepTitles?: [string, string, string]; // question heading for each step
stepsLabel?: string; // accessible name of the stepper nav
stepStatus?: string; // screen-reader status; placeholders {n}, {total}, {label}
unitToggleLabel?: string; // accessible name of the unit toggle
fromLabel?: string; // placeholders {price}, {per}
sizeError?: string; // placeholders {min}, {max}, {unit}
decreaseLabel?: string; // − button label, followed by the unit plural ("Fewer rooms")
increaseLabel?: string; // + button label, followed by the unit plural ("More rooms")
estimateLabel?: string; // small line above the price range
estimatePending?: string; // shown under the range until a timing is picked
estimateSummary?: string; // placeholders {size}, {unit}, {service}, {timing}
rangeJoin?: string; // screen-reader word between the two prices
nextLabel?: string;
backLabel?: string;
ctaLabel?: string;
secondaryLine?: string; // quiet line under the CTA on the last step; empty hides it
secondaryHref?: string; // makes secondaryLine a link (e.g. tel:)
psLabel?: string;
ps?: string; // empty hides the P.S.
photoImage?: string; // slot: scene (finished work); omitted hides the photo
photoAlt?: string;
photoCaption?: string;
spotImage?: string | null; // fx Spot beside the estimate; null hides it
onSubmit?: (answers: QuoteEstimatorAnswers) => void; // validated answers and range from the final CTA
onAction?: (answers: QuoteEstimatorAnswers) => void; // legacy alias, used only when onSubmit is undefined
state?: "default" | "hover" | "active" | "disabled" | "error";
className?: string;
};
export function QuoteEstimator(props: QuoteEstimatorProps) {
const {
services,
timings,
units = DEFAULT_UNITS,
currency = "USD",
locale = "en-US",
roundTo = 50,
headline = "See your price before anyone visits",
highlight = "before anyone visits",
lead = "Answer three quick questions and get a ballpark range from the real rate card. Your exact quote follows a short visit.",
stepLabels = ["Pick the job", "Size it up", "Choose timing"],
stepTitles = ["What do you need done?", "How big is the job?", "When do you want it done?"],
stepsLabel = "Estimate steps",
stepStatus = "Step {n} of {total}: {label}",
unitToggleLabel = "Measure by",
fromLabel = "From {price} {per}",
sizeError = "Enter a whole number between {min} and {max} {unit}.",
decreaseLabel = "Fewer",
increaseLabel = "More",
estimateLabel = "Estimate, exact quote after a visit",
estimatePending = "Pick a timing to finish your range.",
estimateSummary = "{size} {unit} · {service} · {timing}",
rangeJoin = "to",
nextLabel = "Next",
backLabel = "Back",
ctaLabel = "Get my exact quote",
secondaryLine = "",
secondaryHref,
psLabel = "P.S.",
ps = "",
photoImage,
photoAlt = "",
photoCaption = "",
spotImage = savings,
onSubmit,
onAction,
state,
className,
} = props;
const uid = React.useId();
const [d, setD] = React.useState<Draft>(() => seedDraft(state, services, timings, units));
const userNav = React.useRef(false);
const headRef = React.useRef<HTMLHeadingElement>(null);
const inputRef = React.useRef<HTMLInputElement>(null);
React.useEffect(() => {
userNav.current = false;
setD(seedDraft(state, services, timings, units));
// Reseed only when the preview state changes, never on new array identities.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state]);
React.useEffect(() => {
if (userNav.current) headRef.current?.focus();
}, [d.step]);
const money = (n: number) => formatMoney(n, locale, currency);
const service = services.find((s) => s.id === d.serviceId);
const unitKeys = unitsOf(service);
const unit: QuoteUnitKey = service && service.rates[d.unit] ? d.unit : unitKeys[0] ?? d.unit;
const u = units[unit];
const size = parseSize(d.sizeText);
const sizeValid = size !== null && size >= u.min && size <= u.max;
const showError = d.touched && d.sizeText.trim() !== "" && !sizeValid;
const timing = timings.find((t) => t.id === d.timingId);
const canReach: boolean[] = [true, Boolean(service), Boolean(service) && sizeValid];
const range =
service && sizeValid && size !== null
? computeRange(service, unit, size, timing ? timing.factor : 1, roundTo)
: null;
const unitWord = size === 1 ? u.singular : u.plural;
const summaries = [
service ? service.label : "",
service && sizeValid && size !== null ? `${formatNumber(size, locale)} ${unitWord}` : "",
timing ? timing.label : "",
];
const nextDisabled = d.step === 0 ? !service : d.step === 1 ? d.sizeText.trim() === "" : false;
const ctaDisabled = !timing || !range;
const update = (patch: Partial<Draft>) => setD((prev) => ({ ...prev, ...patch }));
const goTo = (i: number) => {
if (i < 0 || i > 2 || i === d.step || !canReach[i]) return;
userNav.current = true;
update({ step: i });
};
const chooseService = (s: QuoteService) => {
const keys = unitsOf(s);
if (keys.includes(d.unit)) update({ serviceId: s.id });
else update({ serviceId: s.id, unit: keys[0] ?? d.unit, sizeText: "", touched: false });
};
const chooseUnit = (k: QuoteUnitKey) => {
if (k !== unit) update({ unit: k, sizeText: "", touched: false });
};
const bump = (dir: 1 | -1) => {
const next =
size === null ? u.min : clamp(Math.round((size + dir * u.step) / u.step) * u.step, u.min, u.max);
update({ sizeText: String(next), touched: true, unit });
};
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (d.step === 0) {
goTo(1);
return;
}
if (d.step === 1) {
if (sizeValid) goTo(2);
else {
update({ touched: true });
inputRef.current?.focus();
}
return;
}
const submit = onSubmit ?? onAction;
if (service && timing && range && size !== null && submit) {
submit({
serviceId: service.id,
service: service.label,
unit,
size,
timingId: timing.id,
timing: timing.label,
low: range.low,
high: range.high,
currency,
});
}
};
const describedBy = showError ? `${uid}-err` : u.hint ? `${uid}-hint` : undefined;
return (
<section
className={cx("cf-quote-estimator", className)}
data-force={state === "hover" || state === "active" ? state : undefined}
aria-labelledby={`${uid}-title`}
>
<style>{CSS}</style>
<div
className="qe-fx"
aria-hidden="true"
style={{ ...FX_HOST, position: "absolute", inset: 0, zIndex: 0, pointerEvents: "none" }}
>
<Pattern name="plus" fade="corner" />
</div>
<div className="qe-wrap">
<header className="qe-head">
<h2 id={`${uid}-title`} className="qe-h2">
{withHighlight(headline, highlight)}
</h2>
{lead ? <p className="qe-lead">{lead}</p> : null}
</header>
<form className="qe-card" onSubmit={handleSubmit} noValidate aria-labelledby={`${uid}-title`}>
<nav aria-label={stepsLabel}>
<div className="qe-seg" style={{ "--i": d.step } as React.CSSProperties}>
<span className="qe-thumb" aria-hidden="true" />
<ol>
{stepLabels.map((label, i) => (
<li key={label + i}>
<button
type="button"
className="qe-seg-btn"
aria-current={i === d.step ? "step" : undefined}
disabled={!canReach[i]}
onClick={() => goTo(i)}
>
{i < d.step ? (
<span className="qe-done" aria-hidden="true">
<Check size={16} strokeWidth={3} />
</span>
) : (
<span className="qe-num" aria-hidden="true">
{i + 1}
</span>
)}
<span className="qe-seg-text">
<span className="qe-seg-label">{label}</span>
{summaries[i] ? <span className="qe-seg-sum">{summaries[i]}</span> : null}
</span>
</button>
</li>
))}
</ol>
</div>
</nav>
<div className="qe-body">
<div className="qe-panel">
<p className="qe-sr" aria-live="polite">
{fill(stepStatus, { n: d.step + 1, total: 3, label: stepLabels[d.step] })}
</p>
<div className="qe-step" key={d.step}>
<h3 ref={headRef} tabIndex={-1} id={`${uid}-step`} className="qe-h3">
{stepTitles[d.step]}
</h3>
{d.step === 0 ? (
<div className="qe-options" role="radiogroup" aria-labelledby={`${uid}-step`}>
{services.map((s) => {
const selected = s.id === d.serviceId;
const k = unitsOf(s)[0];
const rate = k ? s.rates[k] : undefined;
return (
<label key={s.id} className="qe-opt" data-selected={selected ? "" : undefined}>
<input
className="qe-sr-input"
type="radio"
name={`${uid}-job`}
value={s.id}
checked={selected}
onChange={() => chooseService(s)}
/>
{s.icon ? (
<span className="qe-ico" aria-hidden="true">
{s.icon}
</span>
) : null}
<span className="qe-opt-text">
<span className="qe-opt-title">{s.label}</span>
{s.detail ? <span className="qe-opt-detail">{s.detail}</span> : null}
{rate && k ? (
<span className="qe-opt-from">
{fill(fromLabel, { price: money(rate[0]), per: units[k].per })}
</span>
) : null}
</span>
<span className="qe-radio" aria-hidden="true" />
</label>
);
})}
</div>
) : null}
{d.step === 1 ? (
<>
{unitKeys.length > 1 ? (
<div className="qe-units" role="radiogroup" aria-label={unitToggleLabel}>
{unitKeys.map((k) => (
<label key={k} className="qe-unit" data-selected={k === unit ? "" : undefined}>
<input
className="qe-sr-input"
type="radio"
name={`${uid}-unit`}
value={k}
checked={k === unit}
onChange={() => chooseUnit(k)}
/>
{units[k].label}
</label>
))}
</div>
) : null}
<div className="qe-field">
<label className="qe-label" htmlFor={`${uid}-size`}>
{u.fieldLabel}
</label>
<div className="qe-num-row">
<button
type="button"
className="qe-step-btn"
aria-label={`${decreaseLabel} ${u.plural}`}
aria-controls={`${uid}-size`}
disabled={size !== null && size <= u.min}
onClick={() => bump(-1)}
>
<Minus size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
<span className="qe-input-wrap">
<input
ref={inputRef}
id={`${uid}-size`}
className="qe-input"
type="text"
inputMode="numeric"
autoComplete="off"
placeholder={u.placeholder}
value={d.sizeText}
onChange={(e) => update({ sizeText: e.target.value, unit })}
onBlur={() => {
if (d.sizeText.trim() !== "") update({ touched: true });
}}
aria-invalid={showError || undefined}
aria-describedby={describedBy}
/>
<span className="qe-suffix" aria-hidden="true">
{u.plural}
</span>
</span>
<button
type="button"
className="qe-step-btn"
aria-label={`${increaseLabel} ${u.plural}`}
aria-controls={`${uid}-size`}
disabled={size !== null && size >= u.max}
onClick={() => bump(1)}
>
<Plus size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
{showError ? (
<p className="qe-error" id={`${uid}-err`} role="alert">
<AlertCircle size={18} strokeWidth={2.5} aria-hidden="true" />
{fill(sizeError, {
min: formatNumber(u.min, locale),
max: formatNumber(u.max, locale),
unit: u.plural,
})}
</p>
) : u.hint ? (
<p className="qe-hint" id={`${uid}-hint`}>
{u.hint}
</p>
) : null}
</div>
</>
) : null}
{d.step === 2 ? (
<>
<div
className="qe-options qe-options--timing"
role="radiogroup"
aria-labelledby={`${uid}-step`}
>
{timings.map((t) => {
const selected = t.id === d.timingId;
return (
<label
key={t.id}
className="qe-opt qe-opt--timing"
data-selected={selected ? "" : undefined}
>
<input
className="qe-sr-input"
type="radio"
name={`${uid}-when`}
value={t.id}
checked={selected}
onChange={() => update({ timingId: t.id })}
/>
<span className="qe-opt-text">
<span className="qe-opt-title">{t.label}</span>
{t.detail ? <span className="qe-opt-detail">{t.detail}</span> : null}
{t.note ? <span className="qe-chip">{t.note}</span> : null}
</span>
<span className="qe-radio" aria-hidden="true" />
</label>
);
})}
</div>
{range ? (
<div className="qe-estimate">
{spotImage ? (
<span className="qe-spot" aria-hidden="true">
<Spot src={spotImage} size={72} />
</span>
) : null}
<div className="qe-est-copy" aria-live="polite">
<p className="qe-est-label">{estimateLabel}</p>
<p className="qe-range qe-range-in" key={`${range.low}-${range.high}`}>
<span>{money(range.low)}</span>
<span>
<span aria-hidden="true">– </span>
<span className="qe-sr">{rangeJoin} </span>
{money(range.high)}
</span>
</p>
<p className="qe-est-note">
{timing && service && size !== null
? fill(estimateSummary, {
size: formatNumber(size, locale),
unit: unitWord,
service: service.label,
timing: timing.label,
})
: estimatePending}
</p>
</div>
</div>
) : null}
</>
) : null}
</div>
<div className="qe-nav" data-final={d.step === 2 ? "" : undefined}>
{d.step > 0 ? (
<button type="button" className="qe-back" onClick={() => goTo(d.step - 1)}>
{backLabel}
</button>
) : null}
{d.step < 2 ? (
<button type="submit" className="qe-btn qe-next" disabled={nextDisabled}>
{nextLabel}
</button>
) : (
<button type="submit" className="qe-btn qe-cta" disabled={ctaDisabled}>
{ctaLabel}
</button>
)}
</div>
{d.step === 2 && (secondaryLine || ps) ? (
<div className="qe-after">
{secondaryLine ? (
secondaryHref ? (
<a className="qe-quiet" href={secondaryHref}>
{secondaryLine}
</a>
) : (
<p className="qe-quiet-text">{secondaryLine}</p>
)
) : null}
{ps ? (
<p className="qe-ps">
<strong>{psLabel}</strong> {ps}
</p>
) : null}
</div>
) : null}
</div>
{photoImage ? (
<figure className="qe-photo">
<span className="qe-photo-frame">
<img src={photoImage} alt={photoAlt} width={800} height={1000} loading="lazy" decoding="async" />
</span>
{photoCaption ? <figcaption>{photoCaption}</figcaption> : null}
</figure>
) : null}
</div>
</form>
</div>
</section>
);
}
export default QuoteEstimator;
type Draft = {
step: number;
serviceId: string;
unit: QuoteUnitKey;
sizeText: string;
touched: boolean;
timingId: string;
};
const UNIT_ORDER: QuoteUnitKey[] = ["room", "sqft"];
const DEFAULT_UNITS: Record<QuoteUnitKey, QuoteUnit> = {
room: {
label: "Rooms",
singular: "room",
plural: "rooms",
per: "a room",
fieldLabel: "How many rooms?",
hint: "Count each bedroom, bathroom and hallway as one room.",
placeholder: "4",
min: 1,
max: 30,
step: 1,
},
sqft: {
label: "Square feet",
singular: "sq ft",
plural: "sq ft",
per: "a sq ft",
fieldLabel: "About how many square feet?",
hint: "A good guess is fine. Exact measurements come on the visit.",
placeholder: "1800",
min: 100,
max: 12000,
step: 100,
},
};
function unitsOf(service?: QuoteService): QuoteUnitKey[] {
return service ? UNIT_ORDER.filter((k) => Boolean(service.rates[k])) : [];
}
function seedDraft(
state: QuoteEstimatorProps["state"],
services: QuoteService[],
timings: QuoteTiming[],
units: Record<QuoteUnitKey, QuoteUnit>,
): Draft {
const first = services[0];
const unit = unitsOf(first)[0] ?? "room";
const u = units[unit];
const filled = {
serviceId: first ? first.id : "",
unit,
sizeText: String(parseSize(u.placeholder) ?? u.min),
touched: false,
timingId: "",
};
switch (state) {
case "error":
return { ...filled, step: 1, sizeText: String(Math.max(0, u.min - 1)), touched: true };
case "disabled":
return { ...filled, step: 2 };
case "hover":
case "active":
return { ...filled, step: 2, timingId: timings[0] ? timings[0].id : "" };
default:
return { step: 0, serviceId: "", unit, sizeText: "", touched: false, timingId: "" };
}
}
function computeRange(
service: QuoteService,
unit: QuoteUnitKey,
size: number,
factor: number,
roundTo: number,
): { low: number; high: number } | null {
const rate = service.rates[unit];
if (!rate) return null;
const step = roundTo > 0 ? roundTo : 1;
const floor = service.minimum ?? 0;
const low = Math.floor(Math.max(size * rate[0] * factor, floor) / step) * step;
let high = Math.ceil(Math.max(size * rate[1] * factor, floor) / step) * step;
if (high <= low) high = low + step;
return { low, high };
}
function parseSize(text: string): number | null {
const t = text.replace(/[, ]/g, "");
if (!/^[0-9]+$/.test(t)) return null;
return Number(t);
}
function clamp(n: number, min: number, max: number): number {
return Math.min(max, Math.max(min, n));
}
function formatMoney(n: number, locale: string, currency: string): string {
const digits = n < 10 && n % 1 !== 0 ? 2 : 0;
try {
return new Intl.NumberFormat(locale, {
style: "currency",
currency,
minimumFractionDigits: digits,
maximumFractionDigits: digits,
}).format(n);
} catch {
return String(n);
}
}
function formatNumber(n: number, locale: string): string {
try {
return new Intl.NumberFormat(locale).format(n);
} catch {
return String(n);
}
}
function fill(template: string, vars: Record<string, string | number>): string {
return template.replace(/[{]([a-zA-Z]+)[}]/g, (m: string, k: string) => (k in vars ? String(vars[k]) : m));
}
function withHighlight(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="qe-em">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
function cx(...parts: Array<string | undefined | false>): string {
return parts.filter(Boolean).join(" ");
}
const CSS = `
.cf-quote-estimator{position:relative;isolation:isolate;overflow-x:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-quote-estimator *,.cf-quote-estimator *::before,.cf-quote-estimator *::after{box-sizing:border-box}
.cf-quote-estimator .qe-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-quote-estimator .qe-head{max-width:46rem;margin:0 auto clamp(32px,4vw,48px);text-align:center}
.cf-quote-estimator .qe-h2{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-quote-estimator .qe-em{color:var(--accent)}
.cf-quote-estimator .qe-lead{margin:16px auto 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-quote-estimator .qe-card{--qe-pad:clamp(20px,3vw,32px);margin:0;padding:var(--qe-pad);background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .22),0 12px 24px -8px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .32)))}
.cf-quote-estimator .qe-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-quote-estimator .qe-sr-input{position:absolute;top:0;left:0;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.cf-quote-estimator .qe-seg{position:relative;padding:4px;border-radius:calc(var(--radius,12px) + 4px);background:color-mix(in oklch,var(--ink) 5%,var(--card))}
.cf-quote-estimator .qe-seg ol{position:relative;z-index:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:0;list-style:none}
.cf-quote-estimator .qe-seg li{min-width:0}
.cf-quote-estimator .qe-thumb{position:absolute;top:4px;bottom:4px;left:4px;width:calc((100% - 8px) / 3);border-radius:var(--radius,12px);background:var(--card);box-shadow:var(--shadow-sm,0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .18),0 1px 3px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .14));transform:translateX(calc(var(--i,0) * 100%));transition:transform .4s cubic-bezier(.2,.7,.2,1)}
.cf-quote-estimator .qe-seg-btn{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:8px 16px;border:0;border-radius:var(--radius,12px);background:transparent;color:var(--muted);font:inherit;text-align:left;cursor:pointer;transition:color .16s ease,background-color .16s ease}
.cf-quote-estimator .qe-seg-btn[aria-current=step]{color:var(--ink);cursor:default}
.cf-quote-estimator .qe-seg-btn:disabled{cursor:not-allowed}
.cf-quote-estimator .qe-seg-btn:not(:disabled):not([aria-current]):hover{background:color-mix(in oklch,var(--ink) 5%,transparent);color:var(--ink)}
.cf-quote-estimator .qe-seg-btn:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.cf-quote-estimator .qe-num{flex:none;min-width:24px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;text-align:center;font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-quote-estimator .qe-seg-btn:disabled .qe-num{color:var(--muted)}
.cf-quote-estimator .qe-done{flex:none;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:999px;background:var(--success);color:var(--success-ink,#fff)}
.cf-quote-estimator .qe-seg-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.cf-quote-estimator .qe-seg-label{font-size:15px;font-weight:700;line-height:1.25;text-wrap:balance}
.cf-quote-estimator .qe-seg-sum{overflow:hidden;font-size:14px;font-weight:600;line-height:1.3;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}
.cf-quote-estimator .qe-body{display:grid;gap:clamp(24px,3vw,40px);margin-top:clamp(24px,3vw,32px)}
.cf-quote-estimator .qe-panel{display:flex;flex-direction:column;min-width:0}
.cf-quote-estimator .qe-step{animation:cf-qe-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-quote-estimator .qe-h3{margin:0;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;outline:none}
.cf-quote-estimator .qe-h3:focus-visible{outline:3px solid var(--accent);outline-offset:4px;border-radius:4px}
.cf-quote-estimator .qe-options{display:grid;gap:12px;margin-top:24px}
.cf-quote-estimator .qe-opt{position:relative;display:flex;align-items:flex-start;gap:16px;padding:20px 52px 20px 20px;border-radius:var(--radius,12px);background:color-mix(in oklch,var(--ink) 4%,var(--card));box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .08);cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease}
.cf-quote-estimator .qe-opt:hover{background:color-mix(in oklch,var(--ink) 6%,var(--card));box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .24);transform:translateY(-1px)}
.cf-quote-estimator .qe-opt:active{transform:translateY(0) scale(.99)}
.cf-quote-estimator .qe-opt[data-selected]{background:color-mix(in oklch,var(--accent) 10%,var(--card));box-shadow:inset 0 0 0 2px var(--accent),var(--shadow-md,0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .22),0 4px 10px -2px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .2))}
.cf-quote-estimator .qe-opt:has(.qe-sr-input:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
.cf-quote-estimator .qe-opt--timing{flex-direction:column;gap:0;padding:16px}
.cf-quote-estimator .qe-opt--timing .qe-opt-title{padding-right:32px}
.cf-quote-estimator .qe-ico{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--card);color:var(--accent);box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .1)}
.cf-quote-estimator .qe-ico svg{width:20px;height:20px}
.cf-quote-estimator .qe-opt[data-selected] .qe-ico{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));box-shadow:none}
.cf-quote-estimator .qe-opt-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.cf-quote-estimator .qe-opt-title{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.25;color:var(--ink);text-wrap:balance}
.cf-quote-estimator .qe-opt-detail{font-size:15px;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-quote-estimator .qe-opt-from{margin-top:8px;font-size:15px;font-weight:700;line-height:1.4;color:var(--ink);font-variant-numeric:tabular-nums}
.cf-quote-estimator .qe-chip{align-self:flex-start;display:inline-flex;align-items:center;min-height:28px;margin-top:12px;padding:4px 12px;border-radius:999px;background:var(--card);box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .12);font-size:14px;font-weight:800;line-height:1.2;color:var(--ink)}
.cf-quote-estimator .qe-radio{position:absolute;top:20px;right:20px;width:22px;height:22px;border-radius:999px;background:var(--card);box-shadow:inset 0 0 0 2px oklch(from var(--ink) l c h / .3)}
.cf-quote-estimator .qe-opt--timing .qe-radio{top:16px;right:16px}
.cf-quote-estimator .qe-opt[data-selected] .qe-radio{background:var(--accent-fill,var(--accent));box-shadow:none}
.cf-quote-estimator .qe-opt[data-selected] .qe-radio::after{content:'';position:absolute;inset:7px;border-radius:999px;background:var(--accent-fill-ink,var(--card))}
.cf-quote-estimator .qe-units{display:inline-flex;gap:4px;margin-top:24px;padding:4px;border-radius:calc(var(--radius,12px) + 4px);background:color-mix(in oklch,var(--ink) 5%,var(--card))}
.cf-quote-estimator .qe-unit{position:relative;display:inline-flex;align-items:center;min-height:44px;padding:0 20px;border-radius:var(--radius,12px);font-size:15px;font-weight:700;color:var(--muted);cursor:pointer;transition:color .16s ease,background-color .16s ease,box-shadow .16s ease}
.cf-quote-estimator .qe-unit:hover{color:var(--ink)}
.cf-quote-estimator .qe-unit[data-selected]{background:var(--card);color:var(--ink);box-shadow:var(--shadow-sm,0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .18),0 1px 3px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .14))}
.cf-quote-estimator .qe-unit:has(.qe-sr-input:focus-visible){outline:3px solid var(--accent);outline-offset:2px}
.cf-quote-estimator .qe-field{margin-top:24px}
.cf-quote-estimator .qe-label{display:block;margin-bottom:8px;font-size:17px;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-quote-estimator .qe-num-row{display:flex;align-items:stretch;gap:8px;max-width:420px}
.cf-quote-estimator .qe-input-wrap{position:relative;display:block;flex:1 1 auto;min-width:0}
.cf-quote-estimator .qe-input{display:block;width:100%;height:56px;padding:0 72px 0 16px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));background:var(--field);color:var(--field-ink);font-family:var(--font-body);font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;transition:border-color .16s ease,box-shadow .16s ease}
.cf-quote-estimator .qe-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1;font-weight:400}
.cf-quote-estimator .qe-input:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-quote-estimator .qe-input[aria-invalid=true]{border-color:var(--danger)}
.cf-quote-estimator .qe-input[aria-invalid=true]:focus{border-color:var(--danger);box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-quote-estimator .qe-suffix{position:absolute;top:50%;right:16px;transform:translateY(-50%);font-size:15px;font-weight:600;color:color-mix(in oklch,var(--field-ink) 70%,var(--field));pointer-events:none}
.cf-quote-estimator .qe-step-btn{flex:none;display:grid;place-items:center;width:56px;height:56px;padding:0;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease}
.cf-quote-estimator .qe-step-btn:not(:disabled):hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cf-quote-estimator .qe-step-btn:not(:disabled):active{transform:translateY(1px);box-shadow:none}
.cf-quote-estimator .qe-step-btn:disabled{opacity:.5;cursor:not-allowed}
.cf-quote-estimator .qe-step-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.cf-quote-estimator .qe-hint{margin:8px 0 0;font-size:15px;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-quote-estimator .qe-error{margin:8px 0 0;font-size:15px;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
.cf-quote-estimator .qe-error svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-quote-estimator .qe-estimate{display:flex;align-items:center;gap:20px;margin-top:24px;padding:clamp(20px,3vw,28px);border-radius:var(--radius,10px);background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-quote-estimator .qe-spot{flex:none;display:block}
.cf-quote-estimator .qe-est-copy{min-width:0}
.cf-quote-estimator .qe-est-label{margin:0;font-size:15px;font-weight:700;line-height:1.4;color:var(--muted)}
.cf-quote-estimator .qe-range{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:.3em;margin:12px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.05;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink);transform-origin:left center}
.cf-quote-estimator .qe-range>span{white-space:nowrap}
.cf-quote-estimator .qe-range-in{animation:cf-qe-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-quote-estimator .qe-est-note{margin:12px 0 0;font-size:15px;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-quote-estimator .qe-nav{display:flex;align-items:center;gap:12px;margin-top:auto;padding-top:32px}
.cf-quote-estimator .qe-btn{display:inline-flex;align-items:center;justify-content:center;min-height:56px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;white-space:nowrap;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(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 / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .3),0 8px 16px -6px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}
.cf-quote-estimator .qe-btn:not(:disabled):hover,.cf-quote-estimator[data-force=hover] .qe-cta:not(:disabled){background:linear-gradient(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:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.1) c h / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.2) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .34),0 10px 20px -6px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .55))}
.cf-quote-estimator .qe-btn:not(:disabled):active,.cf-quote-estimator[data-force=active] .qe-cta:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.08) c h));box-shadow:var(--button-shadow,inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - 0.22) c h / .5),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 256)) l c h / .3))}
.cf-quote-estimator .qe-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.cf-quote-estimator .qe-btn:disabled{background:var(--secondary);color:var(--secondary-ink);box-shadow:none;text-shadow:none;cursor:not-allowed}
.cf-quote-estimator .qe-next{margin-left:auto;min-width:200px}
.cf-quote-estimator .qe-cta{flex:1 1 auto;min-height:64px}
.cf-quote-estimator .qe-back{display:inline-flex;align-items:center;justify-content:center;min-height:56px;margin-right:auto;padding:0 24px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.15;white-space:nowrap;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease}
.cf-quote-estimator .qe-back:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cf-quote-estimator .qe-back:active{transform:translateY(1px);box-shadow:none}
.cf-quote-estimator .qe-back:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.cf-quote-estimator .qe-nav[data-final] .qe-back{margin-right:0}
.cf-quote-estimator .qe-after{display:grid;gap:12px;margin-top:16px}
.cf-quote-estimator .qe-quiet{justify-self:start;font-size:15px;font-weight:600;line-height:1.4;color:var(--muted);text-decoration:underline;text-decoration-color:oklch(from var(--muted) l c h / .5);text-underline-offset:.18em}
.cf-quote-estimator .qe-quiet:hover{color:var(--ink);text-decoration-color:currentColor}
.cf-quote-estimator .qe-quiet:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:4px}
.cf-quote-estimator .qe-quiet-text{margin:0;font-size:15px;font-weight:600;line-height:1.4;color:var(--muted)}
.cf-quote-estimator .qe-ps{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-quote-estimator .qe-ps strong{font-weight:800}
.cf-quote-estimator .qe-photo{display:flex;flex-direction:column;gap:12px;min-width:0;margin:0}
.cf-quote-estimator .qe-photo-frame{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;border-radius:var(--radius,12px);background:color-mix(in oklch,var(--ink) 6%,var(--card))}
.cf-quote-estimator .qe-photo img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.cf-quote-estimator .qe-photo figcaption{font-size:15px;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
@media (min-width:560px){
.cf-quote-estimator .qe-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.cf-quote-estimator .qe-options--timing{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
}
@media (min-width:900px){
.cf-quote-estimator .qe-body{grid-template-columns:minmax(0,1fr) minmax(0,.7fr);align-items:stretch}
.cf-quote-estimator .qe-panel{min-height:440px}
.cf-quote-estimator .qe-photo-frame{flex:1 1 auto;aspect-ratio:auto;min-height:280px}
}
@media (max-width:559px){
.cf-quote-estimator .qe-spot{display:none}
}
@media (max-width:639px){
.cf-quote-estimator .qe-card{--qe-pad:16px}
.cf-quote-estimator .qe-seg-btn{flex-direction:column;justify-content:center;gap:4px;min-height:72px;padding:8px 4px;text-align:center}
.cf-quote-estimator .qe-seg-text{align-items:center}
.cf-quote-estimator .qe-seg-sum{display:none}
.cf-quote-estimator .qe-seg-label{font-size:14px;line-height:1.2}
.cf-quote-estimator .qe-opt{padding:16px 48px 16px 16px}
.cf-quote-estimator .qe-radio{top:16px;right:16px}
.cf-quote-estimator .qe-nav{padding-top:24px}
.cf-quote-estimator .qe-btn{padding:0 16px}
.cf-quote-estimator .qe-h3{font-size:1.3125rem}
.cf-quote-estimator .qe-back{padding:0 18px}
.cf-quote-estimator .qe-next{flex:1 1 auto;min-width:0}
.cf-quote-estimator .qe-num-row{max-width:none}
}
@keyframes cf-qe-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-qe-pop{from{opacity:.82;transform:scale(.9)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
.cf-quote-estimator .qe-step,.cf-quote-estimator .qe-range-in{animation:none}
.cf-quote-estimator .qe-thumb,.cf-quote-estimator .qe-seg-btn,.cf-quote-estimator .qe-opt,.cf-quote-estimator .qe-unit,.cf-quote-estimator .qe-input,.cf-quote-estimator .qe-step-btn,.cf-quote-estimator .qe-btn,.cf-quote-estimator .qe-back{transition:none}
.cf-quote-estimator .qe-opt:hover,.cf-quote-estimator .qe-opt:active,.cf-quote-estimator .qe-btn:not(:disabled):active,.cf-quote-estimator[data-force=active] .qe-cta:not(:disabled),.cf-quote-estimator .qe-back:active,.cf-quote-estimator .qe-step-btn:not(:disabled):active{transform:none}
}
`;
pieces/content/quote-estimator/specimen.tsx 91 lines
import __studioImage8bc3d3c4 from "../assets/af9bc327f4d3dfeb.webp";
// Specimen: Brushline Painters, a fictional local painting company, shows a live price range before the walk-through.
import * as React from "react";
import { DoorOpen, Home, LampCeiling, PaintRoller } from "lucide-react";
import { QuoteEstimator } from "../quote-estimator";
import type { QuoteEstimatorProps, QuoteService, QuoteTiming } from "../quote-estimator";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled", "error"];
const services: QuoteService[] = [
{
id: "interior",
label: "Interior repaint",
detail: "Walls, trim and doors, two full coats",
icon: <PaintRoller size={20} strokeWidth={2.5} aria-hidden="true" />,
rates: { room: [420, 640], sqft: [2.4, 3.6] },
minimum: 600,
},
{
id: "exterior",
label: "Exterior repaint",
detail: "Siding, trim and doors in weather-rated paint",
icon: <Home size={20} strokeWidth={2.5} aria-hidden="true" />,
rates: { sqft: [1.9, 3.4] },
minimum: 2500,
},
{
id: "ceilings",
label: "Ceilings only",
detail: "Flat or textured, stain-blocking primer included",
icon: <LampCeiling size={20} strokeWidth={2.5} aria-hidden="true" />,
rates: { room: [180, 290], sqft: [1.2, 1.9] },
minimum: 400,
},
{
id: "trim",
label: "Trim & doors",
detail: "Baseboards, casings and interior doors",
icon: <DoorOpen size={20} strokeWidth={2.5} aria-hidden="true" />,
rates: { room: [160, 260] },
minimum: 400,
},
];
const timings: QuoteTiming[] = [
{
id: "asap",
label: "As soon as possible",
detail: "Next open crew, usually within 2 weeks",
note: "+10% priority",
factor: 1.1,
},
{
id: "month",
label: "In the next month",
detail: "Booked on our regular schedule",
note: "Standard rate",
factor: 1,
},
{
id: "flex",
label: "I’m flexible",
detail: "We fit you in between larger jobs",
note: "5% off",
factor: 0.95,
},
];
export default function QuoteEstimatorSpecimen({ state = "default" }: { state?: QuoteEstimatorProps["state"] }) {
return (
<QuoteEstimator
state={state}
services={services}
timings={timings}
headline="See your painting price before anyone visits"
highlight="before anyone visits"
lead="Three quick questions, a real range from our rate card. Your exact quote comes after a free 20-minute walk-through."
secondaryLine="or call (555) 014-2290 to talk it through"
secondaryHref="tel:+15550142290"
ps="The walk-through is free, and your exact price is in writing before a single brush comes out."
photoImage={slot(
"scene",
__studioImage8bc3d3c4,
)}
photoAlt="Freshly painted living room with sage green walls and crisp white trim"
photoCaption="Every Brushline quote covers prep, two full coats and a spotless clean-up."
onSubmit={() => {}}
/>
);
}
| Name | Type | Details |
|---|---|---|
services RequiredQuoteEstimator |
QuoteService[] |
|
timings RequiredQuoteEstimator |
QuoteTiming[] |
|
units OptionalQuoteEstimator |
Record<QuoteUnitKey, QuoteUnit> |
|
currency OptionalQuoteEstimator |
string |
|
locale OptionalQuoteEstimator |
string |
|
roundTo OptionalQuoteEstimator |
number |
|
headline OptionalQuoteEstimator |
string |
|
highlight OptionalQuoteEstimator |
string |
|
lead OptionalQuoteEstimator |
string |
|
stepLabels OptionalQuoteEstimator |
[string, string, string] |
|
stepTitles OptionalQuoteEstimator |
[string, string, string] |
|
stepsLabel OptionalQuoteEstimator |
string |
|
stepStatus OptionalQuoteEstimator |
string |
|
unitToggleLabel OptionalQuoteEstimator |
string |
|
fromLabel OptionalQuoteEstimator |
string |
|
sizeError OptionalQuoteEstimator |
string |
|
decreaseLabel OptionalQuoteEstimator |
string |
|
increaseLabel OptionalQuoteEstimator |
string |
|
estimateLabel OptionalQuoteEstimator |
string |
|
estimatePending OptionalQuoteEstimator |
string |
|
estimateSummary OptionalQuoteEstimator |
string |
|
rangeJoin OptionalQuoteEstimator |
string |
|
nextLabel OptionalQuoteEstimator |
string |
|
backLabel OptionalQuoteEstimator |
string |
|
ctaLabel OptionalQuoteEstimator |
string |
|
secondaryLine OptionalQuoteEstimator |
string |
|
secondaryHref OptionalQuoteEstimator |
string |
|
psLabel OptionalQuoteEstimator |
string |
|
ps OptionalQuoteEstimator |
string |
|
photoImage OptionalQuoteEstimator |
string |
|
photoAlt OptionalQuoteEstimator |
string |
|
photoCaption OptionalQuoteEstimator |
string |
|
spotImage OptionalQuoteEstimator |
string | null |
|
onSubmit OptionalQuoteEstimator |
(answers: QuoteEstimatorAnswers) => void |
|
onAction OptionalQuoteEstimator |
(answers: QuoteEstimatorAnswers) => void |
|
state OptionalQuoteEstimator |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalQuoteEstimator |
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-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
87170e25e6a4d825.webp
image/webp · 18.7 KB
-
af9bc327f4d3dfeb.webp
image/webp · 125 KB