Call Booking 2
Next-available demo booking on a dark stage. The soonest supplied slot is set huge in the visitor's own time zone,
Use it in a prompt
Use forms/call-booking-2 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/call-booking-2.tsx. - Import it and pass your copy and images (Props tab):
import { CallBooking2 } from "@/components/funneldna/forms/call-booking-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/call-booking-2/component.tsx 624 lines
// layout: classic-centred-stack
// Next-available demo booking on a dark stage. The soonest supplied slot is set huge in the visitor's own time zone,
// with one work-email field and one book button, so booking a demo is one decision instead of a calendar hunt.
import * as React from "react";
import { Check, ChevronDown, Globe, Loader2, Lock, X } from "lucide-react";
import { Backdrop, FX_HOST } from "../fx/fx";
import office from "../fx/backdrops/office";
export type BookingSlot = {
/** ISO 8601 start time with an offset, e.g. "2026-11-24T15:30:00Z" */
start: string;
/** true when the slot can no longer be booked (shown struck, with the taken label) */
disabled?: boolean;
};
export type BookingZone = {
/** IANA time zone, e.g. "America/New_York" */
id: string;
label: string;
};
export type CallBooking2Values = {
email: string;
/** the chosen slot's ISO start, exactly as supplied */
slot: string;
/** the time zone the visitor saw the slot in */
timeZone: string;
};
export type CallBooking2Copy = {
nextLabel: string;
pickedLabel: string;
zoneLabel: string;
zonePlaceholder: string;
moreTimes: string;
fewerTimes: string;
listLabel: string;
takenLabel: string;
selectedLabel: string;
emailLabel: string;
emailPlaceholder: string;
errorEmpty: string;
errorInvalid: string;
noSlots: string;
booking: string;
/** button label used when no slot is open */
bookFallback: string;
};
export type CallBooking2Props = {
headline?: React.ReactNode;
salutation?: string;
/** short letter paragraphs under the salutation */
letter?: React.ReactNode[];
agendaIntro?: string;
/** what happens on the call: three short points */
agenda?: string[];
signoff?: string;
hostName?: string;
hostRole?: string;
/** presenter slot: the person who runs the call */
hostImage?: string;
hostImageAlt?: string;
/** bookable times, soonest first; the first open one is the big slot */
slots?: BookingSlot[];
/** line under the big time, e.g. "30 minutes · Live on Zoom" */
duration?: string;
timeZones?: BookingZone[];
/** starting time zone; defaults to the visitor's browser zone */
timeZone?: string;
/** BCP 47 locale for times; defaults to the visitor's browser */
locale?: string;
/** risk reversal set right above the form */
riskLine?: React.ReactNode;
/** button label; {time} and {day} are replaced with the chosen slot */
buttonLabel?: string;
note?: string;
privacy?: string;
/** designed backdrop photo; the fx Backdrop also takes the page's scene image */
backdropImage?: string;
copy?: Partial<CallBooking2Copy>;
defaultExpanded?: boolean;
disabled?: boolean;
/** receives the validated booking; return a promise to show the loading state */
onSubmit?: (values: CallBooking2Values) => void | Promise<unknown>;
state?: "default" | "hover" | "active" | "disabled" | "error";
className?: string;
};
const DEFAULT_COPY: CallBooking2Copy = {
nextLabel: "Next available",
pickedLabel: "Your chosen time",
zoneLabel: "Show times in",
zonePlaceholder: "Choose your time zone…",
moreTimes: "See other times",
fewerTimes: "Hide other times",
listLabel: "Other available times",
takenLabel: "Taken",
selectedLabel: "(selected)",
emailLabel: "Work email",
emailPlaceholder: "you@company.com",
errorEmpty: "Enter your work email so we can send your invite.",
errorInvalid: "That email doesn’t look right. Check it and try again.",
noSlots: "No times are open right now. Check back soon.",
booking: "Booking your demo…",
bookFallback: "Book my free demo",
};
const DEFAULT_LETTER: React.ReactNode[] = [
"Pick the time that suits you and we’ll walk you through it live, on work like yours.",
];
const DEFAULT_AGENDA = [
"See it working on a real example like yours",
"Get your questions answered on the spot",
"Leave with a clear next step",
];
const DEFAULT_ZONES: BookingZone[] = [
{ id: "America/Los_Angeles", label: "Pacific Time (Los Angeles)" },
{ id: "America/Denver", label: "Mountain Time (Denver)" },
{ id: "America/Chicago", label: "Central Time (Chicago)" },
{ id: "America/New_York", label: "Eastern Time (New York)" },
{ id: "Europe/London", label: "London" },
{ id: "Europe/Berlin", label: "Central Europe (Berlin)" },
{ id: "Asia/Dubai", label: "Dubai" },
{ id: "Asia/Kolkata", label: "India (Kolkata)" },
{ id: "Asia/Singapore", label: "Singapore" },
{ id: "Australia/Sydney", label: "Sydney" },
{ id: "UTC", label: "UTC" },
];
export function CallBooking2(props: CallBooking2Props) {
const {
headline = "Grab the next live demo",
salutation = "Hi there,",
letter = DEFAULT_LETTER,
agendaIntro = "On the call, we’ll:",
agenda = DEFAULT_AGENDA,
signoff = "Talk soon,",
hostName = "",
hostRole = "",
hostImage,
hostImageAlt = "",
slots = [],
duration = "",
timeZones = DEFAULT_ZONES,
timeZone,
locale,
riskLine = "It’s free, it’s live and there’s no card needed. Not a fit? We’ll tell you straight.",
buttonLabel = "Book my free {time} demo",
note = "",
privacy = "",
backdropImage = office,
copy: copyProp,
defaultExpanded = false,
disabled = false,
onSubmit,
state = "default",
className,
} = props;
const copy = { ...DEFAULT_COPY, ...copyProp };
const uid = React.useId();
const ids = {
head: uid + "h",
zone: uid + "zone",
list: uid + "list",
email: uid + "email",
err: uid + "err",
};
const valid = React.useMemo(() => slots.filter((s) => !Number.isNaN(new Date(s.start).getTime())), [slots]);
const firstOpen = valid.findIndex((s) => !s.disabled);
const forcedPick = state === "active" ? nthOpen(valid, 1) : -1;
const [tz, setTz] = React.useState<string>(() => validZone(timeZone) ?? browserZone() ?? "UTC");
React.useEffect(() => {
const z = validZone(timeZone);
if (z) setTz(z);
}, [timeZone]);
const [picked, setPicked] = React.useState(-1);
const [open, setOpen] = React.useState(defaultExpanded);
const [email, setEmail] = React.useState("");
const [error, setError] = React.useState<string | null>(null);
const [pending, setPending] = React.useState(false);
const live = React.useRef(true);
React.useEffect(() => {
live.current = true;
return () => {
live.current = false;
};
}, []);
const inputRef = React.useRef<HTMLInputElement>(null);
const toggleRef = React.useRef<HTMLButtonElement>(null);
const choice =
forcedPick >= 0 ? forcedPick : picked >= 0 && valid[picked] && !valid[picked].disabled ? picked : firstOpen;
const expanded = state === "active" ? true : open;
const isDisabled = disabled || state === "disabled" || choice < 0;
const shownError = error ?? (state === "error" ? copy.errorEmpty : null);
const zones = React.useMemo(
() => (timeZones.some((z) => z.id === tz) ? timeZones : [...timeZones, { id: tz, label: zoneName(tz) }]),
[timeZones, tz]
);
const current = choice >= 0 ? fmt(valid[choice].start, tz, locale) : null;
const days = React.useMemo(() => groupByDay(valid, tz, locale), [valid, tz, locale]);
const btnText = current
? buttonLabel.split("{time}").join(current.time).split("{day}").join(current.day)
: copy.bookFallback;
const check = (v: string) => (!v.trim() ? copy.errorEmpty : isEmail(v.trim()) ? null : copy.errorInvalid);
const pick = (i: number) => {
setPicked(i);
setOpen(false);
toggleRef.current?.focus();
};
const submit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (isDisabled || pending || !current) return;
const err = check(email);
setError(err);
if (err) {
inputRef.current?.focus();
return;
}
const result = onSubmit?.({ email: email.trim(), slot: valid[choice].start, timeZone: tz });
if (result && typeof (result as Promise<unknown>).then === "function") {
setPending(true);
const done = () => {
if (live.current) setPending(false);
};
(result as Promise<unknown>).then(done, done);
}
};
const btnClass = [
"cfcb2-btn",
state === "hover" ? "is-hover" : "",
state === "active" ? "is-active" : "",
]
.filter(Boolean)
.join(" ");
return (
<section
className={["cf-call-booking-2", className].filter(Boolean).join(" ")}
style={FX_HOST}
aria-labelledby={ids.head}
>
<style>{CSS}</style>
<Backdrop src={backdropImage} treatment="scrim-dark" position="center" />
<div className="cfcb2-inner">
<h2 id={ids.head} className="cfcb2-h">
{headline}
</h2>
{(salutation || letter.length > 0) && (
<div className="cfcb2-letter">
{salutation && <p className="cfcb2-salute">{salutation}</p>}
{letter.map((p, i) => (
<p key={i}>{p}</p>
))}
</div>
)}
{agenda.length > 0 && (
<div className="cfcb2-agenda">
{agendaIntro && <p className="cfcb2-agenda-intro">{agendaIntro}</p>}
<ol>
{agenda.map((a, i) => (
<li key={i} style={{ animationDelay: Math.min(i * 0.07, 0.28) + "s" }}>
<span className="cfcb2-num" aria-hidden="true">
{i + 1}
</span>
<span>{a}</span>
</li>
))}
</ol>
</div>
)}
{(hostName || hostImage) && (
<div className="cfcb2-sign">
{hostImage && <img src={hostImage} alt={hostImageAlt} width={56} height={56} loading="lazy" />}
<div>
{signoff && <p className="cfcb2-sign-close">{signoff}</p>}
{hostName && <p className="cfcb2-sign-name">{hostName}</p>}
{hostRole && <p className="cfcb2-sign-role">{hostRole}</p>}
</div>
</div>
)}
<div className="cfcb2-stage">
<div className="cfcb2-zone">
<label htmlFor={ids.zone} className="cfcb2-zone-label">
{copy.zoneLabel}
</label>
<span className="cfcb2-select-wrap">
<Globe className="cfcb2-globe" size={18} strokeWidth={2.5} aria-hidden="true" />
<select id={ids.zone} className="cfcb2-select" value={tz} onChange={(e) => setTz(e.target.value)}>
<option value="" disabled>
{copy.zonePlaceholder}
</option>
{zones.map((z) => (
<option key={z.id} value={z.id}>
{z.label}
</option>
))}
</select>
<ChevronDown className="cfcb2-caret" size={18} strokeWidth={2.5} aria-hidden="true" />
</span>
</div>
<div className="cfcb2-slot" aria-live="polite" aria-atomic="true">
{current ? (
<>
<p className="cfcb2-kicker">
<span className="cfcb2-dot" aria-hidden="true" />
{choice === firstOpen ? copy.nextLabel : copy.pickedLabel}
</p>
<p className="cfcb2-time" key={tz + "|" + choice}>
<span>{current.main}</span>
{current.period && <span className="cfcb2-period">{current.period}</span>}
</p>
<p className="cfcb2-date">
{current.date}
{current.abbr ? " · " + current.abbr : ""}
</p>
{duration && <p className="cfcb2-duration">{duration}</p>}
</>
) : (
<p className="cfcb2-none">{copy.noSlots}</p>
)}
</div>
{valid.length > 1 && (
<>
<button
ref={toggleRef}
type="button"
className="cfcb2-more"
aria-expanded={expanded}
aria-controls={ids.list}
onClick={() => setOpen((o) => !o)}
>
{expanded ? copy.fewerTimes : copy.moreTimes}
<ChevronDown size={18} strokeWidth={2.5} aria-hidden="true" />
</button>
{expanded && (
<div id={ids.list} className="cfcb2-list" role="group" aria-label={copy.listLabel}>
{days.map((d) => (
<div key={d.key} className="cfcb2-day">
<p className="cfcb2-day-name">{d.label}</p>
<ul className="cfcb2-chips">
{d.items.map((it) => {
const sel = it.index === choice;
return (
<li key={it.index}>
<button
type="button"
className="cfcb2-chip"
aria-pressed={sel}
disabled={it.disabled}
onClick={() => pick(it.index)}
>
{sel && <Check size={16} strokeWidth={2.5} aria-hidden="true" />}
<span className="cfcb2-chip-time">{it.time}</span>
{it.disabled && <span className="cfcb2-taken">{copy.takenLabel}</span>}
{sel && <span className="cfcb2-sr">{copy.selectedLabel}</span>}
</button>
</li>
);
})}
</ul>
</div>
))}
</div>
)}
</>
)}
{riskLine && <p className="cfcb2-risk">{riskLine}</p>}
<form className="cfcb2-form" noValidate onSubmit={submit}>
<label htmlFor={ids.email} className="cfcb2-label">
{copy.emailLabel}
</label>
<div className="cfcb2-row">
<input
ref={inputRef}
id={ids.email}
className="cfcb2-input"
type="email"
name="email"
inputMode="email"
autoComplete="email"
required
placeholder={copy.emailPlaceholder}
value={email}
disabled={isDisabled}
aria-invalid={shownError ? true : undefined}
aria-describedby={shownError ? ids.err : undefined}
onChange={(e) => {
setEmail(e.target.value);
if (error) setError(check(e.target.value));
}}
/>
<button type="submit" className={btnClass} disabled={isDisabled} aria-busy={pending || undefined}>
{pending ? (
<>
<Loader2 className="cfcb2-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{copy.booking}</span>
</>
) : (
<span>{btnText}</span>
)}
</button>
</div>
{shownError && (
<p id={ids.err} className="cfcb2-err" role="alert">
<span className="cfcb2-err-badge" aria-hidden="true">
<X size={16} strokeWidth={3} />
</span>
{shownError}
</p>
)}
{note && <p className="cfcb2-note">{note}</p>}
{privacy && (
<p className="cfcb2-privacy">
<Lock className="cfcb2-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{privacy}
</p>
)}
</form>
</div>
</div>
</section>
);
}
export default CallBooking2;
type Formatted = { main: string; period: string; time: string; date: string; day: string; abbr: string };
function fmt(iso: string, tz: string, locale?: string): Formatted {
const d = new Date(iso);
const timeOpts: Intl.DateTimeFormatOptions = { hour: "numeric", minute: "2-digit", timeZone: tz };
let main = "";
let period = "";
for (const p of new Intl.DateTimeFormat(locale, timeOpts).formatToParts(d)) {
if (p.type === "dayPeriod") period += p.value;
else main += p.value;
}
const abbrPart = new Intl.DateTimeFormat(locale, { timeZone: tz, timeZoneName: "short", hour: "numeric" })
.formatToParts(d)
.find((p) => p.type === "timeZoneName");
return {
main: main.trim(),
period: period.trim(),
time: new Intl.DateTimeFormat(locale, timeOpts).format(d),
date: new Intl.DateTimeFormat(locale, { weekday: "long", month: "long", day: "numeric", timeZone: tz }).format(d),
day: new Intl.DateTimeFormat(locale, { weekday: "short", month: "short", day: "numeric", timeZone: tz }).format(d),
abbr: abbrPart ? abbrPart.value : "",
};
}
function groupByDay(list: BookingSlot[], tz: string, locale?: string) {
const out: { key: string; label: string; items: { index: number; time: string; disabled: boolean }[] }[] = [];
list.forEach((s, index) => {
const f = fmt(s.start, tz, locale);
let g = out.find((x) => x.key === f.day);
if (!g) {
g = { key: f.day, label: f.day, items: [] };
out.push(g);
}
g.items.push({ index, time: f.time, disabled: !!s.disabled });
});
return out;
}
function validZone(z?: string): string | null {
if (!z) return null;
try {
new Intl.DateTimeFormat("en-US", { timeZone: z });
return z;
} catch {
return null;
}
}
function browserZone(): string | null {
try {
return validZone(Intl.DateTimeFormat().resolvedOptions().timeZone);
} catch {
return null;
}
}
function zoneName(z: string) {
const last = z.split("/").pop() || z;
return last.split("_").join(" ");
}
function nthOpen(list: BookingSlot[], n: number) {
let count = -1;
for (let i = 0; i < list.length; i++) {
if (!list[i].disabled) {
count += 1;
if (count === n) return i;
}
}
return list.findIndex((s) => !s.disabled);
}
function isEmail(v: string) {
if (v.includes(" ")) return false;
const at = v.indexOf("@");
if (at < 1 || at !== v.lastIndexOf("@")) return false;
const domain = v.slice(at + 1);
const dot = domain.lastIndexOf(".");
return dot > 0 && dot < domain.length - 2;
}
const CSS = `
.cf-call-booking-2{position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-call-booking-2 *,.cf-call-booking-2 *::before,.cf-call-booking-2 *::after{box-sizing:border-box}
:where(.cf-call-booking-2 p){margin:0}
.cfcb2-inner{position:relative;z-index:1;width:100%;max-width:52rem;margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center}
.cfcb2-h{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;text-wrap:balance;color:var(--band-ink)}
.cfcb2-letter{margin-top:16px;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cfcb2-letter p+p{margin-top:8px}
.cfcb2-salute{font-weight:800}
.cfcb2-agenda{margin-top:32px;width:100%}
.cfcb2-agenda-intro{font-size:15px;font-weight:700;line-height:1.4}
.cfcb2-agenda ol{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.cfcb2-agenda li{display:flex;flex-direction:column;align-items:center;gap:12px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;font-weight:600;text-wrap:pretty;animation:cfcb2-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cfcb2-num{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;font-variant-numeric:tabular-nums}
.cfcb2-num::after{content:"";display:block;width:24px;height:3px;margin:8px auto 0;border-radius:3px;background:var(--accent-fill,var(--accent))}
.cfcb2-sign{margin-top:24px;display:inline-flex;align-items:center;gap:12px;text-align:left}
.cfcb2-sign img{display:block;width:56px;height:56px;flex:none;border-radius:12px;object-fit:cover;object-position:50% 22%}
.cfcb2-sign-close{font-size:15px;font-weight:600;line-height:1.3}
.cfcb2-sign-name{font-size:17px;font-weight:800;line-height:1.3}
.cfcb2-sign-role{font-size:15px;font-weight:500;line-height:1.3}
.cfcb2-stage{margin-top:clamp(32px,4vw,48px);width:100%;padding:clamp(24px,4vw,48px) clamp(16px,4vw,48px);border-radius:var(--card-radius,var(--radius,14px));background:oklch(from var(--band) calc(l + 0.05) c h / 0.9);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid oklch(from var(--band-ink) l c h / 0.16);box-shadow:inset 0 1px 0 oklch(from var(--band-ink) l c h / 0.1),var(--shadow-lg,0 2px 4px oklch(0.22 0.03 256 / 0.22),0 12px 24px -8px oklch(0.22 0.03 256 / 0.32))}
.cfcb2-zone{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 12px}
.cfcb2-zone-label{font-size:15px;font-weight:700;line-height:1.3}
.cfcb2-select-wrap{position:relative;display:inline-flex;align-items:center;max-width:100%;color:var(--field-ink)}
.cfcb2-select-wrap svg{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}
.cfcb2-globe{left:14px}
.cfcb2-caret{right:14px}
.cfcb2-select{appearance:none;-webkit-appearance:none;min-height:44px;max-width:100%;padding:0 42px;border-radius:999px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));background:var(--field);color:var(--field-ink);font-family:var(--font-body);font-size:16px;font-weight:700;line-height:1.2;text-overflow:ellipsis;cursor:pointer;box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 256 / 0.25));transition:background-color .16s ease,box-shadow .16s ease}
.cfcb2-select:hover{background:color-mix(in oklch,var(--field-ink) 6%,var(--field))}
.cfcb2-select:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cfcb2-slot{margin-top:28px;width:100%;container-type:inline-size}
.cfcb2-kicker{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase}
.cfcb2-dot{width:8px;height:8px;flex:none;border-radius:999px;background:var(--accent-fill,var(--accent))}
.cfcb2-time{margin-top:16px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(3.25rem,17vw,9rem);font-size:clamp(3.25rem,22cqi,9rem);line-height:.92;letter-spacing:-0.045em;font-variant-numeric:tabular-nums lining-nums;white-space:nowrap;animation:cfcb2-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cfcb2-period{margin-inline-start:.14em;font-size:.34em;letter-spacing:0}
.cfcb2-date{margin-top:24px;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:700;text-wrap:balance}
.cfcb2-duration{margin-top:4px;font-size:15px;font-weight:600;line-height:1.4;color:oklch(from var(--band-ink) l c h / 0.92)}
.cfcb2-none{padding:24px 0;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:600;line-height:1.4;text-wrap:balance}
.cfcb2-more{margin-top:16px;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 8px;border:0;border-radius:8px;background:none;color:var(--band-ink);font-family:var(--font-body);font-size:16px;font-weight:700;text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / 0.45);text-underline-offset:.18em;cursor:pointer}
.cfcb2-more:hover{text-decoration-color:currentColor}
.cfcb2-more:focus-visible{outline:3px solid var(--band-ink);outline-offset:2px}
.cfcb2-more svg{transition:transform .2s ease}
.cfcb2-more[aria-expanded="true"] svg{transform:rotate(180deg)}
.cfcb2-list{margin-top:8px;width:100%;display:grid;gap:8px;text-align:left;animation:cfcb2-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cfcb2-day{display:grid;grid-template-columns:10rem minmax(0,1fr);gap:8px 16px;align-items:start;padding:12px;border-radius:10px;background:oklch(from var(--band-ink) l c h / 0.06)}
.cfcb2-day-name{padding-top:11px;font-size:16px;font-weight:800;line-height:1.3}
.cfcb2-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.cfcb2-chips li{display:flex}
.cfcb2-chip{min-height:44px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:var(--radius,12px);border:1px solid oklch(from var(--band-ink) l c h / 0.22);background:oklch(from var(--band-ink) l c h / 0.08);color:var(--band-ink);font-family:var(--font-body);font-size:17px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,transform .16s ease}
.cfcb2-chip:hover:not(:disabled){background:oklch(from var(--band-ink) l c h / 0.16);border-color:oklch(from var(--band-ink) l c h / 0.4)}
.cfcb2-chip:active:not(:disabled){transform:translateY(1px)}
.cfcb2-chip:focus-visible{outline:3px solid var(--band-ink);outline-offset:2px}
.cfcb2-chip[aria-pressed="true"],.cfcb2-chip[aria-pressed="true"]:hover:not(:disabled){background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));border-color:transparent;box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 256 / 0.25))}
.cfcb2-chip:disabled{cursor:not-allowed;background:transparent;border-color:oklch(from var(--band-ink) l c h / 0.14);color:color-mix(in oklch,var(--band-ink) 62%,var(--band))}
.cfcb2-chip:disabled .cfcb2-chip-time{text-decoration:line-through}
.cfcb2-taken{font-size:14px;font-weight:700}
.cfcb2-risk{margin:clamp(24px,3vw,32px) auto 0;width:100%;max-width:36rem;text-align:center;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:500;text-wrap:pretty}
.cfcb2-risk strong{font-weight:800}
.cfcb2-form{width:100%;max-width:44rem;margin:24px auto 0;text-align:left}
.cfcb2-label{display:block;margin-bottom:8px;font-size:16px;font-weight:700;line-height:1.3;color:var(--band-ink)}
.cfcb2-row{display:flex;gap:12px;align-items:stretch}
.cfcb2-input{flex:1 1 auto;min-width:12rem;height:64px;padding:0 18px;border-radius:var(--field-radius,var(--radius,12px));border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));background:var(--field);color:var(--field-ink);font-family:var(--font-body);font-size:17px;font-weight:500;transition:border-color .16s ease,box-shadow .16s ease}
.cfcb2-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cfcb2-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 / 0.5)}
.cfcb2-input[aria-invalid="true"]{border:2px solid oklch(from var(--danger) max(l, 0.62) c h);padding:0 17px}
.cfcb2-input[aria-invalid="true"]:focus{box-shadow:0 0 0 3px oklch(from var(--danger) max(l, 0.62) c h / 0.45)}
.cfcb2-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink) 6%,var(--field))}
.cfcb2-btn{flex:0 1 auto;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:64px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));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));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.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.4),0 8px 16px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.55));transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
.cfcb2-btn:hover:not(:disabled),.cfcb2-btn.is-hover{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 / 0.7),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 260)) l c h / 0.45),0 10px 20px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / 0.65))}
.cfcb2-btn:active:not(:disabled),.cfcb2-btn.is-active{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.09) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - 0.22) c h / 0.6),inset 0 -2px 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 260)) l c h / 0.4)}
.cfcb2-btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cfcb2-btn:disabled{cursor:not-allowed;background:oklch(from var(--band) calc(l + 0.14) c h);color:var(--band-ink);text-shadow:none;box-shadow:none;transform:none}
.cfcb2-btn[aria-busy="true"]{cursor:progress}
.cfcb2-err{margin-top:12px;font-size:15px;font-weight:600;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
.cfcb2-err-badge{--cfcb2-badge-glyph:var(--status-glyph,#fff);display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:999px;background:var(--danger);color:var(--cfcb2-badge-glyph);vertical-align:-0.45em;margin-inline-end:.5em}
.cfcb2-note{margin-top:16px;font-size:15px;font-weight:500;line-height:1.4;text-align:center;text-wrap:pretty}
.cfcb2-privacy{margin-top:8px;font-size:15px;font-weight:500;line-height:1.4;text-align:center;text-wrap:pretty}
.cfcb2-note+.cfcb2-privacy{margin-top:4px}
.cfcb2-inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cfcb2-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cfcb2-spin{animation:cfcb2-spin .8s linear infinite}
@keyframes cfcb2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cfcb2-spin{to{transform:rotate(360deg)}}
@media (max-width:640px){
.cfcb2-agenda ol{grid-template-columns:1fr;gap:20px}
.cfcb2-day{grid-template-columns:1fr}
.cfcb2-day-name{padding-top:0}
.cfcb2-chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(9rem,1fr))}
.cfcb2-chips li{display:block}
.cfcb2-chip{width:100%;padding:0 12px}
.cfcb2-row{flex-direction:column}
.cfcb2-input{min-width:0;width:100%}
.cfcb2-btn{width:100%;padding:0 16px}
}
@media (prefers-reduced-motion:reduce){
.cf-call-booking-2 *{animation:none!important;transition:none!important}
}
`;
pieces/forms/call-booking-2/specimen.tsx 72 lines
import __studioImage0c59d626 from "../assets/396691ea7375e3e8.webp";
import * as React from "react";
import { CallBooking2, type BookingSlot, type CallBooking2Props } from "../call-booking-2";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled", "error"];
// Sample demo calendar (UTC hours), rebuilt from today so the specimen always shows upcoming weekday times.
const PLAN: { hours: number[]; taken?: number }[] = [
{ hours: [15.5, 19] },
{ hours: [14, 17.5, 21], taken: 1 },
{ hours: [16, 20] },
];
function upcoming(): BookingSlot[] {
const now = new Date();
const out: BookingSlot[] = [];
let offset = 1;
let planned = 0;
while (planned < PLAN.length) {
const day = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate() + offset));
offset += 1;
const weekday = day.getUTCDay();
if (weekday === 0 || weekday === 6) continue;
const plan = PLAN[planned];
planned += 1;
plan.hours.forEach((h, i) => {
out.push({ start: new Date(day.getTime() + h * 3600000).toISOString(), disabled: plan.taken === i });
});
}
return out;
}
export default function CallBooking2Specimen({ state }: { state?: CallBooking2Props["state"] }) {
const slots = React.useMemo(upcoming, []);
return (
<CallBooking2
state={state}
headline="Grab the next live Quillstack demo"
salutation="Hi there,"
letter={[
"You don’t need another slide deck. Pick a time and I’ll show you Quillstack running on work like yours, live.",
]}
agendaIntro="In 30 minutes, we’ll:"
agenda={[
"Turn one of your docs into a shared, searchable hub",
"Answer every question you bring, on screen",
"Map out your first week in Quillstack",
]}
signoff="Talk soon,"
hostName="Maya Okafor"
hostRole="Product specialist, Quillstack"
hostImage={slot(
"presenter",
__studioImage0c59d626
)}
hostImageAlt=""
slots={slots}
duration="30 minutes · Live on Zoom · Free"
riskLine={
<>
<strong>It’s free, and there’s no card or contract.</strong> If Quillstack isn’t right for you, I’ll tell you
on the call.
</>
}
buttonLabel="Book my free {time} demo"
note="Your calendar invite lands in your inbox straight away."
privacy={defaults.sample.registration.privacy}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalCallBooking2 |
React.ReactNode |
|
salutation OptionalCallBooking2 |
string |
|
letter OptionalCallBooking2 |
React.ReactNode[] |
|
agendaIntro OptionalCallBooking2 |
string |
|
agenda OptionalCallBooking2 |
string[] |
|
signoff OptionalCallBooking2 |
string |
|
hostName OptionalCallBooking2 |
string |
|
hostRole OptionalCallBooking2 |
string |
|
hostImage OptionalCallBooking2 |
string |
|
hostImageAlt OptionalCallBooking2 |
string |
|
slots OptionalCallBooking2 |
BookingSlot[] |
|
duration OptionalCallBooking2 |
string |
|
timeZones OptionalCallBooking2 |
BookingZone[] |
|
timeZone OptionalCallBooking2 |
string |
|
locale OptionalCallBooking2 |
string |
|
riskLine OptionalCallBooking2 |
React.ReactNode |
|
buttonLabel OptionalCallBooking2 |
string |
|
note OptionalCallBooking2 |
string |
|
privacy OptionalCallBooking2 |
string |
|
backdropImage OptionalCallBooking2 |
string |
|
copy OptionalCallBooking2 |
Partial<CallBooking2Copy> |
|
defaultExpanded OptionalCallBooking2 |
boolean |
|
disabled OptionalCallBooking2 |
boolean |
|
onSubmit OptionalCallBooking2 |
(values: CallBooking2Values) => void | Promise<unknown> |
|
state OptionalCallBooking2 |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalCallBooking2 |
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.
--card-radius- 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.
-
396691ea7375e3e8.webp
image/webp · 49.5 KB
-
981ec216ca653287.webp
image/webp · 32.2 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB