Calendar Actions 5
Local-time strip: at the moment of highest intent on a thank-you page, one slim band shows the event in the visitor's own clock and saves it to their calendar in one click.
Use it in a prompt
Use checkout/calendar-actions-5 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/checkout/calendar-actions-5.tsx. - Import it and pass your copy and images (Props tab):
import { CalendarActions5 } from "@/components/funneldna/checkout/calendar-actions-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/calendar-actions-5/component.tsx 577 lines
// layout: hello-strip
// Local-time strip: at the moment of highest intent on a thank-you page, one slim band shows the event in the visitor's own clock and saves it to their calendar in one click.
'use client'
import * as React from 'react'
import { AlertCircle, Check, ChevronDown, Clock, Download, Link2 } from 'lucide-react'
import { Pattern, Spot } from '../fx/fx'
import calendarSpot from '../fx/spots/calendar'
export type CalendarAction = 'google' | 'outlook' | 'ics' | 'copy'
export type CalendarActions5State = 'default' | 'hover' | 'active' | 'disabled'
/** Placeholders {title}, {zone}, {city}, {minutes}, {end}, {weekday}, {day}, {month}, {time}, {slug} are replaced as plain text. */
export type CalendarActions5Copy = {
keysLabel: string
google: string
outlook: string
ics: string
copyLink: string
copied: string
copyFailed: string
googleAria: string
outlookAria: string
icsAria: string
copyAria: string
/** Line under the time once the visitor's zone is known. */
yourTime: string
/** Line under the time before the visitor's zone is known. */
hostTime: string
timeHint: string
popoverLabel: string
rowYou: string
rowHost: string
rowUtc: string
footer: string
/** How a date and time are written, e.g. 'Wed 2 Dec, 7:00 pm'. */
moment: string
copiedAnnounce: string
failedAnnounce: string
icsFileName: string
}
export type CalendarActions5Props = {
/** The event name as it appears in their calendar. */
title: string
/** Visible strip headline; defaults to the title. */
heading?: React.ReactNode
/** ISO 8601 with a zone, e.g. '2026-12-02T19:00:00Z'. */
startsAt: string
/** Defaults to one hour after the start. */
endsAt?: string
/** IANA zone the host announces the event in, e.g. 'America/New_York'. */
hostTimezone: string
/** Shown in the popover; defaults to the zone's city. */
hostCity?: string
/** Forces the visitor's zone (tests, previews); otherwise read from the browser. */
viewerTimezone?: string
/** Join or replay link for Copy link and the calendar entry. Copy link hides without it. */
joinUrl?: string
/** Venue or URL for the calendar entry; defaults to joinUrl. */
location?: string
description?: string
locale?: string
hour12?: boolean
copy?: Partial<CalendarActions5Copy>
/** Clay illustration beside the headline (an fx spot asset); null hides it. */
spotImage?: string | null
/** Called on every key; call event.preventDefault() to stop the default open, download or copy. */
onAction?: (action: CalendarAction, event: React.MouseEvent<HTMLElement>) => void
disabled?: boolean
/** Studio preview: force the Google key hovered or pressed, or every key disabled. */
state?: CalendarActions5State
className?: string
}
export function CalendarActions5({
title,
heading,
startsAt,
endsAt,
hostTimezone,
hostCity,
viewerTimezone,
joinUrl,
location,
description,
locale = 'en-GB',
hour12 = true,
copy: copyOverrides,
spotImage = calendarSpot,
onAction,
disabled = false,
state = 'default',
className,
}: CalendarActions5Props) {
const copy: CalendarActions5Copy = { ...COPY }
if (copyOverrides) {
for (const key of Object.keys(copyOverrides) as Array<keyof CalendarActions5Copy>) {
const value = copyOverrides[key]
if (value !== undefined) copy[key] = value
}
}
const uid = React.useId()
const popId = `${uid}-zones`
const headingId = `${uid}-heading`
const [open, setOpen] = React.useState(false)
const [copyStatus, setCopyStatus] = React.useState<CopyStatus>('idle')
const [detectedZone] = React.useState<string | null>(detectZone)
const wrapRef = React.useRef<HTMLDivElement>(null)
const triggerRef = React.useRef<HTMLButtonElement>(null)
const timerRef = React.useRef<number | undefined>(undefined)
React.useEffect(() => () => window.clearTimeout(timerRef.current), [])
React.useEffect(() => {
if (!open) return
const onPointer = (event: PointerEvent) => {
if (wrapRef.current && !wrapRef.current.contains(event.target as Node)) setOpen(false)
}
const onKey = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
setOpen(false)
triggerRef.current?.focus()
}
}
document.addEventListener('pointerdown', onPointer)
document.addEventListener('keydown', onKey)
return () => {
document.removeEventListener('pointerdown', onPointer)
document.removeEventListener('keydown', onKey)
}
}, [open])
const start = new Date(startsAt)
if (Number.isNaN(start.getTime())) return null
const parsedEnd = endsAt ? new Date(endsAt) : null
const end =
parsedEnd && !Number.isNaN(parsedEnd.getTime()) && parsedEnd.getTime() > start.getTime()
? parsedEnd
: new Date(start.getTime() + 60 * 60 * 1000)
const hostZone = safeZone(hostTimezone)
const viewerZone = viewerTimezone ? safeZone(viewerTimezone) : detectedZone ? safeZone(detectedZone) : null
const shownZone = viewerZone ?? hostZone
const city = hostCity ?? cityOf(hostZone)
const moment = (date: Date, zone: string) => formatMoment(date, zone, locale, hour12, copy.moment)
const stamp = (date: Date, zone: string) => `${moment(date, zone)} ${zoneName(date, zone, locale)}`.trim()
const shownZoneName = zoneName(start, shownZone, locale)
const timeMain = moment(start, shownZone)
const timeZoneLine = viewerZone
? fill(copy.yourTime, { zone: shownZoneName })
: fill(copy.hostTime, { city, zone: shownZoneName })
const rows = [
...(viewerZone ? [{ id: 'you', label: copy.rowYou, value: stamp(start, viewerZone), selected: true }] : []),
{ id: 'host', label: fill(copy.rowHost, { city }), value: stamp(start, hostZone), selected: !viewerZone },
{ id: 'utc', label: copy.rowUtc, value: stamp(start, 'UTC'), selected: false },
]
const minutes = String(Math.round((end.getTime() - start.getTime()) / 60000))
const footer = fill(copy.footer, {
minutes,
end: `${formatClock(end, shownZone, locale, hour12)} ${zoneName(end, shownZone, locale)}`.trim(),
})
const place = location ?? joinUrl
const details = [description, joinUrl].filter(Boolean).join(NL + NL)
const enc = encodeURIComponent
const googleHref =
'https://calendar.google.com/calendar/render?action=TEMPLATE' +
`&text=${enc(title)}` +
`&dates=${toBasicUtc(start)}/${toBasicUtc(end)}` +
`&ctz=${enc(hostZone)}` +
(place ? `&location=${enc(place)}` : '') +
(details ? `&details=${enc(details)}` : '')
const outlookHref =
'https://outlook.live.com/calendar/0/action/compose?rru=addevent' +
`&subject=${enc(title)}` +
`&startdt=${enc(start.toISOString())}` +
`&enddt=${enc(end.toISOString())}` +
(place ? `&location=${enc(place)}` : '') +
(details ? `&body=${enc(details)}` : '')
const slug = slugify(title) || 'event'
const ics = [
'BEGIN:VCALENDAR',
'VERSION:2.0',
'PRODID:-//cf-library//calendar-actions-5//EN',
'CALSCALE:GREGORIAN',
'BEGIN:VEVENT',
`UID:${toBasicUtc(start)}-${slug}@cf-library`,
`DTSTAMP:${toBasicUtc(start)}`,
`DTSTART:${toBasicUtc(start)}`,
`DTEND:${toBasicUtc(end)}`,
`SUMMARY:${escapeIcs(title)}`,
...(place ? [`LOCATION:${escapeIcs(place)}`] : []),
...(details ? [`DESCRIPTION:${escapeIcs(details)}`] : []),
...(joinUrl ? [`URL:${joinUrl}`] : []),
'END:VEVENT',
'END:VCALENDAR',
].join(CRLF)
const icsHref = `data:text/calendar;charset=utf-8,${enc(ics)}`
const isDisabled = disabled || state === 'disabled'
const forced = state === 'hover' || state === 'active' ? state : undefined
const links: Array<{ id: CalendarAction; label: string; aria: string; href: string; icon: React.ReactNode; external: boolean }> = [
{ id: 'google', label: copy.google, aria: fill(copy.googleAria, { title }), href: googleHref, icon: <GoogleMark />, external: true },
{ id: 'outlook', label: copy.outlook, aria: fill(copy.outlookAria, { title }), href: outlookHref, icon: <OutlookMark />, external: true },
{
id: 'ics',
label: copy.ics,
aria: fill(copy.icsAria, { title }),
href: icsHref,
icon: <Download className='cfca5-icon' size={18} strokeWidth={2.5} aria-hidden='true' />,
external: false,
},
]
const handleLink = (action: CalendarAction) => (event: React.MouseEvent<HTMLAnchorElement>) => {
if (isDisabled) {
event.preventDefault()
return
}
onAction?.(action, event)
}
const handleCopy = (event: React.MouseEvent<HTMLButtonElement>) => {
if (isDisabled || !joinUrl) return
onAction?.('copy', event)
if (event.defaultPrevented) return
const settle = (status: CopyStatus) => {
window.clearTimeout(timerRef.current)
setCopyStatus(status)
timerRef.current = window.setTimeout(() => setCopyStatus('idle'), 2200)
}
const clipboard = typeof navigator !== 'undefined' ? navigator.clipboard : undefined
if (!clipboard || typeof clipboard.writeText !== 'function') {
settle('failed')
return
}
clipboard.writeText(joinUrl).then(
() => settle('copied'),
() => settle('failed'),
)
}
return (
<section
className={['cf-calendar-actions-5', className].filter(Boolean).join(' ')}
aria-labelledby={headingId}
data-open={open ? '' : undefined}
data-state={state}
>
<style>{CSS}</style>
<div className='cfca5-fx' aria-hidden='true'>
<Pattern name='grid' fade='edges' />
</div>
<div className='cfca5-inner'>
<div className='cfca5-info' data-spot={spotImage ? '' : undefined}>
{spotImage ? (
<span className='cfca5-spot'>
<Spot src={spotImage} size={48} tone='accent-fill' shade='band' light='band-ink' />
</span>
) : null}
<div className='cfca5-when'>
<h2 id={headingId} className='cfca5-title'>
{heading ?? title}
</h2>
<div className='cfca5-timewrap' ref={wrapRef}>
<button
ref={triggerRef}
type='button'
className='cfca5-time'
aria-expanded={open}
aria-haspopup='dialog'
aria-controls={open ? popId : undefined}
onClick={() => setOpen((value) => !value)}
>
<Clock className='cfca5-icon' size={20} strokeWidth={2.5} aria-hidden='true' />
<span className='cfca5-time-text'>
<span className='cfca5-time-main' suppressHydrationWarning>
{timeMain}
</span>
<span className='cfca5-time-zone' suppressHydrationWarning>
{timeZoneLine}
</span>
</span>
<span className='cfca5-sr'>{copy.timeHint}</span>
<ChevronDown className='cfca5-caret' size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
{open ? (
<div id={popId} role='dialog' aria-label={fill(copy.popoverLabel, { title })} className='cfca5-pop'>
<ul className='cfca5-rows'>
{rows.map((row) => (
<li key={row.id} className='cfca5-row' data-selected={row.selected ? '' : undefined}>
<span className='cfca5-row-label'>{row.label}</span>
<span className='cfca5-row-time' suppressHydrationWarning>
{row.value}
</span>
</li>
))}
</ul>
<p className='cfca5-pop-foot' suppressHydrationWarning>
{footer}
</p>
</div>
) : null}
</div>
</div>
</div>
<div className='cfca5-keys' role='group' aria-label={fill(copy.keysLabel, { title })}>
{links.map((link, index) => (
<a
key={link.id}
className='cfca5-key'
href={isDisabled ? undefined : link.href}
role={isDisabled ? 'link' : undefined}
target={link.external ? '_blank' : undefined}
rel={link.external ? 'noopener noreferrer' : undefined}
download={link.external ? undefined : fill(copy.icsFileName, { slug })}
aria-label={link.aria}
aria-disabled={isDisabled || undefined}
data-force={index === 0 ? forced : undefined}
style={{ '--i': index } as React.CSSProperties}
onClick={handleLink(link.id)}
>
<span className='cfca5-key-icon' aria-hidden='true'>
{link.icon}
</span>
<span>{link.label}</span>
</a>
))}
{joinUrl ? (
<button
type='button'
className='cfca5-key cfca5-copy'
data-status={copyStatus}
disabled={isDisabled}
aria-label={fill(copy.copyAria, { title })}
style={{ '--i': links.length } as React.CSSProperties}
onClick={handleCopy}
>
<span className='cfca5-key-icon' aria-hidden='true'>
{copyStatus === 'copied' ? (
<Check className='cfca5-icon' size={18} strokeWidth={2.5} />
) : copyStatus === 'failed' ? (
<AlertCircle className='cfca5-icon' size={18} strokeWidth={2.5} />
) : (
<Link2 className='cfca5-icon' size={18} strokeWidth={2.5} />
)}
</span>
<span className='cfca5-swap' aria-hidden='true'>
<span className='cfca5-swap-idle'>{copy.copyLink}</span>
<span className='cfca5-swap-done'>{copy.copied}</span>
<span className='cfca5-swap-fail'>{copy.copyFailed}</span>
</span>
</button>
) : null}
</div>
<p className='cfca5-sr' role='status' aria-live='polite'>
{copyStatus === 'copied' ? copy.copiedAnnounce : copyStatus === 'failed' ? copy.failedAnnounce : ''}
</p>
</div>
</section>
)
}
export default CalendarActions5
type CopyStatus = 'idle' | 'copied' | 'failed'
const BS = String.fromCharCode(92)
const NL = String.fromCharCode(10)
const CR = String.fromCharCode(13)
const CRLF = CR + NL
const COPY: CalendarActions5Copy = {
keysLabel: 'Add {title} to your calendar',
google: 'Google',
outlook: 'Outlook',
ics: '.ics file',
copyLink: 'Copy link',
copied: 'Copied',
copyFailed: 'Copy failed',
googleAria: 'Add {title} to Google Calendar',
outlookAria: 'Add {title} to Outlook Calendar',
icsAria: 'Download {title} as an .ics calendar file',
copyAria: 'Copy the link to {title}',
yourTime: 'your time · {zone}',
hostTime: '{city} time · {zone}',
timeHint: 'Show this start time in other time zones',
popoverLabel: 'Start time for {title} in other time zones',
rowYou: 'Your time',
rowHost: 'Host time · {city}',
rowUtc: 'Universal time',
footer: 'Live for {minutes} minutes. Ends {end}.',
moment: '{weekday} {day} {month}, {time}',
copiedAnnounce: 'Event link copied',
failedAnnounce: 'Couldn’t copy the link. Please try again.',
icsFileName: '{slug}.ics',
}
function fill(template: string, values: Record<string, string>): string {
return template.replace(/[{]([a-zA-Z]+)[}]/g, (match: string, key: string) => (key in values ? values[key] : match))
}
function detectZone(): string | null {
if (typeof window === 'undefined') return null
try {
return Intl.DateTimeFormat().resolvedOptions().timeZone || null
} catch {
return null
}
}
function safeZone(zone: string): string {
try {
new Intl.DateTimeFormat('en-US', { timeZone: zone })
return zone
} catch {
return 'UTC'
}
}
function cityOf(zone: string): string {
return (zone.split('/').pop() || zone).split('_').join(' ')
}
function partsOf(date: Date, zone: string, locale: string, options: Intl.DateTimeFormatOptions): Record<string, string> {
const out: Record<string, string> = {}
try {
for (const part of new Intl.DateTimeFormat(locale, { timeZone: zone, ...options }).formatToParts(date)) out[part.type] = part.value
} catch {
for (const part of new Intl.DateTimeFormat('en-GB', { timeZone: zone, ...options }).formatToParts(date)) out[part.type] = part.value
}
return out
}
function formatClock(date: Date, zone: string, locale: string, hour12: boolean): string {
const parts = partsOf(date, zone, locale, { hour: 'numeric', minute: '2-digit', hour12 })
const clock = `${parts.hour ?? ''}:${parts.minute ?? ''}`
return parts.dayPeriod ? `${clock} ${parts.dayPeriod}` : clock
}
function formatMoment(date: Date, zone: string, locale: string, hour12: boolean, template: string): string {
const parts = partsOf(date, zone, locale, { weekday: 'short', day: 'numeric', month: 'short' })
return fill(template, {
weekday: parts.weekday ?? '',
day: parts.day ?? '',
month: parts.month ?? '',
time: formatClock(date, zone, locale, hour12),
}).trim()
}
function zoneName(date: Date, zone: string, locale: string): string {
return partsOf(date, zone, locale, { timeZoneName: 'short' }).timeZoneName ?? zone
}
function toBasicUtc(date: Date): string {
return date.toISOString().replace(/[-:]/g, '').replace(/[.][0-9]{3}/, '')
}
function slugify(value: string): string {
return value
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-+|-+$/g, '')
}
function escapeIcs(value: string): string {
return value
.split(BS)
.join(BS + BS)
.split(';')
.join(BS + ';')
.split(',')
.join(BS + ',')
.split(CR)
.join('')
.split(NL)
.join(BS + 'n')
}
// Official Google mark: keeps its own colours (theme-contract §3 exception).
function GoogleMark() {
return (
<svg className='cfca5-mark' viewBox='0 0 48 48' aria-hidden='true' focusable='false' data-official-mark='Google'>
<path fill='#FBBC05' d='M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z' />
<path fill='#EA4335' d='M6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z' />
<path fill='#34A853' d='M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.91 11.91 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z' />
<path fill='#4285F4' d='M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z' />
</svg>
)
}
// Official Microsoft Outlook mark: keeps its own colours (theme-contract §3 exception).
function OutlookMark() {
return (
<svg className='cfca5-mark' viewBox='0 0 24 24' aria-hidden='true' focusable='false' data-official-mark='Microsoft Outlook'>
<rect x='8' y='3.5' width='14' height='17' rx='2' fill='#28A8EA' />
<path d='M8 9.5l7 4.25 7-4.25v9a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2z' fill='#0364B8' />
<rect x='2' y='6' width='12' height='12' rx='2' fill='#0078D4' />
<ellipse cx='8' cy='12' rx='2.6' ry='3.1' fill='none' stroke='#FFFFFF' strokeWidth='1.8' />
</svg>
)
}
const CSS = `
.cf-calendar-actions-5{--cfca5-shadow:var(--shadow,oklch(0.22 0.03 260));position:relative;isolation:isolate;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(14px,1.8vw,20px) clamp(16px,5vw,48px);}
.cf-calendar-actions-5[data-open]{z-index:30;}
.cfca5-fx{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;opacity:.5;}
.cfca5-inner{position:relative;z-index:1;max-width:1240px;margin-inline:auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px;}
.cfca5-info{display:flex;align-items:center;gap:16px;min-width:0;}
.cfca5-spot{flex:none;display:inline-flex;line-height:0;}
.cfca5-when{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;min-width:0;}
.cfca5-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-0.01em;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.15;text-wrap:balance;color:var(--band-ink);}
.cfca5-timewrap{position:relative;min-width:0;}
.cfca5-time{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;gap:12px;min-height:64px;margin:0;padding:8px 16px;border:1px solid oklch(from var(--band-ink) l c h / 0.24);border-radius:calc(var(--button-radius,var(--radius,12px)) + 6px);background:oklch(from var(--band-ink) l c h / 0.08);color:var(--band-ink);font:inherit;text-align:left;cursor:pointer;box-shadow:inset 0 1px 0 oklch(from var(--band-ink) l c h / 0.1);transition:background-color .16s ease,border-color .16s ease,transform .16s ease;}
.cfca5-time:hover{background:oklch(from var(--band-ink) l c h / 0.14);border-color:oklch(from var(--band-ink) l c h / 0.44);}
.cfca5-time:active{transform:translateY(1px);background:oklch(from var(--band-ink) l c h / 0.18);}
.cfca5-time[aria-expanded=true]{background:oklch(from var(--band-ink) l c h / 0.16);border-color:oklch(from var(--band-ink) l c h / 0.6);}
.cfca5-time:focus-visible,.cfca5-key:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px;}
.cfca5-icon{flex:none;}
.cfca5-time-text{display:grid;gap:2px;min-width:0;}
.cfca5-time-main{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;white-space:nowrap;}
.cfca5-time-zone{font-size:0.9375rem;font-weight:600;line-height:1.3;color:color-mix(in oklch,var(--band-ink) 82%,var(--band));text-wrap:pretty;}
.cfca5-caret{flex:none;transition:transform .16s ease;}
.cfca5-time[aria-expanded=true] .cfca5-caret{transform:rotate(180deg);}
.cfca5-pop{position:absolute;top:calc(100% + 10px);left:0;z-index:40;width:min(22.5rem,calc(100vw - 32px));padding:8px;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32));text-align:left;transform-origin:top left;animation:cfca5-pop .2s cubic-bezier(.2,.7,.2,1) backwards;}
.cfca5-rows{list-style:none;margin:0;padding:0;display:grid;gap:2px;}
.cfca5-row{display:grid;gap:2px;padding:10px 12px;border-radius:10px;}
.cfca5-row[data-selected]{background:color-mix(in oklch,var(--accent) 10%,var(--card));}
.cfca5-row-label{font-size:0.9375rem;font-weight:600;line-height:1.3;color:var(--muted);}
.cfca5-row[data-selected] .cfca5-row-label{color:var(--ink);font-weight:800;}
.cfca5-row-time{font-size:1.0625rem;font-weight:800;line-height:1.3;color:var(--ink);font-variant-numeric:tabular-nums;}
.cfca5-pop-foot{margin:6px 12px;font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty;}
.cfca5-keys{display:flex;flex-wrap:wrap;gap:6px;padding:6px;border:1px solid oklch(from var(--band-ink) l c h / 0.16);border-radius:calc(var(--button-radius,var(--radius,12px)) + 6px);background:oklch(from var(--band-ink) l c h / 0.08);box-shadow:inset 0 1px 0 oklch(from var(--band-ink) l c h / 0.1);}
.cfca5-key{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;margin:0;padding:0 18px;border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--button-radius,var(--radius,12px));background:var(--card);color:var(--ink);font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.0625rem;line-height:1.15;text-decoration:none;white-space:nowrap;cursor:pointer;box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / 0.6),0 1px 2px oklch(from var(--cfca5-shadow) l c h / 0.3),0 6px 12px -6px oklch(from var(--cfca5-shadow) l c h / 0.5);transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease,color .16s ease;animation:cfca5-rise .45s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:calc(var(--i,0) * .07s);}
.cfca5-key-icon{display:inline-flex;flex:none;line-height:0;}
.cfca5-mark{display:block;width:18px;height:18px;}
.cfca5-key:not(:disabled):not([aria-disabled=true]):hover,.cfca5-key[data-force=hover]{background:color-mix(in oklch,var(--ink) 5%,var(--card));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / 0.6),0 1px 2px oklch(from var(--cfca5-shadow) l c h / 0.32),0 10px 18px -8px oklch(from var(--cfca5-shadow) l c h / 0.6);}
.cfca5-key:not(:disabled):not([aria-disabled=true]):active,.cfca5-key[data-force=active]{background:color-mix(in oklch,var(--ink) 8%,var(--card));transform:translateY(1px);box-shadow:inset 0 2px 3px oklch(from var(--cfca5-shadow) l c h / 0.22),0 1px 1px oklch(from var(--cfca5-shadow) l c h / 0.2);}
.cfca5-key:disabled,.cfca5-key[aria-disabled=true]{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);border-color:transparent;box-shadow:none;transform:none;}
.cfca5-key:disabled .cfca5-key-icon,.cfca5-key[aria-disabled=true] .cfca5-key-icon{filter:grayscale(1);opacity:0.55;}
.cf-calendar-actions-5 .cfca5-key.cfca5-copy[data-status=copied]{background:var(--success-soft,oklch(0.93 0.02 150));color:var(--success,oklch(0.5 0.14 150));border-color:oklch(from var(--success,oklch(0.5 0.14 150)) l c h / 0.35);}
.cf-calendar-actions-5 .cfca5-key.cfca5-copy[data-status=failed]{background:var(--danger-soft,oklch(0.93 0.024 27));color:var(--danger,oklch(0.5 0.17 27));border-color:oklch(from var(--danger,oklch(0.5 0.17 27)) l c h / 0.35);}
.cfca5-swap{display:grid;justify-items:center;}
.cfca5-swap>span{grid-area:1 / 1;visibility:hidden;}
.cfca5-copy[data-status=idle] .cfca5-swap-idle,.cfca5-copy[data-status=copied] .cfca5-swap-done,.cfca5-copy[data-status=failed] .cfca5-swap-fail{visibility:visible;}
.cfca5-copy[data-status=copied] .cfca5-swap-done,.cfca5-copy[data-status=copied] .cfca5-key-icon{animation:cfca5-tick .3s cubic-bezier(.2,.7,.2,1) backwards;}
.cfca5-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
@keyframes cfca5-rise{from{opacity:.82;transform:translateY(8px);}}
@keyframes cfca5-pop{from{opacity:.82;transform:translateY(-6px) scale(.98);}}
@keyframes cfca5-tick{from{transform:scale(.9);}}
@media (max-width:640px){
.cfca5-inner{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;}
.cfca5-info{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:12px;}
.cfca5-info[data-spot]{grid-template-columns:auto minmax(0,1fr);}
.cfca5-when{display:contents;}
.cfca5-timewrap{grid-column:1 / -1;}
.cfca5-time{display:flex;width:100%;}
.cfca5-caret{margin-left:auto;}
.cfca5-time-main{white-space:normal;}
.cfca5-keys{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
.cfca5-key{min-height:52px;padding:0 12px;}
.cfca5-time{min-height:60px;padding:8px 14px;}
}
@media (prefers-reduced-motion:reduce){
.cfca5-key,.cfca5-pop,.cfca5-swap>span,.cfca5-key-icon{animation:none !important;}
.cfca5-key,.cfca5-time,.cfca5-caret{transition:none;}
.cfca5-key:not(:disabled):not([aria-disabled=true]):hover,.cfca5-key[data-force=hover],.cfca5-key:not(:disabled):not([aria-disabled=true]):active,.cfca5-key[data-force=active],.cfca5-time:active{transform:none;}
}
`
pieces/checkout/calendar-actions-5/specimen.tsx 21 lines
import * as React from 'react'
import { CalendarActions5 } from '../calendar-actions-5'
export const states = ['default', 'hover', 'active', 'disabled']
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled'
export default function CalendarActions5Specimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<CalendarActions5
title='Automations 101 Live'
startsAt='2026-12-02T19:00:00Z'
endsAt='2026-12-02T20:00:00Z'
hostTimezone='America/New_York'
hostCity='New York'
joinUrl='https://flowpad.example/live/automations-101'
description='Build your first three Flowpad automations live, then bring your questions to the Q&A.'
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
title RequiredCalendarActions5 |
string |
|
heading OptionalCalendarActions5 |
React.ReactNode |
|
startsAt RequiredCalendarActions5 |
string |
|
endsAt OptionalCalendarActions5 |
string |
|
hostTimezone RequiredCalendarActions5 |
string |
|
hostCity OptionalCalendarActions5 |
string |
|
viewerTimezone OptionalCalendarActions5 |
string |
|
joinUrl OptionalCalendarActions5 |
string |
|
location OptionalCalendarActions5 |
string |
|
description OptionalCalendarActions5 |
string |
|
locale OptionalCalendarActions5 |
string |
Default 'en-GB'
|
hour12 OptionalCalendarActions5 |
boolean |
Default true
|
copy OptionalCalendarActions5 |
Partial<CalendarActions5Copy> |
|
spotImage OptionalCalendarActions5 |
string | null |
Default calendarSpot
|
onAction OptionalCalendarActions5 |
(action: CalendarAction, event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalCalendarActions5 |
boolean |
Default false
|
state OptionalCalendarActions5 |
CalendarActions5State |
Default 'default'
|
className OptionalCalendarActions5 |
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-case--button-font--button-radius--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--card-border--card-radius- Cards and panels: radius, border and shadow.
--display-case--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
321240b3188e2da4.webp
image/webp · 18.7 KB