Quote Request 3
Size-it-up quote request: a live square-footage slider turns the business’s own pricing rule into an honest range, or shows its response promise, on a lit photo stage. Visitors see the math before they hand over their details.
Use it in a prompt
Use forms/quote-request-3 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/forms/quote-request-3.tsx. - Import it and pass your copy and images (Props tab):
import { QuoteRequest3 } from "@/components/funneldna/forms/quote-request-3"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/quote-request-3/component.tsx 703 lines
// layout: product-stage
// Size-it-up quote request: a live square-footage slider turns the business’s own pricing rule into an honest range, or shows its response promise, on a lit photo stage. Visitors see the math before they hand over their details.
import * as React from 'react';
import { AlertCircle, Calculator, Clock, Loader2, Lock, ShieldCheck } from 'lucide-react';
import { Spot } from '../fx/fx';
import chart from '../fx/spots/chart';
import calendar from '../fx/spots/calendar';
import shield from '../fx/spots/shield';
export type QuoteFrequency = {
id: string;
label: string;
/** Visits a month. Turns the per-visit range into a monthly range. */
visitsPerMonth?: number;
};
/** The business’s own pricing rule. Without it, the card shows the promise instead of a range. */
export type QuotePricing = {
/** Lowest rate per square foot for one visit, e.g. 0.011. */
low: number;
/** Highest rate per square foot for one visit. */
high: number;
/** Smallest amount charged for one visit. */
minimum?: number;
currency?: string;
/** Rounds the range outward to this step (default 10). */
roundTo?: number;
};
export type QuoteNote = {
title: string;
text: string;
/** An fx Spot illustration (an imported asset URL). */
spot?: string;
};
export type QuoteLetter = {
greeting?: string;
paragraphs: string[];
/** The owner’s name, set as the signature. */
name?: string;
role?: string;
/** Presenter slot: the owner’s photo. */
image?: string;
imageAlt?: string;
};
export type QuoteRequest3Values = {
squareFeet: number;
frequency: string;
estimate: { low: number; high: number; period: 'visit' | 'month'; currency: string } | null;
company: string;
name: string;
email: string;
phone: string;
};
/** Every visible word. Braced names ({sqft}, {rate}, {visits}, {minimum}, {frequency}, {value}, {step}) are replaced as text. */
export type QuoteRequest3Copy = {
sqftLabel: string;
sqftUnit: string;
sqftValueText: string;
atMaxSuffix: string;
frequencyLabel: string;
perVisit: string;
perMonth: string;
mathVisit: string;
mathMonth: string;
minimumNote: string;
promiseForSize: string;
promiseFor: string;
contactTitle: string;
companyLabel: string;
companyPlaceholder: string;
nameLabel: string;
namePlaceholder: string;
emailLabel: string;
emailPlaceholder: string;
phoneLabel: string;
phonePlaceholder: string;
errorFrequency: string;
errorCompany: string;
errorName: string;
errorEmail: string;
errorPhone: string;
nextStep: string;
stepFrequency: string;
stepCompany: string;
stepName: string;
stepEmail: string;
stepPhone: string;
sending: string;
};
export type QuoteRequest3Props = {
/** Section headline. Wrap the key phrase in <span className='cf-qr3-mark'> to get the marker stroke. */
headline?: React.ReactNode;
lead?: React.ReactNode;
/** Dear-friend note from the owner, set beside the card (above it on phones). */
letter?: QuoteLetter;
/** Short reason-why notes set on the stage beside the card. */
notes?: QuoteNote[];
/** Scene slot: a full-bleed photo of the finished result behind the card. */
sceneImage?: string;
sceneAlt?: string;
cardTitle?: string;
squareFeet?: { min?: number; max?: number; step?: number; initial?: number };
frequencies?: QuoteFrequency[];
pricing?: QuotePricing;
/** The response promise you supply, shown when no pricing rule exists, e.g. 'Your exact price within 24 hours'. */
promise?: string;
/** One line you supply under the range, saying where the range comes from. */
rangeNote?: string;
/** The risk reversal you supply. It leads into the action. Hidden when empty. */
riskLine?: string;
ctaLabel?: string;
privacy?: string;
locale?: string;
copy?: Partial<QuoteRequest3Copy>;
/** Called with validated values. Return a promise to show the sending state until it settles. */
onSubmit?: (values: QuoteRequest3Values) => void | PromiseLike<unknown>;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
className?: string;
};
type FieldKey = 'frequency' | 'company' | 'name' | 'email' | 'phone';
type ContactKey = Exclude<FieldKey, 'frequency'>;
export function QuoteRequest3(props: QuoteRequest3Props) {
const {
headline = DEFAULT_HEADLINE,
lead = '',
letter = DEFAULT_LETTER,
notes = DEFAULT_NOTES,
sceneImage = '',
sceneAlt = 'A spotless open-plan office after an evening clean',
cardTitle = 'Size up your space',
squareFeet,
frequencies = DEFAULT_FREQUENCIES,
pricing,
promise = '',
rangeNote = '',
riskLine = '',
ctaLabel = 'Get my exact price',
privacy = 'We only use your details to prepare this quote.',
locale = 'en-US',
onSubmit,
state = 'default',
className,
} = props;
const c: QuoteRequest3Copy = { ...DEFAULT_COPY, ...props.copy };
const sq = { ...DEFAULT_SQFT, ...squareFeet };
const uid = React.useId();
const id = (s: string) => 'qr3' + uid + s;
const [sqft, setSqft] = React.useState(() => clampNum(sq.initial, sq.min, sq.max));
const [frequency, setFrequency] = React.useState('');
const [values, setValues] = React.useState<Record<ContactKey, string>>({ company: '', name: '', email: '', phone: '' });
const [touched, setTouched] = React.useState<Partial<Record<FieldKey, boolean>>>({});
const [tried, setTried] = React.useState(state === 'error');
const [busy, setBusy] = React.useState(false);
const mounted = React.useRef(true);
const refs = React.useRef<Partial<Record<FieldKey, HTMLInputElement | null>>>({});
React.useEffect(() => {
mounted.current = true;
return () => {
mounted.current = false;
};
}, []);
React.useEffect(() => {
setTried(state === 'error');
}, [state]);
const locked = state === 'disabled';
const freq = frequencies.find((f) => f.id === frequency);
const visits = freq && freq.visitsPerMonth && freq.visitsPerMonth > 0 ? freq.visitsPerMonth : 0;
const est = pricing ? estimateRange(sqft, pricing, visits) : null;
const cur = pricing && pricing.currency ? pricing.currency : '$';
const num = (n: number) => n.toLocaleString(locale);
const money = (n: number) => cur + num(Math.round(n));
const sqftText = num(sqft) + (sqft >= sq.max ? c.atMaxSuffix : '');
const rateText = pricing
? pricing.low === pricing.high
? cur + trimRate(pricing.low)
: cur + trimRate(Math.min(pricing.low, pricing.high)) + '–' + cur + trimRate(Math.max(pricing.low, pricing.high))
: '';
const span = sq.max > sq.min ? sq.max - sq.min : 1;
const pct = Math.min(1, Math.max(0, (sqft - sq.min) / span));
const errors = validate({ frequency, ...values }, c);
const firstMissing = ORDER.find((k) => errors[k]);
const valid = !firstMissing;
const btnDisabled = locked || busy;
const touch = (k: FieldKey) => setTouched((t) => (t[k] ? t : { ...t, [k]: true }));
const shown = (k: FieldKey) => (tried || touched[k] ? errors[k] : undefined);
const submit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (busy || locked) return;
if (!valid) {
setTried(true);
if (firstMissing) refs.current[firstMissing]?.focus();
return;
}
const result = onSubmit?.({
squareFeet: sqft,
frequency,
estimate: est ? { low: est.low, high: est.high, period: visits ? 'month' : 'visit', currency: cur } : null,
company: values.company.trim(),
name: values.name.trim(),
email: values.email.trim(),
phone: values.phone.trim(),
});
if (result && typeof (result as PromiseLike<unknown>).then === 'function') {
setBusy(true);
const done = () => {
if (mounted.current) setBusy(false);
};
(result as PromiseLike<unknown>).then(done, done);
}
};
const contactFields: { key: ContactKey; label: string; placeholder: string; type: string; autoComplete: string; inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'] }[] = [
{ key: 'company', label: c.companyLabel, placeholder: c.companyPlaceholder, type: 'text', autoComplete: 'organization' },
{ key: 'name', label: c.nameLabel, placeholder: c.namePlaceholder, type: 'text', autoComplete: 'name' },
{ key: 'email', label: c.emailLabel, placeholder: c.emailPlaceholder, type: 'email', autoComplete: 'email', inputMode: 'email' },
{ key: 'phone', label: c.phoneLabel, placeholder: c.phonePlaceholder, type: 'tel', autoComplete: 'tel', inputMode: 'tel' },
];
const freqErr = shown('frequency');
return (
<section className={cx('cf-qr3', sceneImage && 'has-photo', className)} aria-labelledby={id('title')}>
<style>{CSS}</style>
{sceneImage ? (
<figure className='cf-qr3-photo'>
<img src={sceneImage} alt={sceneAlt} decoding='async' />
</figure>
) : null}
<div className='cf-qr3-wrap'>
<header className='cf-qr3-head'>
<h2 id={id('title')} className='cf-qr3-h'>{headline}</h2>
{lead ? <p className='cf-qr3-lead'>{lead}</p> : null}
</header>
{letter && letter.paragraphs.length ? (
<div className='cf-qr3-letter'>
{letter.greeting ? <p className='cf-qr3-greet'>{letter.greeting}</p> : null}
{letter.paragraphs.map((p, i) => (
<p className='cf-qr3-para' key={i}>{p}</p>
))}
{letter.name ? (
<div className='cf-qr3-sign'>
{letter.image ? <img className='cf-qr3-avatar' src={letter.image} alt={letter.imageAlt ?? letter.name} width={56} height={56} /> : null}
<p className='cf-qr3-signoff'>
<span className='cf-qr3-signame'>{letter.name}</span>
{letter.role ? <span className='cf-qr3-role'>{letter.role}</span> : null}
</p>
</div>
) : null}
</div>
) : null}
<form className='cf-qr3-card' noValidate onSubmit={submit} aria-labelledby={id('card')}>
<fieldset className='cf-qr3-body' disabled={locked}>
<h3 id={id('card')} className='cf-qr3-title'>{cardTitle}</h3>
<div className='cf-qr3-size'>
<div className='cf-qr3-sizehead'>
<label className='cf-qr3-label' htmlFor={id('sqft')}>{c.sqftLabel}</label>
<span className='cf-qr3-sqft' aria-hidden='true'>
{sqftText}
<small>{c.sqftUnit}</small>
</span>
</div>
<input
id={id('sqft')}
className='cf-qr3-slider'
type='range'
min={sq.min}
max={sq.max}
step={sq.step}
value={sqft}
aria-valuetext={fill(c.sqftValueText, { value: sqftText })}
onChange={(e) => setSqft(Number(e.target.value))}
style={{ '--qr3-pos': 'calc(15px + (100% - 30px) * ' + pct.toFixed(4) + ')' } as React.CSSProperties}
/>
<div className='cf-qr3-scale' aria-hidden='true'>
<span>{num(sq.min)}</span>
<span>{num(sq.max) + c.atMaxSuffix}</span>
</div>
</div>
<fieldset
className={cx('cf-qr3-freq', freqErr && 'is-invalid')}
aria-describedby={freqErr ? id('freq-err') : undefined}
onBlur={(e) => {
const next = e.relatedTarget as Node | null;
if (!next || !e.currentTarget.contains(next)) touch('frequency');
}}
>
<legend className='cf-qr3-label'>{c.frequencyLabel}</legend>
<div className='cf-qr3-chips'>
{frequencies.map((f, i) => (
<label className='cf-qr3-chip' key={f.id}>
<input
ref={i === 0 ? (el) => { refs.current.frequency = el; } : undefined}
type='radio'
name={id('freq')}
value={f.id}
checked={frequency === f.id}
onChange={() => setFrequency(f.id)}
/>
<span>{f.label}</span>
</label>
))}
</div>
{freqErr ? (
<p id={id('freq-err')} className='cf-qr3-err'>
<AlertCircle size={16} strokeWidth={2.5} aria-hidden='true' />
{freqErr}
</p>
) : null}
</fieldset>
{est && pricing ? (
<div className='cf-qr3-well'>
<output className='cf-qr3-out' htmlFor={id('sqft')} aria-live='polite' aria-atomic='true'>
<span className='cf-qr3-fig'>
<span>{money(est.low)}</span>
{est.high > est.low ? (
<>
{' '}
<span>{'– ' + money(est.high)}</span>
</>
) : null}
</span>
<span className='cf-qr3-period'>{visits ? fill(c.perMonth, { visits: num(visits) }) : c.perVisit}</span>
</output>
<p className='cf-qr3-math'>
<Calculator size={16} strokeWidth={2.5} aria-hidden='true' />
{fill(visits ? c.mathMonth : c.mathVisit, { sqft: sqftText, rate: rateText, visits: num(visits) })}
</p>
{est.minApplied && pricing.minimum ? <p className='cf-qr3-fine'>{fill(c.minimumNote, { minimum: money(pricing.minimum) })}</p> : null}
{rangeNote ? <p className='cf-qr3-fine'>{rangeNote}</p> : null}
</div>
) : promise ? (
<div className='cf-qr3-well is-promise'>
<span className='cf-qr3-disc' aria-hidden='true'>
<Clock size={20} strokeWidth={2.5} />
</span>
<div>
<p className='cf-qr3-promise'>{promise}</p>
<output className='cf-qr3-for' htmlFor={id('sqft')} aria-live='polite'>
{freq ? fill(c.promiseFor, { sqft: sqftText, frequency: freq.label }) : fill(c.promiseForSize, { sqft: sqftText })}
</output>
</div>
</div>
) : null}
<div className='cf-qr3-contact'>
<p className='cf-qr3-step'>{c.contactTitle}</p>
<div className='cf-qr3-grid'>
{contactFields.map((f) => {
const err = shown(f.key);
return (
<div className='cf-qr3-field' key={f.key}>
<label className='cf-qr3-label' htmlFor={id(f.key)}>{f.label}</label>
<input
ref={(el) => {
refs.current[f.key] = el;
}}
id={id(f.key)}
name={f.key}
type={f.type}
className='cf-qr3-input'
value={values[f.key]}
placeholder={f.placeholder}
autoComplete={f.autoComplete}
inputMode={f.inputMode}
aria-required='true'
aria-invalid={err ? true : undefined}
aria-describedby={err ? id(f.key + '-err') : undefined}
onChange={(e) => {
const v = e.target.value;
setValues((prev) => ({ ...prev, [f.key]: v }));
}}
onBlur={() => touch(f.key)}
/>
{err ? (
<p id={id(f.key + '-err')} className='cf-qr3-err'>
<AlertCircle size={16} strokeWidth={2.5} aria-hidden='true' />
{err}
</p>
) : null}
</div>
);
})}
</div>
</div>
{riskLine ? (
<p className='cf-qr3-risk'>
<ShieldCheck size={18} strokeWidth={2.5} aria-hidden='true' />
{riskLine}
</p>
) : null}
<button
type='submit'
className={cx('cf-qr3-btn', busy && 'is-busy', state === 'hover' && 'is-hover', state === 'active' && 'is-active')}
disabled={btnDisabled}
aria-describedby={id('help')}
>
{busy ? (
<>
<Loader2 className='cf-qr3-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
{c.sending}
</>
) : (
ctaLabel
)}
</button>
<p className='cf-qr3-help' id={id('help')} aria-live='polite'>
{valid ? (
privacy ? (
<>
<Lock size={16} strokeWidth={2.5} aria-hidden='true' />
{privacy}
</>
) : null
) : (
fill(c.nextStep, { step: firstMissing ? c[STEP_COPY[firstMissing]] : '' })
)}
</p>
</fieldset>
</form>
{notes.length ? (
<ul className='cf-qr3-notes'>
{notes.map((n, i) => (
<li className={cx('cf-qr3-note', !n.spot && 'no-spot')} key={n.title} style={{ animationDelay: Math.min(0.07 + i * 0.07, 0.28) + 's' }}>
{n.spot ? <Spot src={n.spot} size={56} shade='band' light='band-ink' /> : null}
<div>
<h3>{n.title}</h3>
<p>{n.text}</p>
</div>
</li>
))}
</ul>
) : null}
</div>
</section>
);
}
export default QuoteRequest3;
const ORDER: FieldKey[] = ['frequency', 'company', 'name', 'email', 'phone'];
const STEP_COPY: Record<FieldKey, keyof QuoteRequest3Copy> = {
frequency: 'stepFrequency',
company: 'stepCompany',
name: 'stepName',
email: 'stepEmail',
phone: 'stepPhone',
};
function cx(...parts: Array<string | false | null | undefined>) {
return parts.filter(Boolean).join(' ');
}
function fill(template: string, vars: Record<string, string>) {
return Object.keys(vars).reduce((out, key) => out.split('{' + key + '}').join(vars[key]), template);
}
function clampNum(n: number, min: number, max: number) {
return Math.min(max, Math.max(min, n));
}
function digitCount(v: string) {
return v.split('').filter((ch) => ch >= '0' && ch <= '9').length;
}
function isEmail(v: string) {
const s = v.trim();
if (!s || s.indexOf(' ') !== -1) return false;
const at = s.indexOf('@');
if (at < 1 || at !== s.lastIndexOf('@')) return false;
const domain = s.slice(at + 1);
const dot = domain.lastIndexOf('.');
return dot > 0 && dot < domain.length - 2;
}
function trimRate(n: number) {
return String(Number(n.toFixed(4)));
}
function estimateRange(sqft: number, p: QuotePricing, visits: number) {
const step = p.roundTo && p.roundTo > 0 ? p.roundTo : 10;
const min = p.minimum && p.minimum > 0 ? p.minimum : 0;
const rawLow = sqft * Math.min(p.low, p.high);
const rawHigh = sqft * Math.max(p.low, p.high);
const times = visits > 0 ? visits : 1;
const low = Math.max(rawLow, min) * times;
const high = Math.max(rawHigh, min) * times;
return { low: Math.floor(low / step) * step, high: Math.ceil(high / step) * step, minApplied: min > 0 && rawLow < min };
}
function validate(v: { frequency: string } & Record<ContactKey, string>, c: QuoteRequest3Copy) {
const e: Partial<Record<FieldKey, string>> = {};
if (!v.frequency) e.frequency = c.errorFrequency;
if (!v.company.trim()) e.company = c.errorCompany;
if (v.name.trim().length < 2) e.name = c.errorName;
if (!isEmail(v.email)) e.email = c.errorEmail;
if (digitCount(v.phone) < 7) e.phone = c.errorPhone;
return e;
}
const DEFAULT_SQFT = { min: 1000, max: 60000, step: 500, initial: 12000 };
const DEFAULT_HEADLINE: React.ReactNode = (
<>
Tell us your square footage. <span className='cf-qr3-mark'>Get a price with no surprises.</span>
</>
);
const DEFAULT_LETTER: QuoteLetter = {
greeting: 'Hi there,',
paragraphs: [
'Two things set a cleaning price: how big your space is and how often you need us. So that’s all we ask first.',
'Size up your space on the card, then tell us where to send the exact number.',
],
};
const DEFAULT_NOTES: QuoteNote[] = [
{ title: 'Square footage sets the hours', text: 'More floor means more crew time. That’s what moves your number.', spot: chart },
{ title: 'Frequency sets the total', text: 'How often you need us decides what you pay each month.', spot: calendar },
{ title: 'Nothing to sign to ask', text: 'A quote is a number, not a commitment. You decide after.', spot: shield },
];
const DEFAULT_FREQUENCIES: QuoteFrequency[] = [
{ id: 'weekly', label: 'Weekly', visitsPerMonth: 4 },
{ id: 'three', label: '3× a week', visitsPerMonth: 13 },
{ id: 'five', label: '5× a week', visitsPerMonth: 22 },
{ id: 'daily', label: 'Daily', visitsPerMonth: 30 },
];
const DEFAULT_COPY: QuoteRequest3Copy = {
sqftLabel: 'Square footage',
sqftUnit: 'sq ft',
sqftValueText: '{value} square feet',
atMaxSuffix: '+',
frequencyLabel: 'How often should we clean?',
perVisit: 'Starting range per visit. Pick how often to see your month.',
perMonth: 'Starting range per month · about {visits} visits',
mathVisit: '{sqft} sq ft × {rate} per sq ft, per visit',
mathMonth: '{sqft} sq ft × {rate} per sq ft × {visits} visits',
minimumNote: 'Includes our {minimum} minimum per visit.',
promiseForSize: 'Sized for {sqft} sq ft',
promiseFor: 'Sized for {sqft} sq ft · {frequency}',
contactTitle: 'Where should we send your exact price?',
companyLabel: 'Company',
companyPlaceholder: 'Harbor Dental Group',
nameLabel: 'Your name',
namePlaceholder: 'Jordan Lee',
emailLabel: 'Work email',
emailPlaceholder: 'jordan@harbordental.com',
phoneLabel: 'Phone',
phonePlaceholder: '(555) 123-4567',
errorFrequency: 'Pick how often you need us.',
errorCompany: 'Add your company name.',
errorName: 'Add your name.',
errorEmail: 'Enter a work email like jordan@harbordental.com.',
errorPhone: 'Enter a phone number we can call.',
nextStep: 'Almost there: {step} to send your request.',
stepFrequency: 'pick how often we clean',
stepCompany: 'add your company',
stepName: 'add your name',
stepEmail: 'add your work email',
stepPhone: 'add your phone number',
sending: 'Sending…',
};
const CSS = `
.cf-qr3{position:relative;isolation:isolate;overflow:clip;background:var(--band,#1b2a4a);color:var(--band-ink,#fff);font-family:var(--font-body);--qr3-ring:oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / .35);--qr3-line:oklch(from var(--ink,#101828) l c h / .12)}
.cf-qr3 *,.cf-qr3 *::before,.cf-qr3 *::after{box-sizing:border-box}
.cf-qr3-photo{position:absolute;inset:0;z-index:-1;margin:0}
.cf-qr3-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 45%}
.cf-qr3-photo::after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 24% 46% at 50% 64%,oklch(from var(--band,#1b2a4a) l c h / .3),oklch(from var(--band,#1b2a4a) l c h / .62) 70%,oklch(from var(--band,#1b2a4a) l c h / .9) 100%),oklch(from var(--band,#1b2a4a) l c h / .2)}
.cf-qr3-wrap{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,34rem) minmax(0,1fr);grid-template-areas:'head head head' 'letter card notes';column-gap:clamp(32px,4vw,56px);row-gap:48px;align-items:start;max-width:1360px;margin:0 auto;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-qr3-head{grid-area:head;max-width:58rem;margin:0 auto;text-align:center}
.cf-qr3-h{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--band-ink,#fff);text-wrap:balance}
.cf-qr3-mark{--qr3-mk:oklch(from var(--accent-fill,var(--accent,#2563eb)) l c h / .5);background:linear-gradient(180deg,transparent 0 60%,var(--qr3-mk) 60% 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:.12em;padding:0 .08em}
.cf-qr3-lead{max-width:40rem;margin:16px auto 0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-qr3-letter{grid-area:letter;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.55}
.cf-qr3-greet{margin:0 0 12px;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;line-height:1.4}
.cf-qr3-para{margin:0 0 16px;text-wrap:pretty}
.cf-qr3-sign{display:flex;align-items:center;gap:12px;margin-top:24px}
.cf-qr3-avatar{flex:none;width:56px;height:56px;border-radius:999px;object-fit:cover;object-position:50% 30%}
.cf-qr3-signoff{margin:0}
.cf-qr3-signame{display:block;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;letter-spacing:-.01em;color:var(--band-ink,#fff)}
.cf-qr3-role{display:block;margin-top:10px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--band-ink,#fff)}
.cf-qr3-card{grid-area:card;position:relative;padding:clamp(20px,3vw,32px);background:var(--card,#fff);color:var(--ink,#101828);border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 256 / .22),0 12px 24px -8px oklch(0.22 0.03 256 / .32)));animation:qr3-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-qr3-body,.cf-qr3-freq{min-width:0;margin:0;padding:0;border:0}
.cf-qr3-title{margin:0 0 24px;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;text-wrap:balance}
.cf-qr3-label{display:block;font-size:1rem;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink,#101828))}
.cf-qr3-sizehead{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px}
.cf-qr3-sqft{font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--ink,#101828)}
.cf-qr3-sqft small{margin-left:6px;font-family:var(--font-body);font-size:.9375rem;font-weight:700;letter-spacing:0;color:var(--muted,#475467)}
.cf-qr3-slider{--qr3-fill:var(--accent,#2563eb);--qr3-rail:color-mix(in oklch,var(--ink,#101828) 12%,var(--card,#fff));display:block;width:100%;height:44px;margin:8px 0 0;padding:0;background:transparent;-webkit-appearance:none;appearance:none;cursor:grab}
.cf-qr3-slider:active{cursor:grabbing}
.cf-qr3-slider:focus{outline:none}
.cf-qr3-slider::-webkit-slider-runnable-track{height:12px;border-radius:999px;background:linear-gradient(90deg,var(--qr3-fill) var(--qr3-pos,0%),var(--qr3-rail) var(--qr3-pos,0%))}
.cf-qr3-slider::-webkit-slider-thumb{width:30px;height:30px;margin-top:-9px;border-radius:999px;background:var(--card,#fff);border:4px solid var(--qr3-fill);box-shadow:var(--shadow-md,0 1px 2px oklch(0.22 0.03 256 / .22),0 4px 10px -2px oklch(0.22 0.03 256 / .2));-webkit-appearance:none;appearance:none;transition:transform .16s ease,box-shadow .16s ease}
.cf-qr3-slider:hover::-webkit-slider-thumb{transform:scale(1.08)}
.cf-qr3-slider:active::-webkit-slider-thumb{transform:scale(1.16)}
.cf-qr3-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 5px var(--qr3-ring),var(--shadow-sm,0 1px 3px oklch(0.22 0.03 256 / .2))}
.cf-qr3-slider::-moz-range-track{height:12px;border-radius:999px;background:var(--qr3-rail)}
.cf-qr3-slider::-moz-range-progress{height:12px;border-radius:999px;background:var(--qr3-fill)}
.cf-qr3-slider::-moz-range-thumb{width:22px;height:22px;border-radius:999px;background:var(--card,#fff);border:4px solid var(--qr3-fill);box-shadow:var(--shadow-md,0 1px 2px oklch(0.22 0.03 256 / .22),0 4px 10px -2px oklch(0.22 0.03 256 / .2));transition:transform .16s ease}
.cf-qr3-slider:hover::-moz-range-thumb{transform:scale(1.08)}
.cf-qr3-slider:active::-moz-range-thumb{transform:scale(1.16)}
.cf-qr3-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 5px var(--qr3-ring)}
.cf-qr3-slider:disabled{--qr3-fill:color-mix(in oklch,var(--ink,#101828) 32%,var(--card,#fff));cursor:not-allowed}
.cf-qr3-scale{display:flex;justify-content:space-between;margin-top:4px;font-size:.9375rem;font-weight:600;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--muted,#475467)}
.cf-qr3-freq{margin-top:24px}
.cf-qr3-freq legend{margin:0 0 12px;padding:0}
.cf-qr3-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cf-qr3-chip{position:relative;display:block}
.cf-qr3-chip input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.cf-qr3-chip span{display:flex;align-items:center;justify-content:center;min-height:48px;padding:8px 10px;border:1px solid var(--qr3-line);border-radius:var(--radius,12px);background:color-mix(in oklch,var(--ink,#101828) 4%,var(--card,#fff));color:var(--ink,#101828);font-size:.9375rem;font-weight:700;line-height:1.2;text-align:center;text-wrap:balance;cursor:pointer;transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-qr3-chip:hover span{background:color-mix(in oklch,var(--ink,#101828) 8%,var(--card,#fff))}
.cf-qr3-chip:active span{transform:translateY(1px)}
.cf-qr3-chip input:checked + span{background:color-mix(in oklch,var(--accent,#2563eb) 12%,var(--card,#fff));border-color:var(--accent,#2563eb);box-shadow:inset 0 0 0 1px var(--accent,#2563eb)}
.cf-qr3-chip input:focus-visible + span{outline:3px solid oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / .6);outline-offset:2px}
.cf-qr3-chip input:disabled + span{color:var(--muted,#475467);cursor:not-allowed;transform:none}
.cf-qr3-freq.is-invalid .cf-qr3-chip input:not(:checked) + span{border-color:var(--danger,#b42318)}
.cf-qr3-well{margin-top:24px;padding:20px;border-radius:10px;background:color-mix(in oklch,var(--ink,#101828) 4%,var(--card,#fff));container-type:inline-size}
.cf-qr3-out{display:block}
.cf-qr3-fig{display:flex;flex-wrap:wrap;column-gap:.25em;font-family:var(--font-display);font-weight:800;font-size:clamp(2rem,11cqi,3rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--ink,#101828)}
.cf-qr3-fig span{white-space:nowrap}
.cf-qr3-period{display:block;margin-top:12px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted,#475467);text-wrap:pretty}
.cf-qr3-math{margin:16px 0 0;font-size:.9375rem;font-weight:700;line-height:1.45;color:var(--ink,#101828);font-variant-numeric:tabular-nums;text-wrap:pretty}
.cf-qr3-math svg,.cf-qr3-risk svg,.cf-qr3-help svg,.cf-qr3-err svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-qr3-math svg{color:var(--accent,#2563eb)}
.cf-qr3-fine{margin:8px 0 0;font-size:.9375rem;font-weight:500;line-height:1.45;color:var(--muted,#475467);text-wrap:pretty}
.cf-qr3-well.is-promise{display:flex;align-items:flex-start;gap:16px}
.cf-qr3-disc{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#fff))}
.cf-qr3-promise{margin:0;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;color:var(--ink,#101828);text-wrap:balance}
.cf-qr3-for{display:block;margin-top:8px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted,#475467);font-variant-numeric:tabular-nums}
.cf-qr3-contact{margin-top:24px;padding-top:24px;border-top:1px solid var(--qr3-line)}
.cf-qr3-step{margin:0 0 16px;font-family:var(--font-display);font-weight:800;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.3;color:var(--ink,#101828);text-wrap:balance}
.cf-qr3-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.cf-qr3-field .cf-qr3-label{margin-bottom:8px}
.cf-qr3-input{display:block;width:100%;min-height:56px;margin:0;padding:0 16px;font-family:var(--font-body);font-size:17px;font-weight:500;line-height:1.3;color:var(--field-ink,#101828);background:var(--field,#fff);border:1px solid var(--field-border,color-mix(in oklch,var(--ink,#101828) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));-webkit-appearance:none;appearance:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-qr3-input::placeholder{color:color-mix(in oklch,var(--field-ink,#101828) 65%,var(--field,#fff));opacity:1}
.cf-qr3-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--field-ink,#101828) 42%,transparent)}
.cf-qr3-input:focus{outline:none;border-color:var(--field-focus,var(--accent,#2563eb));box-shadow:0 0 0 3px var(--qr3-ring)}
.cf-qr3-input[aria-invalid='true']{border-color:var(--danger,#b42318)}
.cf-qr3-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger,#b42318) l c h / .3)}
.cf-qr3-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink,#101828) 6%,var(--field,#fff))}
.cf-qr3-err{margin:8px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger,#b42318);text-wrap:pretty}
.cf-qr3-risk{margin:24px 0 0;font-size:1rem;font-weight:700;line-height:1.4;text-align:center;color:var(--ink,#101828);text-wrap:pretty}
.cf-qr3-risk svg{color:var(--success,#067647)}
.cf-qr3-btn{--qr3-b:var(--button-bg,var(--cta,#d92d20));--qr3-b2:var(--button-bg-2,var(--cta-2,#b42318));--qr3-sh:var(--shadow,oklch(0.22 0.03 256));--qr3-dl:0;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:60px;margin:24px 0 0;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--qr3-b) calc(l + .04 - var(--qr3-dl)) c h),oklch(from var(--qr3-b2) calc(l - .02 - var(--qr3-dl)) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--qr3-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--qr3-b) calc(l - .16) c h),0 1px 2px oklch(from var(--qr3-sh) l c h / .3),0 8px 16px -6px oklch(from var(--qr3-sh) l c h / .45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-qr3-risk + .cf-qr3-btn{margin-top:12px}
.cf-qr3-btn:hover:not(:disabled),.cf-qr3-btn.is-hover{--qr3-dl:.05;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--qr3-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--qr3-b) calc(l - .16) c h),0 1px 2px oklch(from var(--qr3-sh) l c h / .32),0 10px 20px -6px oklch(from var(--qr3-sh) l c h / .55))}
.cf-qr3-btn:active:not(:disabled),.cf-qr3-btn.is-active{--qr3-dl:.07;transform:translateY(1px);box-shadow:var(--button-shadow,inset 0 2px 4px oklch(from var(--qr3-b) calc(l - .22) c h / .45),inset 0 -2px 0 oklch(from var(--qr3-b) calc(l - .16) c h),0 1px 2px oklch(from var(--qr3-sh) l c h / .3))}
.cf-qr3-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / .7);outline-offset:3px}
.cf-qr3-btn:disabled:not(.is-busy){background:var(--secondary,color-mix(in oklch,var(--ink,#101828) 8%,var(--card,#fff)));color:var(--secondary-ink,var(--ink,#101828));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 3px oklch(0.22 0.03 256 / .2)));cursor:not-allowed;transform:none}
.cf-qr3-btn.is-busy{cursor:progress}
.cf-qr3-spin{animation:qr3-spin .8s linear infinite}
.cf-qr3-help{min-height:1.4em;margin:12px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;text-align:center;color:var(--muted,#475467);text-wrap:pretty}
.cf-qr3-notes{grid-area:notes;display:grid;gap:32px;margin:0;padding:0;list-style:none}
.cf-qr3-note{display:grid;grid-template-columns:56px minmax(0,1fr);gap:16px;align-items:start;animation:qr3-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-qr3-note.no-spot{grid-template-columns:minmax(0,1fr)}
.cf-qr3-note h3{margin:0 0 8px;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:1.3125rem;line-height:1.15;letter-spacing:-.01em;color:var(--band-ink,#fff);text-wrap:balance}
.cf-qr3-note p{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--band-ink,#fff);text-wrap:pretty}
@keyframes qr3-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes qr3-spin{to{transform:rotate(360deg)}}
@media (max-width:1240px){
.cf-qr3-wrap{grid-template-columns:minmax(0,40rem);grid-template-areas:'head' 'letter' 'card' 'notes';justify-content:center;row-gap:40px}
.cf-qr3-head{margin:0;text-align:left}
.cf-qr3-lead{margin-inline:0}
.cf-qr3-photo::after{background:oklch(from var(--band,#1b2a4a) l c h / .86)}
}
@media (max-width:760px){
.cf-qr3.has-photo .cf-qr3-wrap{padding-top:24px}
.cf-qr3-photo{position:relative;inset:auto;z-index:0;height:220px}
.cf-qr3-photo::after{background:linear-gradient(180deg,oklch(from var(--band,#1b2a4a) l c h / 0) 40%,var(--band,#1b2a4a))}
.cf-qr3-wrap{row-gap:32px}
.cf-qr3-grid{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:560px){
.cf-qr3-chips{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){
.cf-qr3-card,.cf-qr3-note,.cf-qr3-spin{animation:none}
.cf-qr3-btn,.cf-qr3-chip span,.cf-qr3-input{transition:none}
.cf-qr3-slider::-webkit-slider-thumb{transition:none}
.cf-qr3-slider::-moz-range-thumb{transition:none}
}
`;
pieces/forms/quote-request-3/specimen.tsx 41 lines
import __studioImage4d0426d9 from "../assets/b59095fce200b570.webp";
import __studioImageac35275a from "../assets/29626e41b224db7d.webp";
// Specimen: Clearpane Commercial Cleaning sizes up an office on a lit photo stage and shows its per-square-foot range live.
import * as React from 'react';
import { QuoteRequest3 } from '../quote-request-3';
import type { QuoteRequest3Props } from '../quote-request-3';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
export default function QuoteRequest3Specimen({ state = 'default' }: { state?: QuoteRequest3Props['state'] }) {
return (
<QuoteRequest3
state={state}
sceneImage={slot('scene', __studioImage4d0426d9)}
sceneAlt='A spotless open-plan office with polished floors after an evening clean'
headline={
<>
Slide to your square footage. <span className='cf-qr3-mark'>See your cleaning price now.</span>
</>
}
letter={{
greeting: 'Hi there,',
paragraphs: [
'Most cleaning companies won’t talk price until they’ve walked your floors. You deserve the ballpark first.',
'So here’s our math, in the open. Slide to your square footage, pick how often, and you’ll see the range we quote from.',
],
name: 'Dana Ortiz',
role: 'Owner, Clearpane Commercial Cleaning',
image: slot('presenter', __studioImageac35275a),
imageAlt: 'Dana Ortiz, owner of Clearpane Commercial Cleaning',
}}
cardTitle='Size up your space'
pricing={{ low: 0.011, high: 0.014, minimum: 120, currency: '$' }}
rangeNote='Built from our posted per-square-foot rates. Your free walkthrough sets the exact number.'
riskLine='Free walkthrough. Nothing to sign for a quote.'
ctaLabel='Get my exact price'
privacy='We only use your details to prepare your Clearpane quote.'
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalQuoteRequest3 |
React.ReactNode |
|
lead OptionalQuoteRequest3 |
React.ReactNode |
|
letter OptionalQuoteRequest3 |
QuoteLetter |
|
notes OptionalQuoteRequest3 |
QuoteNote[] |
|
sceneImage OptionalQuoteRequest3 |
string |
|
sceneAlt OptionalQuoteRequest3 |
string |
|
cardTitle OptionalQuoteRequest3 |
string |
|
squareFeet OptionalQuoteRequest3 |
{ min?: number; max?: number; step?: number; initial?: number } |
|
frequencies OptionalQuoteRequest3 |
QuoteFrequency[] |
|
pricing OptionalQuoteRequest3 |
QuotePricing |
|
promise OptionalQuoteRequest3 |
string |
|
rangeNote OptionalQuoteRequest3 |
string |
|
riskLine OptionalQuoteRequest3 |
string |
|
ctaLabel OptionalQuoteRequest3 |
string |
|
privacy OptionalQuoteRequest3 |
string |
|
locale OptionalQuoteRequest3 |
string |
|
copy OptionalQuoteRequest3 |
Partial<QuoteRequest3Copy> |
|
onSubmit OptionalQuoteRequest3 |
(values: QuoteRequest3Values) => void | PromiseLike<unknown> |
|
state OptionalQuoteRequest3 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalQuoteRequest3 |
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-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.
presenter- A photo of the host, coach or founder.
scene- A wide atmosphere photo behind or beside the copy.
-
29626e41b224db7d.webp
image/webp · 138 KB
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
369bb6f216bb84ab.webp
image/webp · 22.6 KB
-
7d6f1c81c93d8f71.webp
image/webp · 18.2 KB
-
b59095fce200b570.webp
image/webp · 132 KB