Booking Calendar 1
Strategy-call booking block: sells the call beside a four-stop path (day, time, details, confirm). The rail fills as each stop is completed and ends at one big first-person booking button.
Use it in a prompt
Use forms/booking-calendar 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/booking-calendar.tsx. - Import it and pass your copy and images (Props tab):
import { BookingCalendar } from "@/components/funneldna/forms/booking-calendar"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/booking-calendar/component.tsx 741 lines
// layout: path-to-action
// Strategy-call booking block: sells the call beside a four-stop path (day, time, details, confirm). The rail fills as each stop is completed and ends at one big first-person booking button.
// Theme: every colour, face, button, field and card reads the theme contract tokens. Documented fixed values: the yellow marker default (#fae37c) and the white tick glyph fallback on the solid success badge (#fff), both only as var() fallbacks.
import React, { useEffect, useId, useMemo, useRef, useState } from 'react';
import { AlertCircle, Check, Clock3, Globe, Loader2, Lock, Video } from 'lucide-react';
export type BookingCalendarValues = {
start: string; // ISO start time of the chosen slot, exactly as supplied
timeZone: string; // IANA zone the times were shown in
name: string;
email: string;
goal: string;
};
export type BookingCalendarCopy = {
stepDay: string;
stepTime: string;
stepDetails: string;
stepConfirm: string;
weekRange: string; // placeholders: {start}, {end}
timesMany: string; // placeholder: {count}
timesOne: string;
noTimes: string; // accessible name of a day with no open times; placeholder: {day}
noSlots: string;
pickDayFirst: string;
zoneNote: string; // placeholder: {zone}
nameLabel: string;
namePlaceholder: string;
emailLabel: string;
emailPlaceholder: string;
goalLabel: string;
goalPlaceholder: string;
optional: string;
rowCall: string;
rowDay: string;
rowTime: string;
rowLength: string;
notChosen: string;
durationLabel: string; // placeholder: {minutes}
errorTime: string;
errorName: string;
errorEmail: string;
errorSummary: string;
loading: string;
};
export type BookingCalendarProps = {
headline?: React.ReactNode;
highlight?: string; // phrase inside a string headline that gets the marker swipe
lead?: React.ReactNode;
callName?: string;
durationMinutes?: number;
meetingLabel?: string; // how the call happens, e.g. a video call
hostName?: string;
hostRole?: string;
hostImage?: string; // slot: presenter
hostImageAlt?: string;
agendaTitle?: string;
agenda?: string[]; // what happens on the call, in order
slots?: string[]; // ISO 8601 start times with offset or Z; shown in the caller's time zone, first 7 days
timeZone?: string; // IANA zone; defaults to the visitor's own zone
locale?: string;
autoSelectFirstDay?: boolean;
costLabel?: string;
cost?: string; // bold total line of the receipt, only when supplied
buttonLabel?: string;
reassurance?: string;
copy?: Partial<BookingCalendarCopy>;
disabled?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
onSubmit?: (values: BookingCalendarValues) => void | Promise<unknown>;
className?: string;
};
type Slot = { iso: string; date: Date };
type Day = { key: string; slots: Slot[] };
export function BookingCalendar(props: BookingCalendarProps) {
const {
headline = 'Get a clear plan for your funnel in one call',
highlight = 'a clear plan',
lead = 'Bring your offer. We’ll map the pages, the copy and your launch steps with you, one-on-one, so you leave knowing exactly what to build next.',
callName = 'Strategy Call',
durationMinutes = 45,
meetingLabel = '1-on-1 video call',
hostName,
hostRole,
hostImage,
hostImageAlt,
agendaTitle = 'Here’s what we’ll get done together',
agenda = DEFAULT_AGENDA,
slots = EMPTY,
timeZone,
locale = 'en-US',
autoSelectFirstDay = true,
costLabel = 'Due today',
cost,
buttonLabel = 'Yes! Book My Strategy Call',
reassurance = 'We only use your details to set up this call.',
copy: copyProp,
disabled = false,
state = 'default',
onSubmit,
className,
} = props;
const copy: BookingCalendarCopy = { ...DEFAULT_COPY, ...copyProp };
const uid = useId();
const id = (part: string) => `${uid}-${part}`;
const tz = useMemo(() => resolveZone(timeZone), [timeZone]);
const parsed = useMemo<Slot[]>(
() =>
slots
.map((iso) => ({ iso, date: new Date(iso) }))
.filter((s) => !Number.isNaN(s.date.getTime()))
.sort((a, b) => a.date.getTime() - b.date.getTime()),
[slots],
);
const days = useMemo<Day[]>(() => {
if (!parsed.length) return [];
const keyed = parsed.map((s) => ({ ...s, key: dayKey(s.date, tz) }));
const start = keyed[0].key;
return Array.from({ length: 7 }, (_, i) => {
const key = addDays(start, i);
return { key, slots: keyed.filter((s) => s.key === key) };
});
}, [parsed, tz]);
const firstOpen = days.find((d) => d.slots.length > 0)?.key ?? '';
const [dayPick, setDayPick] = useState<string | null>(null);
const [timePick, setTimePick] = useState('');
const [name, setName] = useState('');
const [email, setEmail] = useState('');
const [goal, setGoal] = useState('');
const [submitted, setSubmitted] = useState(false);
const [busy, setBusy] = useState(false);
const mounted = useRef(true);
const dayRef = useRef<HTMLDivElement>(null);
const timeRef = useRef<HTMLDivElement>(null);
const nameRef = useRef<HTMLInputElement>(null);
const emailRef = useRef<HTMLInputElement>(null);
useEffect(() => {
mounted.current = true;
return () => {
mounted.current = false;
};
}, []);
const wantedDay = dayPick ?? (autoSelectFirstDay ? firstOpen : '');
const current = days.find((d) => d.key === wantedDay && d.slots.length > 0);
const day = current ? current.key : '';
const timeSlot = current ? current.slots.find((s) => s.iso === timePick) : undefined;
const time = timeSlot ? timeSlot.iso : '';
const emailOk = isEmail(email);
const isDisabled = disabled || state === 'disabled';
const showErrors = submitted || state === 'error';
const errors = {
time: time ? '' : copy.errorTime,
name: name.trim() ? '' : copy.errorName,
email: emailOk ? '' : copy.errorEmail,
};
const hasErrors = Boolean(errors.time || errors.name || errors.email);
const done = [Boolean(day), Boolean(time), Boolean(name.trim()) && emailOk];
const firstOpenStep = done.indexOf(false);
const activeIndex = firstOpenStep === -1 ? 3 : firstOpenStep;
const nodeState = (i: number) => (i < 3 && done[i] ? 'done' : i === activeIndex ? 'active' : 'todo');
const dayLong = day ? fmtDate(locale, keyToDate(day), { weekday: 'long', month: 'long', day: 'numeric', timeZone: 'UTC' }) : '';
const timeLong = timeSlot ? fmtDate(locale, timeSlot.date, { hour: 'numeric', minute: '2-digit', timeZoneName: 'short', timeZone: tz }) : '';
const zoneText = zoneLabel(tz, locale, parsed[0] ? parsed[0].date : new Date());
const weekText = days.length
? fill(copy.weekRange, {
start: fmtDate(locale, keyToDate(days[0].key), { month: 'short', day: 'numeric', timeZone: 'UTC' }),
end: fmtDate(locale, keyToDate(days[days.length - 1].key), { month: 'short', day: 'numeric', timeZone: 'UTC' }),
})
: '';
const durationText = fill(copy.durationLabel, { minutes: durationMinutes });
const countText = (count: number) => (count === 1 ? copy.timesOne : fill(copy.timesMany, { count }));
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (isDisabled || busy) return;
setSubmitted(true);
if (errors.time) {
const group = day ? timeRef.current : dayRef.current;
group?.querySelector<HTMLInputElement>('input:not(:disabled)')?.focus();
return;
}
if (errors.name) {
nameRef.current?.focus();
return;
}
if (errors.email) {
emailRef.current?.focus();
return;
}
const result: unknown = onSubmit?.({ start: time, timeZone: tz, name: name.trim(), email: email.trim(), goal: goal.trim() });
if (result && typeof (result as PromiseLike<unknown>).then === 'function') {
setBusy(true);
const settle = () => {
if (mounted.current) setBusy(false);
};
(result as PromiseLike<unknown>).then(settle, settle);
}
};
const node = (i: number) => {
const s = nodeState(i);
return (
<span className='bc-node' data-state={s} aria-hidden='true'>
{s === 'done' ? <Check size={16} strokeWidth={3} /> : null}
</span>
);
};
const buttonClass = ['bc-cta', state === 'hover' ? 'is-hover' : '', state === 'active' ? 'is-active' : ''].filter(Boolean).join(' ');
const showHost = Boolean(hostName || hostImage);
return (
<section className={['cf-booking-calendar', className].filter(Boolean).join(' ')} aria-labelledby={id('title')}>
<style>{CSS}</style>
<div className='bc-wrap'>
<div className='bc-pitch'>
<h2 id={id('title')} className='bc-h'>
{renderHeadline(headline, highlight)}
</h2>
{lead ? <p className='bc-lead'>{lead}</p> : null}
<ul className='bc-chips'>
<li className='bc-chip'>
<Clock3 size={16} strokeWidth={2.5} aria-hidden='true' />
{durationText}
</li>
{meetingLabel ? (
<li className='bc-chip'>
<Video size={16} strokeWidth={2.5} aria-hidden='true' />
{meetingLabel}
</li>
) : null}
</ul>
{showHost || agenda.length ? (
<div className='bc-host'>
{showHost ? (
<div className='bc-host-top'>
{hostImage ? (
<img className='bc-host-img' src={hostImage} alt={hostImageAlt ?? hostName ?? ''} width={80} height={80} loading='lazy' decoding='async' />
) : null}
<div className='bc-host-text'>
{hostName ? <p className='bc-host-name'>{hostName}</p> : null}
{hostRole ? <p className='bc-host-role'>{hostRole}</p> : null}
</div>
</div>
) : null}
{agenda.length ? (
<>
<h3 className='bc-h3'>{agendaTitle}</h3>
<ol className='bc-agenda'>
{agenda.map((item, i) => (
<li key={i}>
<span className='bc-anum' aria-hidden='true'>
{i + 1}
</span>
<p>{item}</p>
</li>
))}
</ol>
</>
) : null}
</div>
) : null}
</div>
<form className='bc-card' noValidate onSubmit={handleSubmit} aria-labelledby={id('title')}>
<fieldset className='bc-all' disabled={isDisabled}>
<ol className='bc-path'>
<li className='bc-stop' data-done={done[0] ? 'true' : 'false'}>
<span className='bc-track' aria-hidden='true' />
<span className='bc-fill' aria-hidden='true' />
{node(0)}
<div className='bc-body'>
<div className='bc-stop-head'>
<h3 id={id('day')} className='bc-step'>
{copy.stepDay}
</h3>
{weekText ? <span className='bc-week'>{weekText}</span> : null}
</div>
{days.length ? (
<div className='bc-days' role='radiogroup' aria-labelledby={id('day')} ref={dayRef}>
{days.map((d) => {
const date = keyToDate(d.key);
const count = d.slots.length;
const long = fmtDate(locale, date, { weekday: 'long', month: 'long', day: 'numeric', timeZone: 'UTC' });
return (
<label key={d.key} className='bc-day'>
<input
className='bc-sr'
type='radio'
name={id('day-pick')}
value={d.key}
checked={d.key === day}
disabled={count === 0}
onChange={() => setDayPick(d.key)}
aria-label={count === 0 ? fill(copy.noTimes, { day: long }) : `${long}, ${countText(count)}`}
/>
<span className='bc-tile bc-daytile' aria-hidden='true'>
<span className='bc-dow'>{fmtDate(locale, date, { weekday: 'short', timeZone: 'UTC' })}</span>
<span className='bc-dnum'>{fmtDate(locale, date, { day: 'numeric', timeZone: 'UTC' })}</span>
<span className='bc-dcount'>{count ? countText(count) : '—'}</span>
</span>
</label>
);
})}
</div>
) : (
<p className='bc-note'>{copy.noSlots}</p>
)}
</div>
</li>
<li className='bc-stop' data-done={done[1] ? 'true' : 'false'}>
<span className='bc-track' aria-hidden='true' />
<span className='bc-fill' aria-hidden='true' />
{node(1)}
<div className='bc-body'>
<div className='bc-stop-head'>
<h3 id={id('time')} className='bc-step'>
{copy.stepTime}
</h3>
</div>
{days.length ? (
<p className='bc-zone'>
<Globe size={16} strokeWidth={2.5} className='bc-ico' aria-hidden='true' />
{fill(copy.zoneNote, { zone: zoneText })}
</p>
) : null}
{current ? (
<div
key={day}
className='bc-times'
role='radiogroup'
aria-labelledby={id('time')}
aria-describedby={showErrors && errors.time ? id('time-err') : undefined}
data-invalid={showErrors && errors.time ? 'true' : undefined}
ref={timeRef}
>
{current.slots.map((s, i) => (
<label key={s.iso} className='bc-time' style={{ '--i': i } as React.CSSProperties}>
<input className='bc-sr' type='radio' name={id('time-pick')} value={s.iso} checked={s.iso === time} onChange={() => setTimePick(s.iso)} />
<span className='bc-tile bc-timetile'>{fmtDate(locale, s.date, { hour: 'numeric', minute: '2-digit', timeZone: tz })}</span>
</label>
))}
</div>
) : days.length ? (
<p className='bc-note'>{copy.pickDayFirst}</p>
) : null}
{showErrors && errors.time ? (
<p id={id('time-err')} className='bc-err'>
<AlertCircle size={16} strokeWidth={2.5} className='bc-ico' aria-hidden='true' />
{errors.time}
</p>
) : null}
</div>
</li>
<li className='bc-stop' data-done={done[2] ? 'true' : 'false'}>
<span className='bc-track' aria-hidden='true' />
<span className='bc-fill' aria-hidden='true' />
{node(2)}
<div className='bc-body'>
<div className='bc-stop-head'>
<h3 className='bc-step'>{copy.stepDetails}</h3>
</div>
<div className='bc-fields'>
<div className='bc-field'>
<label className='bc-label' htmlFor={id('name')}>
{copy.nameLabel}
</label>
<input
ref={nameRef}
id={id('name')}
className='bc-input'
type='text'
name='name'
autoComplete='name'
placeholder={copy.namePlaceholder}
value={name}
onChange={(e) => setName(e.target.value)}
aria-invalid={showErrors && errors.name ? true : undefined}
aria-describedby={showErrors && errors.name ? id('name-err') : undefined}
/>
{showErrors && errors.name ? (
<p id={id('name-err')} className='bc-err'>
<AlertCircle size={16} strokeWidth={2.5} className='bc-ico' aria-hidden='true' />
{errors.name}
</p>
) : null}
</div>
<div className='bc-field'>
<label className='bc-label' htmlFor={id('email')}>
{copy.emailLabel}
</label>
<input
ref={emailRef}
id={id('email')}
className='bc-input'
type='email'
name='email'
inputMode='email'
autoComplete='email'
placeholder={copy.emailPlaceholder}
value={email}
onChange={(e) => setEmail(e.target.value)}
aria-invalid={showErrors && errors.email ? true : undefined}
aria-describedby={showErrors && errors.email ? id('email-err') : undefined}
/>
{showErrors && errors.email ? (
<p id={id('email-err')} className='bc-err'>
<AlertCircle size={16} strokeWidth={2.5} className='bc-ico' aria-hidden='true' />
{errors.email}
</p>
) : null}
</div>
<div className='bc-field bc-wide'>
<label className='bc-label' htmlFor={id('goal')}>
{copy.goalLabel}
<span className='bc-opt'>{copy.optional}</span>
</label>
<textarea id={id('goal')} className='bc-input' name='goal' rows={3} placeholder={copy.goalPlaceholder} value={goal} onChange={(e) => setGoal(e.target.value)} />
</div>
</div>
</div>
</li>
<li className='bc-stop'>
{node(3)}
<div className='bc-body'>
<div className='bc-stop-head'>
<h3 className='bc-step'>{copy.stepConfirm}</h3>
</div>
</div>
<div className='bc-action'>
<dl className='bc-receipt'>
<div className='bc-row'>
<dt>{copy.rowCall}</dt>
<dd>{callName}</dd>
</div>
<div className='bc-row'>
<dt>{copy.rowDay}</dt>
<dd key={day || 'none'} className='bc-pop'>
{dayLong || <span className='bc-pending'>{copy.notChosen}</span>}
</dd>
</div>
<div className='bc-row'>
<dt>{copy.rowTime}</dt>
<dd key={time || 'none'} className='bc-pop'>
{timeLong || <span className='bc-pending'>{copy.notChosen}</span>}
</dd>
</div>
<div className='bc-row'>
<dt>{copy.rowLength}</dt>
<dd>{durationText}</dd>
</div>
{cost ? (
<div className='bc-row bc-total'>
<dt>{costLabel}</dt>
<dd>{cost}</dd>
</div>
) : null}
</dl>
{showErrors && hasErrors ? (
<p className='bc-summary' role='alert'>
<AlertCircle size={16} strokeWidth={2.5} className='bc-ico' aria-hidden='true' />
{copy.errorSummary}
</p>
) : null}
<button type='submit' className={buttonClass} disabled={isDisabled} aria-busy={busy ? true : undefined}>
{busy ? (
<>
<Loader2 size={20} strokeWidth={2.5} className='bc-spin' aria-hidden='true' />
{copy.loading}
</>
) : (
buttonLabel
)}
</button>
{reassurance ? (
<p className='bc-assure'>
<Lock size={16} strokeWidth={2.5} className='bc-ico' aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</li>
</ol>
</fieldset>
</form>
</div>
</section>
);
}
export default BookingCalendar;
const EMPTY: string[] = [];
const DEFAULT_AGENDA = [
'Look at your offer and who it’s really for',
'Sketch the funnel that fits it, page by page',
'Leave with your next three steps in writing',
];
const DEFAULT_COPY: BookingCalendarCopy = {
stepDay: 'Pick the day that suits you',
stepTime: 'Choose your time',
stepDetails: 'Where should we send your invite?',
stepConfirm: 'Lock in your call',
weekRange: '{start} – {end}',
timesMany: '{count} times',
timesOne: '1 time',
noTimes: '{day}: no open times',
noSlots: 'No open times right now. Check back soon.',
pickDayFirst: 'Pick a day above to see the open times.',
zoneNote: 'Times shown in your time zone: {zone}',
nameLabel: 'Your name',
namePlaceholder: 'Jane Smith',
emailLabel: 'Best email',
emailPlaceholder: 'you@example.com',
goalLabel: 'What do you most want help with?',
goalPlaceholder: 'What’s your biggest funnel challenge right now?',
optional: 'Optional',
rowCall: 'Call',
rowDay: 'Day',
rowTime: 'Time',
rowLength: 'Length',
notChosen: 'Not chosen yet',
durationLabel: '{minutes} minutes',
errorTime: 'Choose a time to continue.',
errorName: 'Enter your name so we know who’s joining.',
errorEmail: 'Enter a valid email so we can send your invite.',
errorSummary: 'Fix the highlighted items to book your call.',
loading: 'Booking your call…',
};
function renderHeadline(text: React.ReactNode, phrase?: string) {
if (typeof text !== 'string') return text;
const at = phrase ? text.indexOf(phrase) : -1;
if (!phrase || at < 0) return keepWords(text, 'h');
return (
<>
{keepWords(text.slice(0, at), 'a')}
<span className='bc-mark'>{keepWords(phrase, 'm')}</span>
{keepWords(text.slice(at + phrase.length), 'b')}
</>
);
}
// Keeps hyphenated words ("45-minute") on one line so a headline never breaks at the hyphen.
function keepWords(text: string, keyBase: string) {
return text.split(/(\S+-\S+)/).map((part, i) =>
i % 2 ? (
<span key={keyBase + i} className='bc-nobr'>
{part}
</span>
) : (
part
),
);
}
function fill(template: string, values: Record<string, string | number>) {
return template.replace(/[{]([a-zA-Z]+)[}]/g, (match, key: string) => (key in values ? String(values[key]) : match));
}
function isEmail(value: string) {
const v = value.trim();
const at = v.indexOf('@');
const dot = v.lastIndexOf('.');
return at > 0 && at === v.lastIndexOf('@') && dot > at + 1 && dot < v.length - 2 && !v.includes(' ');
}
function validZone(zone: string) {
try {
new Intl.DateTimeFormat('en-US', { timeZone: zone });
return true;
} catch {
return false;
}
}
function resolveZone(preferred?: string) {
let detected: string | undefined;
try {
detected = Intl.DateTimeFormat().resolvedOptions().timeZone;
} catch {
detected = undefined;
}
for (const zone of [preferred, detected]) {
if (zone && validZone(zone)) return zone;
}
return 'UTC';
}
function dayKey(date: Date, zone: string) {
const parts = new Intl.DateTimeFormat('en-CA', { timeZone: zone, year: 'numeric', month: '2-digit', day: '2-digit' }).formatToParts(date);
const get = (type: string) => parts.find((p) => p.type === type)?.value ?? '';
return `${get('year')}-${get('month')}-${get('day')}`;
}
function keyToDate(key: string) {
const [y, m, d] = key.split('-').map(Number);
return new Date(Date.UTC(y, m - 1, d, 12));
}
function addDays(key: string, n: number) {
const date = keyToDate(key);
date.setUTCDate(date.getUTCDate() + n);
return dayKey(date, 'UTC');
}
function fmtDate(locale: string, date: Date, options: Intl.DateTimeFormatOptions) {
try {
return new Intl.DateTimeFormat(locale, options).format(date);
} catch {
return new Intl.DateTimeFormat('en-US', options).format(date);
}
}
function zoneLabel(zone: string, locale: string, date: Date) {
let long = zone;
try {
long = new Intl.DateTimeFormat(locale, { timeZone: zone, timeZoneName: 'long' }).formatToParts(date).find((p) => p.type === 'timeZoneName')?.value ?? zone;
} catch {
long = zone;
}
const city = zone.includes('/') ? (zone.split('/').pop() ?? '').split('_').join(' ') : '';
return city ? `${long} (${city})` : long;
}
const CSS = `
.cf-booking-calendar{position:relative;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);overflow-x:clip}
.cf-booking-calendar *,.cf-booking-calendar *::before,.cf-booking-calendar *::after{box-sizing:border-box}
.cf-booking-calendar .bc-wrap{max-width:1120px;margin:0 auto;display:grid;gap:clamp(32px,5vw,72px)}
.cf-booking-calendar .bc-h{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink)}
.cf-booking-calendar .bc-mark{--bc-mk:oklch(from var(--marker,#fae37c) max(l,.86) c h / 1);color:oklch(from var(--ink) min(l,.24) c h);background-image:linear-gradient(180deg,transparent 12%,var(--bc-mk) 12%,var(--bc-mk) 94%,transparent 94%);padding:0 .14em;margin:0 -.04em;border-radius:.34em .18em .4em .22em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-booking-calendar .bc-nobr{white-space:nowrap}
.cf-booking-calendar .bc-lead{margin:0 0 24px;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-booking-calendar .bc-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 32px;padding:0;list-style:none}
.cf-booking-calendar .bc-chip{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--surface));color:var(--ink);font-size:.875rem;font-weight:800;line-height:1.2}
.cf-booking-calendar .bc-chip svg{flex:none;color:var(--accent)}
.cf-booking-calendar .bc-host{background:color-mix(in oklch,var(--ink) 4%,var(--surface));border-radius:var(--card-radius,var(--radius,14px));padding:clamp(20px,3vw,32px)}
.cf-booking-calendar .bc-host-top{display:flex;align-items:center;gap:16px;margin-bottom:24px}
.cf-booking-calendar .bc-host-img{display:block;flex:none;width:80px;height:80px;border-radius:12px;object-fit:cover;object-position:50% 25%}
.cf-booking-calendar .bc-host-text{min-width:0}
.cf-booking-calendar .bc-host-name{margin:0;font-size:1.125rem;font-weight:800;line-height:1.2;color:var(--ink)}
.cf-booking-calendar .bc-host-role{margin:4px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted)}
.cf-booking-calendar .bc-h3,.cf-booking-calendar .bc-step{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:-.01em;text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink)}
.cf-booking-calendar .bc-h3{margin-bottom:16px}
.cf-booking-calendar .bc-agenda{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.cf-booking-calendar .bc-agenda li{display:grid;grid-template-columns:2rem minmax(0,1fr);gap:12px;align-items:baseline}
.cf-booking-calendar .bc-anum{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;color:var(--accent);font-variant-numeric:tabular-nums}
.cf-booking-calendar .bc-agenda p{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-booking-calendar .bc-card{min-width:0;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(.22 .03 260)) l c h / .22),0 12px 24px -8px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .32)));padding:clamp(20px,3vw,32px)}
.cf-booking-calendar .bc-all{border:0;margin:0;padding:0;min-width:0}
.cf-booking-calendar .bc-path{list-style:none;margin:0;padding:0}
.cf-booking-calendar .bc-stop{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:16px;padding-bottom:32px}
.cf-booking-calendar .bc-stop:last-child{padding-bottom:0}
.cf-booking-calendar .bc-track,.cf-booking-calendar .bc-fill{position:absolute;left:13px;top:34px;bottom:6px;width:2px;border-radius:2px}
.cf-booking-calendar .bc-track{background:oklch(from var(--ink) l c h / .14)}
.cf-booking-calendar .bc-fill{background:var(--accent-fill,var(--accent));transform:scaleY(0);transform-origin:top;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.cf-booking-calendar .bc-stop[data-done=true] .bc-fill{transform:scaleY(1)}
.cf-booking-calendar .bc-node{position:relative;z-index:1;grid-column:1;grid-row:1;display:grid;place-items:center;width:28px;height:28px;margin-top:1px;border-radius:999px;background:var(--card);box-shadow:inset 0 0 0 2px oklch(from var(--ink) l c h / .22);transition:background .16s ease,box-shadow .16s ease}
.cf-booking-calendar .bc-node[data-state=active]{background:var(--accent-fill,var(--accent));box-shadow:0 0 0 5px color-mix(in oklch,var(--accent-fill,var(--accent)) 16%,var(--card))}
.cf-booking-calendar .bc-node[data-state=active]::after{content:'';width:8px;height:8px;border-radius:999px;background:var(--accent-fill-ink,var(--card))}
.cf-booking-calendar .bc-node[data-state=done]{background:var(--success);box-shadow:none;color:var(--success-ink,#fff)}
.cf-booking-calendar .bc-body{grid-column:2;grid-row:1;min-width:0}
.cf-booking-calendar .bc-action{grid-column:2;grid-row:2;min-width:0}
.cf-booking-calendar .bc-stop-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;margin-bottom:12px}
.cf-booking-calendar .bc-week{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums}
.cf-booking-calendar .bc-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;accent-color:var(--field-focus,var(--accent))}
.cf-booking-calendar .bc-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.cf-booking-calendar .bc-times{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:8px}
.cf-booking-calendar .bc-day,.cf-booking-calendar .bc-time{position:relative;display:block;min-width:0;cursor:pointer}
.cf-booking-calendar .bc-time{animation:bc-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
.cf-booking-calendar .bc-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-radius:10px;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);color:var(--ink);transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-booking-calendar .bc-daytile{min-height:88px;padding:10px 4px;gap:2px}
.cf-booking-calendar .bc-dow{font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.cf-booking-calendar .bc-dnum{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.625rem;line-height:1.1;font-variant-numeric:tabular-nums}
.cf-booking-calendar .bc-dcount{font-size:.875rem;font-weight:700;line-height:1.2;color:var(--muted);white-space:nowrap}
.cf-booking-calendar .bc-timetile{min-height:60px;padding:8px 12px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.25rem;line-height:1.15;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-booking-calendar .bc-day:hover input:not(:disabled):not(:checked) + .bc-tile,.cf-booking-calendar .bc-time:hover input:not(:disabled):not(:checked) + .bc-tile{background:color-mix(in oklch,var(--ink) 8%,var(--card));transform:translateY(-1px)}
.cf-booking-calendar .bc-times[data-invalid=true] .bc-tile{box-shadow:inset 0 0 0 1px oklch(from var(--danger) l c h / .6)}
.cf-booking-calendar input:disabled + .bc-tile{background:var(--card);box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .1);cursor:not-allowed}
.cf-booking-calendar input:disabled + .bc-tile .bc-dnum{color:var(--muted)}
.cf-booking-calendar input:checked + .bc-tile{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(.22 .03 260)) l c h / .22),0 4px 10px -2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .2));transform:translateY(-2px)}
.cf-booking-calendar input:checked + .bc-tile .bc-dnum{color:var(--accent)}
.cf-booking-calendar input:checked + .bc-tile .bc-dow,.cf-booking-calendar input:checked + .bc-tile .bc-dcount{color:var(--ink)}
.cf-booking-calendar .bc-sr:focus-visible + .bc-tile{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .5);outline-offset:2px}
.cf-booking-calendar .bc-zone{margin:0 0 16px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-booking-calendar .bc-ico{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em;flex:none}
.cf-booking-calendar .bc-zone .bc-ico{color:var(--accent)}
.cf-booking-calendar .bc-note{margin:0;padding:16px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card));color:var(--muted);font-size:.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
.cf-booking-calendar .bc-fields{display:grid;gap:16px}
.cf-booking-calendar .bc-field{min-width:0}
.cf-booking-calendar .bc-label{display:block;margin:0 0 8px;font-size:1rem;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-booking-calendar .bc-opt{margin-inline-start:.4em;font-weight:500;color:var(--muted)}
.cf-booking-calendar .bc-input{display:block;width:100%;min-height:56px;padding:0 16px;font:inherit;font-size:1.0625rem;line-height:1.3;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));box-shadow:inset 0 1px 2px oklch(from var(--shadow,oklch(.22 .03 260)) l c h / .06);transition:border-color .16s ease,box-shadow .16s ease}
.cf-booking-calendar textarea.bc-input{min-height:104px;padding:14px 16px;line-height:1.45;resize:vertical}
.cf-booking-calendar .bc-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-booking-calendar .bc-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink) 38%,transparent)}
.cf-booking-calendar .bc-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-booking-calendar .bc-input[aria-invalid=true]{border-color:var(--danger)}
.cf-booking-calendar .bc-input[aria-invalid=true]:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-booking-calendar .bc-input:disabled{background:color-mix(in oklch,var(--field-ink) 5%,var(--field));cursor:not-allowed}
.cf-booking-calendar .bc-err{margin:8px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
.cf-booking-calendar .bc-receipt{display:grid;gap:10px;margin:0 0 24px;padding:16px 20px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-booking-calendar .bc-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px;align-items:baseline}
.cf-booking-calendar .bc-row dt{margin:0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
.cf-booking-calendar .bc-row dd{margin:0;text-align:right;font-size:1rem;font-weight:700;line-height:1.4;color:var(--ink);font-variant-numeric:tabular-nums;text-wrap:pretty}
.cf-booking-calendar .bc-pop{animation:bc-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-booking-calendar .bc-pending{font-weight:500;color:var(--muted)}
.cf-booking-calendar .bc-total{margin-top:8px}
.cf-booking-calendar .bc-total dt{font-size:1rem;font-weight:800;color:var(--ink)}
.cf-booking-calendar .bc-total dd{font-family:var(--font-display);font-size:1.5rem;font-weight:var(--display-weight,800);line-height:1.1;letter-spacing:-.02em}
.cf-booking-calendar .bc-summary{margin:0 0 12px;padding:10px 14px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:700;line-height:1.4;text-wrap:pretty}
.cf-booking-calendar .bc-cta{--bc-b:var(--button-bg,var(--cta));--bc-sh:var(--shadow,oklch(.22 .03 260));display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:72px;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);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-transform:var(--button-case,none);text-align:center;text-wrap:balance;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);cursor:pointer;background:linear-gradient(oklch(from var(--bc-b) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--bc-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--bc-b) calc(l - .16) c h),0 1px 2px oklch(from var(--bc-sh) l c h / .3),0 8px 16px -6px oklch(from var(--bc-sh) l c h / .45));transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-booking-calendar .bc-cta:hover:not(:disabled),.cf-booking-calendar .bc-cta.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--bc-b) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--bc-b) calc(l + .1) c h / .6),inset 0 -3px 0 oklch(from var(--bc-b) calc(l - .2) c h),0 1px 2px oklch(from var(--bc-sh) l c h / .32),0 12px 20px -8px oklch(from var(--bc-sh) l c h / .5))}
.cf-booking-calendar .bc-cta:active:not(:disabled),.cf-booking-calendar .bc-cta.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--bc-b) calc(l - .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--bc-b) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--bc-b) calc(l - .16) c h),0 1px 2px oklch(from var(--bc-sh) l c h / .3)}
.cf-booking-calendar .bc-cta:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .55);outline-offset:3px}
.cf-booking-calendar .bc-cta:disabled{cursor:not-allowed;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:none;transform:none}
.cf-booking-calendar .bc-cta[aria-busy=true]{cursor:progress}
.cf-booking-calendar .bc-spin{flex:none;animation:bc-spin .8s linear infinite}
.cf-booking-calendar .bc-assure{margin:12px 0 0;text-align:center;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
@keyframes bc-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes bc-spin{to{transform:rotate(360deg)}}
@media (min-width:640px){.cf-booking-calendar .bc-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.cf-booking-calendar .bc-wide{grid-column:1 / -1}}
@media (max-width:1023px){.cf-booking-calendar .bc-pitch{max-width:46rem}}
@media (min-width:1024px){.cf-booking-calendar .bc-wrap{grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);align-items:start}.cf-booking-calendar .bc-pitch{position:sticky;top:24px}}
@media (max-width:559px){.cf-booking-calendar .bc-card{padding:20px 16px}.cf-booking-calendar .bc-days{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.cf-booking-calendar .bc-daytile{padding:10px 2px}.cf-booking-calendar .bc-times{grid-template-columns:repeat(2,minmax(0,1fr))}.cf-booking-calendar .bc-stop{column-gap:10px;padding-bottom:28px}.cf-booking-calendar .bc-action{grid-column:1 / -1;margin-top:4px}.cf-booking-calendar .bc-receipt{padding:14px 16px}.cf-booking-calendar .bc-cta{padding:0 16px}}
@media (prefers-reduced-motion:reduce){.cf-booking-calendar .bc-time,.cf-booking-calendar .bc-pop,.cf-booking-calendar .bc-spin{animation:none}.cf-booking-calendar .bc-fill,.cf-booking-calendar .bc-tile,.cf-booking-calendar .bc-node,.cf-booking-calendar .bc-cta,.cf-booking-calendar .bc-input{transition:none}}
`;
pieces/forms/booking-calendar/specimen.tsx 50 lines
import __studioImagedacd778b from "../assets/352bbaed5171c351.webp";
import React from 'react';
import { BookingCalendar } from '../booking-calendar';
import type { BookingCalendarProps } from '../booking-calendar';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
// One sample week of open call times (UTC); the block shows them in the visitor's own time zone.
const WEEK: [string, string[]][] = [
['2026-11-30', ['14:00', '15:30', '19:30']],
['2026-12-01', ['14:00', '16:00', '18:00', '19:30', '21:00']],
['2026-12-02', ['15:00', '18:30']],
['2026-12-03', ['14:00', '15:30', '17:00', '19:30']],
['2026-12-04', ['14:30', '16:00']],
['2026-12-05', ['15:00']],
['2026-12-06', []],
];
const SLOTS = WEEK.flatMap(([day, times]) => times.map((t) => `${day}T${t}:00Z`));
export default function BookingCalendarSpecimen({ state = 'default' }: { state?: BookingCalendarProps['state'] }) {
const sample = defaults.sample;
return (
<BookingCalendar
state={state}
headline='Get your funnel mapped out in one 45-minute call'
highlight='funnel mapped out'
lead='Bring your offer. We plan the pages, the copy and your launch steps together, one-on-one, so you know exactly what to build next.'
callName='Funnel Strategy Call'
durationMinutes={45}
meetingLabel='1-on-1 video call'
hostName='Dana Reyes'
hostRole='Funnel strategist'
hostImage={slot('presenter', __studioImagedacd778b)}
hostImageAlt='Dana Reyes, funnel strategist'
agendaTitle='Here’s what we’ll get done together'
agenda={[
'Look at your offer and who it’s really for',
'Sketch the funnel that fits it, page by page',
'Leave with your next three steps in writing',
]}
slots={SLOTS}
costLabel='Due today'
cost='Free'
buttonLabel='Yes! Book My Strategy Call'
reassurance={sample.registration.privacy}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalBookingCalendar |
React.ReactNode |
|
highlight OptionalBookingCalendar |
string |
|
lead OptionalBookingCalendar |
React.ReactNode |
|
callName OptionalBookingCalendar |
string |
|
durationMinutes OptionalBookingCalendar |
number |
|
meetingLabel OptionalBookingCalendar |
string |
|
hostName OptionalBookingCalendar |
string |
|
hostRole OptionalBookingCalendar |
string |
|
hostImage OptionalBookingCalendar |
string |
|
hostImageAlt OptionalBookingCalendar |
string |
|
agendaTitle OptionalBookingCalendar |
string |
|
agenda OptionalBookingCalendar |
string[] |
|
slots OptionalBookingCalendar |
string[] |
|
timeZone OptionalBookingCalendar |
string |
|
locale OptionalBookingCalendar |
string |
|
autoSelectFirstDay OptionalBookingCalendar |
boolean |
|
costLabel OptionalBookingCalendar |
string |
|
cost OptionalBookingCalendar |
string |
|
buttonLabel OptionalBookingCalendar |
string |
|
reassurance OptionalBookingCalendar |
string |
|
copy OptionalBookingCalendar |
Partial<BookingCalendarCopy> |
|
disabled OptionalBookingCalendar |
boolean |
|
state OptionalBookingCalendar |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
onSubmit OptionalBookingCalendar |
(values: BookingCalendarValues) => void | Promise<unknown> |
|
className OptionalBookingCalendar |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter- A photo of the host, coach or founder.
-
352bbaed5171c351.webp
image/webp · 110 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB