Page Footer 5
Store page footer: one last low-friction yes for visitors not ready to buy (an inline email signup carrying the
Use it in a prompt
Use content/page-footer-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/content/page-footer-5.tsx. - Import it and pass your copy and images (Props tab):
import { PageFooter5 } from "@/components/funneldna/content/page-footer-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/page-footer-5/component.tsx 781 lines
// layout: route-map
// Store page footer: one last low-friction yes for visitors not ready to buy (an inline email signup carrying the
// supplied first-order offer on a colour-blocked band), then the order route of supplied promises with clay spots,
// link columns (accordions on phones), official card marks and the copyright.
// Theme notes: every colour reads the theme tokens; hex appears only as the last fallback inside var(). Documented
// exceptions: the yellow marker default (#fae37c, the contract's --marker fallback) and the official card-network
// marks from react-svg-credit-card-payment-icons, which keep their own colours inside their SVGs only.
import * as React from 'react';
import { AlertCircle, ChevronDown, Gift, Info, Loader2, Lock } from 'lucide-react';
import * as PaymentIcons from 'react-svg-credit-card-payment-icons';
import { Spot } from '../fx/fx';
import truck from '../fx/spots/truck';
import shield from '../fx/spots/shield';
import calendar from '../fx/spots/calendar';
export type PageFooter5Promise = {
title: string;
/** One supporting line, e.g. the policy detail. */
detail?: string;
/** Imported fx spot asset; defaults to truck, shield, calendar by position. */
spot?: string;
/** Alt text when the spot carries meaning on its own; decorative otherwise. */
spotAlt?: string;
};
export type PageFooter5Link = { label: string; href: string };
export type PageFooter5Column = {
/** Column heading, e.g. 'Shop'. */
title: string;
links: PageFooter5Link[];
};
export type PageFooter5Card = 'visa' | 'mastercard' | 'amex' | 'discover' | 'applepay' | 'googlepay' | 'paypal';
export type PageFooter5Copy = {
emailLabel: string;
placeholder: string;
button: string;
/** Button text while onSubmit is pending. */
pending: string;
/** Error when the field is empty on submit. */
required: string;
/** Error when the address is incomplete. */
invalid: string;
/** Typo hint; {email} is replaced by the tappable suggestion. */
hint: string;
/** Accessible label of the suggestion button; {email} is replaced. */
useSuggestion: string;
/** Error when onSubmit rejects. */
failed: string;
/** Reassurance line under the form; hidden when empty. */
privacy: string;
/** Accessible name of the promise route when it has no headline. */
promisesLabel: string;
/** Accessible name of the link navigation. */
navLabel: string;
/** Accessible name of the card mark row. */
cardsLabel: string;
};
export type PageFooter5State = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export type PageFooter5Props = {
/** Signup headline on the colour band. */
headline?: React.ReactNode;
lead?: React.ReactNode;
/** Supplied first-order offer; the offer line hides when empty. */
offer?: string;
/** Product cut-out on a transparent background (slot 'product'); hidden when empty. */
productImage?: string;
productImageAlt?: string;
/** Headline over the promise route; a string can take one marker stroke via routeHighlight. */
routeHeadline?: React.ReactNode;
routeHighlight?: string;
/** Supplied shipping, returns and subscription promises (two to four). The route hides when empty. */
promises?: PageFooter5Promise[];
brandName?: string;
/** Logo image (slot 'logo'); without it the wordmark shows. */
logoImage?: string;
brandHref?: string;
tagline?: string;
/** Lead-in before the support email. */
supportLabel?: string;
supportEmail?: string;
/** Link columns, e.g. Shop, Help, About. */
columns?: PageFooter5Column[];
/** Card networks the store really accepts; hidden when empty. */
cards?: PageFooter5Card[];
/** Named placeholders: {year} and {brand}. */
copyrightTemplate?: string;
year?: number | string;
/** Quiet second line under the button, e.g. 'Or keep shopping'. Needs secondaryHref. */
secondaryLabel?: string;
secondaryHref?: string;
/** Domains the typo hint compares against. */
typoDomains?: string[];
copy?: Partial<PageFooter5Copy>;
/** Called with the validated email; the builder wires what happens next. */
onSubmit?: (values: { email: string }) => void | Promise<void>;
/** Forced state for previews. */
state?: PageFooter5State;
className?: string;
};
export function PageFooter5(props: PageFooter5Props) {
const {
headline = 'Not ready to order? Get first dibs instead.',
lead = 'Join the list for new arrivals, restocks and the occasional good deal.',
offer,
productImage,
productImageAlt = '',
routeHeadline = 'What happens after you order',
routeHighlight = 'after you order',
promises = [],
brandName = 'Your Brand',
logoImage,
brandHref,
tagline,
supportLabel = 'Questions? Write to us at',
supportEmail,
columns = DEFAULT_COLUMNS,
cards = [],
copyrightTemplate = '\u00a9 {year} {brand}. All rights reserved.',
year,
secondaryLabel,
secondaryHref,
typoDomains = TYPO_DOMAINS,
onSubmit,
state = 'default',
className,
} = props;
const copy: PageFooter5Copy = { ...DEFAULT_COPY, ...(props.copy || {}) };
const uid = React.useId().replace(/:/g, '');
const signupId = `${uid}-signup`;
const fieldId = `${uid}-email`;
const errorId = `${uid}-error`;
const hintId = `${uid}-hint`;
const noteId = `${uid}-note`;
const routeId = `${uid}-route`;
const [email, setEmail] = React.useState('');
const [error, setError] = React.useState<string | null>(state === 'error' ? copy.required : null);
const [hint, setHint] = React.useState<string | null>(null);
const [busy, setBusy] = React.useState(false);
const [phone, setPhone] = React.useState(false);
const [open, setOpen] = React.useState<Record<number, boolean>>({});
const [anim, setAnim] = React.useState<'off' | 'ready' | 'in'>('off');
const inputRef = React.useRef<HTMLInputElement>(null);
const trackRef = React.useRef<HTMLDivElement>(null);
const alive = React.useRef(true);
const stops = (promises || []).filter((item) => item && item.title).slice(0, 4);
const hasRoute = stops.length > 0;
const pending = busy || state === 'disabled';
React.useEffect(() => {
alive.current = true;
return () => {
alive.current = false;
};
}, []);
React.useEffect(() => {
setError(state === 'error' ? copy.required : null);
setHint(null);
}, [state, copy.required]);
React.useEffect(() => {
if (typeof window === 'undefined' || !window.matchMedia) return;
const query = window.matchMedia('(max-width: 640px)');
const sync = () => setPhone(query.matches);
sync();
if (query.addEventListener) {
query.addEventListener('change', sync);
return () => query.removeEventListener('change', sync);
}
return undefined;
}, []);
React.useEffect(() => {
const el = trackRef.current;
if (!el || typeof window === 'undefined' || !('IntersectionObserver' in window)) return;
if (window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
setAnim('ready');
const io = new IntersectionObserver(
(entries) => {
if (entries.some((entry) => entry.isIntersecting)) {
setAnim('in');
io.disconnect();
}
},
{ threshold: 0.3 },
);
io.observe(el);
return () => io.disconnect();
}, [hasRoute]);
const isEmail = (value: string) => EMAIL_PATTERN.test(value);
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value;
setEmail(value);
if (hint) setHint(null);
if (error && isEmail(value.trim())) setError(null);
};
const handleBlur = () => {
const value = email.trim();
if (!value) {
setHint(null);
return;
}
const suggestion = suggestEmail(value, typoDomains);
setHint(suggestion);
setError(suggestion || isEmail(value) ? null : copy.invalid);
};
const acceptHint = () => {
if (!hint) return;
setEmail(hint);
setHint(null);
setError(null);
if (inputRef.current) inputRef.current.focus();
};
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (pending) return;
const value = email.trim();
if (!value) {
setError(copy.required);
if (inputRef.current) inputRef.current.focus();
return;
}
if (!isEmail(value)) {
setError(copy.invalid);
setHint(suggestEmail(value, typoDomains));
if (inputRef.current) inputRef.current.focus();
return;
}
setError(null);
if (!onSubmit) return;
setBusy(true);
try {
await onSubmit({ email: value });
} catch {
if (alive.current) setError(copy.failed);
} finally {
if (alive.current) setBusy(false);
}
};
const describedBy =
[error ? errorId : '', hint ? hintId : '', copy.privacy ? noteId : ''].filter(Boolean).join(' ') || undefined;
const hintParts = copy.hint.split('{email}');
const hintBefore = hintParts[0] || '';
const hintAfter = hintParts[1] || '';
const copyright = copyrightTemplate
.replace('{year}', String(year ?? new Date().getFullYear()))
.replace('{brand}', brandName);
const marks = (cards || []).flatMap((key) => {
const entry = CARD_MARKS[key];
if (!entry) return [];
const Mark = pickIcon(entry.names);
return Mark ? [{ key, Mark, label: entry.label }] : [];
});
const btnClass = ['cf-pf5__btn', state === 'hover' ? 'is-hover' : '', state === 'active' ? 'is-active' : '']
.filter(Boolean)
.join(' ');
const brandMark = logoImage ? <img className='cf-pf5__logo' src={logoImage} alt={brandName} /> : brandName;
return (
<footer
className={className ? `cf-page-footer-5 ${className}` : 'cf-page-footer-5'}
data-anim={anim === 'off' ? undefined : anim}
>
<style>{CSS}</style>
<section className='cf-pf5__band' aria-labelledby={signupId}>
<div className={productImage ? 'cf-pf5__wrap cf-pf5__signup has-art' : 'cf-pf5__wrap cf-pf5__signup'}>
{productImage ? (
<img
className='cf-pf5__art'
src={productImage}
alt={productImageAlt}
width={320}
height={400}
loading='lazy'
decoding='async'
/>
) : null}
<div className='cf-pf5__copy'>
<h2 id={signupId} className='cf-pf5__headline'>
{headline}
</h2>
{lead ? <p className='cf-pf5__lead'>{lead}</p> : null}
{offer ? (
<p className='cf-pf5__offer'>
<Gift aria-hidden='true' strokeWidth={2.5} />
{offer}
</p>
) : null}
</div>
<form className='cf-pf5__form' noValidate onSubmit={handleSubmit} aria-busy={pending || undefined}>
<label className='cf-pf5__label' htmlFor={fieldId}>
{copy.emailLabel}
</label>
<div className='cf-pf5__row'>
<input
ref={inputRef}
id={fieldId}
className='cf-pf5__field'
type='email'
name='email'
inputMode='email'
autoComplete='email'
autoCapitalize='none'
spellCheck={false}
placeholder={copy.placeholder}
value={email}
onChange={handleChange}
onBlur={handleBlur}
readOnly={pending}
aria-invalid={error ? true : undefined}
aria-describedby={describedBy}
/>
<button type='submit' className={btnClass} disabled={pending}>
{pending ? <Loader2 className='cf-pf5__spin' aria-hidden='true' strokeWidth={2.5} /> : null}
<span>{pending ? copy.pending : copy.button}</span>
</button>
</div>
<div className='cf-pf5__msgs' aria-live='polite'>
{error ? (
<p id={errorId} className='cf-pf5__msg cf-pf5__msg--error'>
<AlertCircle aria-hidden='true' strokeWidth={2.5} />
{error}
</p>
) : null}
{hint ? (
<p id={hintId} className='cf-pf5__msg cf-pf5__msg--hint'>
<Info aria-hidden='true' strokeWidth={2.5} />
{hintBefore}
<button
type='button'
className='cf-pf5__fix'
onClick={acceptHint}
aria-label={copy.useSuggestion.replace('{email}', hint)}
>
{hint}
</button>
{hintAfter}
</p>
) : null}
</div>
{copy.privacy ? (
<p id={noteId} className='cf-pf5__note'>
<Lock aria-hidden='true' strokeWidth={2.5} />
{copy.privacy}
</p>
) : null}
{secondaryLabel && secondaryHref ? (
<a className='cf-pf5__alt' href={secondaryHref}>
{secondaryLabel}
</a>
) : null}
</form>
</div>
</section>
{hasRoute ? (
<section
className='cf-pf5__route'
aria-labelledby={routeHeadline ? routeId : undefined}
aria-label={routeHeadline ? undefined : copy.promisesLabel}
>
<div className='cf-pf5__wrap'>
{routeHeadline ? (
<h2 id={routeId} className='cf-pf5__route-title'>
{renderMarked(routeHeadline, routeHighlight)}
</h2>
) : null}
<div className='cf-pf5__track' ref={trackRef} style={{ ['--n' as string]: stops.length } as React.CSSProperties}>
<span className='cf-pf5__line' aria-hidden='true' />
<ul className='cf-pf5__stops'>
{stops.map((item, index) => (
<li
key={`${item.title}-${index}`}
className='cf-pf5__stop'
style={{ ['--i' as string]: index } as React.CSSProperties}
>
<span className='cf-pf5__station'>
<Spot
src={item.spot || DEFAULT_SPOTS[index % DEFAULT_SPOTS.length]}
size={phone ? 56 : 72}
alt={item.spotAlt}
/>
</span>
<div className='cf-pf5__stop-copy'>
<h3 className='cf-pf5__stop-title'>{item.title}</h3>
{item.detail ? <p className='cf-pf5__stop-detail'>{item.detail}</p> : null}
</div>
</li>
))}
</ul>
</div>
</div>
</section>
) : null}
<div className='cf-pf5__wrap'>
<div className={hasRoute ? 'cf-pf5__nav' : 'cf-pf5__nav is-first'}>
<div className='cf-pf5__brand'>
{brandHref ? (
<a className='cf-pf5__wordmark' href={brandHref}>
{brandMark}
</a>
) : (
<p className='cf-pf5__wordmark'>{brandMark}</p>
)}
{tagline ? <p className='cf-pf5__tagline'>{tagline}</p> : null}
{supportEmail ? (
<p className='cf-pf5__support'>
{supportLabel}{' '}
<a className='cf-pf5__mail' href={`mailto:${supportEmail}`}>
{supportEmail}
</a>
</p>
) : null}
</div>
{columns.length ? (
<nav
className='cf-pf5__cols'
aria-label={copy.navLabel}
style={{ ['--cols' as string]: columns.length } as React.CSSProperties}
>
{columns.map((column, index) => {
const listId = `${uid}-col-${index}`;
const expanded = Boolean(open[index]);
return (
<div className='cf-pf5__col' key={`${column.title}-${index}`}>
<h2 className='cf-pf5__col-title'>
{phone ? (
<button
type='button'
className='cf-pf5__toggle'
aria-expanded={expanded}
aria-controls={listId}
onClick={() => setOpen((prev) => ({ ...prev, [index]: !prev[index] }))}
>
<span>{column.title}</span>
<ChevronDown aria-hidden='true' strokeWidth={2.5} />
</button>
) : (
column.title
)}
</h2>
<ul id={listId} className='cf-pf5__links' hidden={phone && !expanded}>
{column.links.map((link, linkIndex) => (
<li key={`${link.label}-${linkIndex}`}>
<a className='cf-pf5__navlink' href={link.href}>
{link.label}
</a>
</li>
))}
</ul>
</div>
);
})}
</nav>
) : null}
</div>
<div className='cf-pf5__base'>
<p className='cf-pf5__copyright'>{copyright}</p>
{marks.length ? (
<ul className='cf-pf5__cards' aria-label={copy.cardsLabel}>
{marks.map(({ key, Mark, label }) => (
<li key={key}>
<span className='cf-pf5__card' role='img' aria-label={label} data-official-mark={label}>
<Mark aria-hidden='true' />
</span>
</li>
))}
</ul>
) : null}
</div>
</div>
</footer>
);
}
export default PageFooter5;
const DEFAULT_COPY: PageFooter5Copy = {
emailLabel: 'Email address',
placeholder: 'you@example.com',
button: 'Join The List',
pending: 'Sending\u2026',
required: 'Enter your email to join the list.',
invalid: 'That email looks incomplete. Try a full address like you@example.com.',
hint: 'Did you mean {email}?',
useSuggestion: 'Use {email}',
failed: 'We couldn\u2019t add you just now. Please try again.',
privacy: 'Unsubscribe anytime.',
promisesLabel: 'Our promises',
navLabel: 'Footer',
cardsLabel: 'Accepted payment methods',
};
const DEFAULT_COLUMNS: PageFooter5Column[] = [
{
title: 'Shop',
links: [
{ label: 'All products', href: '#' },
{ label: 'New arrivals', href: '#' },
{ label: 'Bundles', href: '#' },
{ label: 'Gift cards', href: '#' },
],
},
{
title: 'Help',
links: [
{ label: 'Shipping', href: '#' },
{ label: 'Returns', href: '#' },
{ label: 'Track an order', href: '#' },
{ label: 'Contact us', href: '#' },
],
},
{
title: 'About',
links: [
{ label: 'Our story', href: '#' },
{ label: 'Journal', href: '#' },
{ label: 'Privacy policy', href: '#' },
{ label: 'Terms of service', href: '#' },
],
},
];
const DEFAULT_SPOTS: string[] = [truck, shield, calendar];
const TYPO_DOMAINS = [
'gmail.com',
'googlemail.com',
'yahoo.com',
'hotmail.com',
'outlook.com',
'icloud.com',
'aol.com',
'live.com',
'msn.com',
'me.com',
'mac.com',
'proton.me',
'protonmail.com',
'comcast.net',
];
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
// Official network marks: looked up by export name so a missing mark is skipped, never rendered broken.
const CARD_MARKS: Record<PageFooter5Card, { names: string[]; label: string }> = {
visa: { names: ['Visa'], label: 'Visa' },
mastercard: { names: ['Mastercard', 'MasterCard'], label: 'Mastercard' },
amex: { names: ['AmericanExpress', 'Amex'], label: 'American Express' },
discover: { names: ['Discover'], label: 'Discover' },
applepay: { names: ['ApplePay'], label: 'Apple Pay' },
googlepay: { names: ['GooglePay'], label: 'Google Pay' },
paypal: { names: ['PayPal', 'Paypal'], label: 'PayPal' },
};
const ICON_EXPORTS = PaymentIcons as unknown as Record<string, unknown>;
function pickIcon(names: string[]): React.ElementType | null {
for (const name of names) {
const candidate = ICON_EXPORTS[name];
if (typeof candidate === 'function') return candidate as React.ElementType;
if (candidate && typeof candidate === 'object' && '$$typeof' in (candidate as object)) {
return candidate as React.ElementType;
}
}
return null;
}
function renderMarked(text: React.ReactNode, phrase?: string) {
if (typeof text !== 'string' || !phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<mark className='cf-pf5__mark'>{phrase}</mark>
{text.slice(at + phrase.length)}
</>
);
}
// Edit distance between two short strings (domain typos).
function distance(a: string, b: string) {
if (a === b) return 0;
const row: number[] = [];
for (let j = 0; j <= b.length; j++) row.push(j);
for (let i = 1; i <= a.length; i++) {
let prev = row[0];
row[0] = i;
for (let j = 1; j <= b.length; j++) {
const temp = row[j];
row[j] = Math.min(row[j] + 1, row[j - 1] + 1, prev + (a[i - 1] === b[j - 1] ? 0 : 1));
prev = temp;
}
}
return row[b.length];
}
// Suggests a corrected address when the domain is one or two keystrokes from a common provider.
function suggestEmail(value: string, domains: string[]): string | null {
const at = value.lastIndexOf('@');
if (at < 1 || at === value.length - 1) return null;
const local = value.slice(0, at);
const domain = value.slice(at + 1).toLowerCase();
if (domain.length < 4 || domains.indexOf(domain) >= 0) return null;
const hasDot = domain.indexOf('.') >= 0;
let best: string | null = null;
let bestScore = 3;
for (const known of domains) {
const target = hasDot ? known : known.split('.')[0];
const score = distance(domain, target);
if ((hasDot ? score > 0 : true) && score < bestScore) {
best = known;
bestScore = score;
}
}
return best ? `${local}@${best}` : null;
}
const CSS = `
.cf-page-footer-5{--pf5-gutter:clamp(16px,5vw,48px);--pf5-shadow:var(--shadow,oklch(0.22 0.03 260));--pf5-hair:oklch(from var(--ink) l c h / 0.12);position:relative;font-family:var(--font-body);color:var(--ink);background:var(--surface);overflow-x:clip}
.cf-page-footer-5 *,.cf-page-footer-5 *::before,.cf-page-footer-5 *::after{box-sizing:border-box}
.cf-page-footer-5 :where(h2,h3,p,ul){margin:0}
.cf-page-footer-5 :where(ul){list-style:none;padding:0}
.cf-pf5__wrap{width:100%;max-width:calc(1120px + 2 * var(--pf5-gutter));margin-inline:auto;padding-inline:var(--pf5-gutter)}
.cf-pf5__band{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));padding-block:clamp(40px,6vw,72px)}
.cf-pf5__signup{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,27rem);grid-template-areas:'copy form';gap:32px clamp(32px,4vw,56px);align-items:start}
.cf-pf5__signup.has-art{grid-template-columns:9rem minmax(0,1fr) minmax(0,27rem);grid-template-areas:'art copy form'}
.cf-pf5__art{grid-area:art;display:block;width:100%;height:auto;max-height:13rem;object-fit:contain;object-position:center top;filter:drop-shadow(0 2px 3px oklch(from var(--pf5-shadow) l c h / 0.35)) drop-shadow(0 12px 14px oklch(from var(--pf5-shadow) l c h / 0.28))}
.cf-pf5__copy{grid-area:copy;min-width:0}
.cf-pf5__headline{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance}
.cf-pf5__lead{margin-top:16px;max-width:46ch;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;text-wrap:pretty}
.cf-pf5__offer{display:inline-block;max-width:100%;margin-top:20px;padding:6px 14px;border:1.5px solid oklch(from var(--accent-fill-ink,var(--card)) l c h / 0.55);border-radius:999px;font-size:0.9375rem;font-weight:800;line-height:1.4;text-wrap:pretty}
.cf-pf5__offer svg{display:inline-block;width:18px;height:18px;vertical-align:-0.2em;margin-inline-end:0.45em}
.cf-pf5__form{grid-area:form;min-width:0}
.cf-pf5__label{display:block;margin-bottom:8px;font-size:1.0625rem;font-weight:700;line-height:1.3}
.cf-pf5__row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.cf-pf5__field{width:100%;min-width:0;height:56px;padding:0 16px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));background:var(--field);color:var(--field-ink);font:inherit;font-size:1.0625rem;box-shadow:inset 0 1px 2px oklch(from var(--pf5-shadow) l c h / 0.12);transition:border-color .16s ease,box-shadow .16s ease}
.cf-pf5__field::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-pf5__field:focus{outline:3px solid var(--accent-fill-ink,var(--card));outline-offset:2px;border-color:var(--field-focus,var(--accent))}
.cf-pf5__field[aria-invalid='true']{border-color:var(--danger);box-shadow:inset 0 0 0 1px var(--danger)}
.cf-pf5__field[readonly]{cursor:progress}
.cf-pf5__btn{--pf5-b:var(--button-bg,var(--cta));--pf5-b2:var(--button-bg-2,var(--cta-2));display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;min-width:11rem;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--pf5-b) calc(l + 0.04) c h),oklch(from var(--pf5-b2) 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-shadow:var(--button-text-shadow,none);white-space:nowrap;cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pf5-b) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--pf5-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--pf5-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--pf5-shadow) l c h / 0.38));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-pf5__btn:hover:not(:disabled),.cf-pf5__btn.is-hover{background:linear-gradient(oklch(from var(--pf5-b) calc(l - 0.01) c h),oklch(from var(--pf5-b2) calc(l - 0.07) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--pf5-b) calc(l + 0.1) c h / 0.6),inset 0 -3px 0 oklch(from var(--pf5-b) calc(l - 0.2) c h),0 1px 2px oklch(from var(--pf5-shadow) l c h / 0.34),0 10px 18px -6px oklch(from var(--pf5-shadow) l c h / 0.46)}
.cf-pf5__btn:active:not(:disabled),.cf-pf5__btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--pf5-b) calc(l - 0.04) c h),oklch(from var(--pf5-b2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--pf5-b) calc(l - 0.22) c h / 0.45),inset 0 -2px 0 oklch(from var(--pf5-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--pf5-shadow) l c h / 0.3)}
.cf-pf5__btn:focus-visible{outline:3px solid var(--accent-fill-ink,var(--card));outline-offset:3px}
.cf-pf5__btn:disabled{cursor:progress;transform:none;background:var(--pf5-b2);box-shadow:inset 0 2px 3px oklch(from var(--pf5-b) calc(l - 0.2) c h / 0.35),0 1px 2px oklch(from var(--pf5-shadow) l c h / 0.25)}
.cf-pf5__spin{flex:none;width:20px;height:20px;animation:cf-pf5-spin .8s linear infinite}
.cf-pf5__msgs{display:grid;gap:8px;justify-items:start}
.cf-pf5__msgs:not(:empty){margin-top:10px}
.cf-pf5__msg{max-width:100%;padding:8px 12px;border-radius:10px;font-size:0.9375rem;font-weight:600;line-height:1.45;text-wrap:pretty}
.cf-pf5__msg svg{display:inline-block;width:18px;height:18px;vertical-align:-0.2em;margin-inline-end:0.4em}
.cf-pf5__msg--error{background:var(--danger-soft);color:var(--danger)}
.cf-pf5__msg--hint{padding:10px 14px;background:var(--card);color:var(--ink);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--pf5-shadow) l c h / 0.22))}
.cf-pf5__msg--hint svg{color:var(--accent)}
.cf-pf5__fix{display:inline;margin:-4px 0;padding:4px 2px;border:0;border-radius:4px;background:none;color:var(--link,var(--accent));font:inherit;font-weight:800;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / 0.45);text-underline-offset:0.18em;overflow-wrap:anywhere;cursor:pointer}
.cf-pf5__fix:hover{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-pf5__fix:focus-visible{outline:2px solid var(--link,var(--accent));outline-offset:2px}
.cf-pf5__note{margin-top:12px;font-size:0.9375rem;font-weight:500;line-height:1.4;text-wrap:pretty}
.cf-pf5__note svg{display:inline-block;width:16px;height:16px;vertical-align:-0.15em;margin-inline-end:0.4em}
.cf-pf5__alt{display:inline-block;margin-top:8px;border-radius:4px;color:inherit;font-size:0.9375rem;font-weight:700;line-height:1.4;text-decoration:underline;text-decoration-color:oklch(from var(--accent-fill-ink,var(--card)) l c h / 0.5);text-decoration-thickness:1.5px;text-underline-offset:0.2em}
.cf-pf5__alt:hover{text-decoration-color:currentColor;text-decoration-thickness:2px}
.cf-pf5__alt:focus-visible{outline:3px solid var(--accent-fill-ink,var(--card));outline-offset:3px}
.cf-pf5__route{padding-block:clamp(48px,6vw,80px) clamp(40px,5vw,64px)}
.cf-pf5__route-title{text-align:center;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance}
.cf-pf5__mark{color:inherit;background:linear-gradient(to bottom,transparent 50%,color-mix(in oklch,var(--marker,#fae37c) 82%,transparent) 50%,color-mix(in oklch,var(--marker,#fae37c) 82%,transparent) 92%,transparent 92%);padding-inline:0.14em;margin-inline:-0.06em;border-radius:0.18em 0.1em 0.22em 0.12em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-pf5__track{--gap:clamp(24px,4vw,48px);position:relative;margin-top:32px}
.cf-pf5__line{position:absolute;top:42.5px;left:calc((100% - (var(--n) - 1) * var(--gap)) / var(--n) / 2);right:calc((100% - (var(--n) - 1) * var(--gap)) / var(--n) / 2);height:3px;border-radius:999px;background:var(--pf5-hair);overflow:hidden}
.cf-pf5__line::after{content:'';position:absolute;inset:0;border-radius:inherit;background:var(--accent-fill,var(--accent));transform-origin:left center}
.cf-page-footer-5[data-anim='ready'] .cf-pf5__line::after{transform:scaleX(0)}
.cf-page-footer-5[data-anim='in'] .cf-pf5__line::after{transform:scaleX(1);transition:transform 1.1s cubic-bezier(.2,.7,.2,1) .1s}
.cf-pf5__stops{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:var(--gap)}
.cf-pf5__stop{display:grid;justify-items:center;align-content:start;min-width:0;text-align:center}
.cf-page-footer-5[data-anim='ready'] .cf-pf5__stop{opacity:.82;transform:translateY(8px)}
.cf-page-footer-5[data-anim='in'] .cf-pf5__stop{animation:cf-pf5-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i) * .07s)}
.cf-pf5__station{position:relative;z-index:1;display:grid;place-items:center;width:88px;height:88px;border-radius:50%;background:var(--surface)}
.cf-pf5__stop-copy{min-width:0}
.cf-pf5__stop-title{margin-top:12px;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.2;letter-spacing:-0.01em;text-wrap:balance}
.cf-pf5__stop-detail{max-width:32ch;margin-top:8px;margin-inline:auto;color:var(--muted);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty}
.cf-pf5__nav{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,3fr);gap:32px clamp(32px,5vw,72px);padding-block:clamp(40px,5vw,56px);border-top:1px solid var(--pf5-hair)}
.cf-pf5__nav.is-first{border-top:0}
.cf-pf5__brand{min-width:0}
.cf-pf5__wordmark{display:inline-block;border-radius:4px;color:var(--ink);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;text-decoration:none}
a.cf-pf5__wordmark:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:0.15em}
a.cf-pf5__wordmark:focus-visible{outline:2px solid var(--link,var(--accent));outline-offset:3px}
.cf-pf5__logo{display:block;height:40px;width:auto;max-width:220px;object-fit:contain}
.cf-pf5__tagline{max-width:34ch;margin-top:12px;color:var(--muted);font-size:0.9375rem;font-weight:500;line-height:1.5;text-wrap:pretty}
.cf-pf5__support{margin-top:16px;color:var(--muted);font-size:0.9375rem;line-height:1.5;text-wrap:pretty}
.cf-pf5__mail{border-radius:4px;color:var(--link,var(--accent));font-weight:600;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / 0.45);text-underline-offset:0.18em;overflow-wrap:anywhere}
.cf-pf5__mail:hover{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-pf5__mail:focus-visible{outline:2px solid var(--link,var(--accent));outline-offset:2px}
.cf-pf5__cols{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:24px}
.cf-pf5__col{min-width:0}
.cf-pf5__col-title{color:var(--ink);font-family:var(--font-body);font-size:0.875rem;font-weight:800;line-height:1.2;letter-spacing:0.08em;text-transform:uppercase}
.cf-pf5__links{display:grid;gap:10px;margin-top:16px}
.cf-pf5__links[hidden]{display:none}
.cf-pf5__navlink{display:inline-block;padding-block:2px;border-radius:4px;color:var(--muted);font-size:1rem;font-weight:500;line-height:1.4;text-decoration:none}
.cf-pf5__navlink:hover{color:var(--ink);text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:0.2em}
.cf-pf5__navlink:focus-visible{outline:2px solid var(--link,var(--accent));outline-offset:3px;color:var(--ink)}
.cf-pf5__toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:56px;padding:0;border:0;border-radius:8px;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;text-align:left;cursor:pointer}
.cf-pf5__toggle svg{flex:none;width:20px;height:20px;transition:transform .16s ease}
.cf-pf5__toggle[aria-expanded='true'] svg{transform:rotate(180deg)}
.cf-pf5__toggle:hover span{text-decoration:underline;text-underline-offset:0.2em}
.cf-pf5__toggle:focus-visible{outline:2px solid var(--link,var(--accent));outline-offset:2px}
.cf-pf5__base{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px;padding-block:24px clamp(28px,4vw,40px);border-top:1px solid var(--pf5-hair)}
.cf-pf5__copyright{color:var(--muted);font-size:0.9375rem;line-height:1.4}
.cf-pf5__cards{display:flex;flex-wrap:wrap;gap:8px}
.cf-pf5__card{display:block;width:40px;height:26px}
.cf-pf5__card svg{display:block;width:100%;height:100%}
@keyframes cf-pf5-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-pf5-spin{to{transform:rotate(360deg)}}
@media (max-width:1100px){
.cf-pf5__signup{grid-template-columns:minmax(0,1fr);grid-template-areas:'copy' 'form'}
.cf-pf5__signup.has-art{grid-template-columns:minmax(0,1fr) 8rem;grid-template-areas:'copy art' 'form form'}
.cf-pf5__form{max-width:38rem}
}
@media (max-width:960px){
.cf-pf5__nav{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
.cf-pf5__signup.has-art{grid-template-columns:minmax(0,1fr) 4.75rem;column-gap:16px}
.cf-pf5__form{max-width:none}
.cf-pf5__row{grid-template-columns:minmax(0,1fr)}
.cf-pf5__btn{width:100%;white-space:normal}
.cf-pf5__line{display:none}
.cf-pf5__track{margin-top:24px}
.cf-pf5__stops{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 16px}
.cf-pf5__station{width:72px;height:72px}
.cf-pf5__stop-detail{font-size:0.9375rem;line-height:1.45}
.cf-pf5__stop:last-child:nth-child(odd){grid-column:1 / -1;grid-template-columns:auto minmax(0,1fr);column-gap:16px;justify-items:start;align-items:center;text-align:left}
.cf-pf5__stop:last-child:nth-child(odd) .cf-pf5__stop-title{margin-top:0}
.cf-pf5__stop:last-child:nth-child(odd) .cf-pf5__stop-detail{margin-inline:0}
.cf-pf5__cols{grid-template-columns:minmax(0,1fr);gap:0}
.cf-pf5__col{border-top:1px solid var(--pf5-hair)}
.cf-pf5__col:last-child{border-bottom:1px solid var(--pf5-hair)}
.cf-pf5__links{gap:0;margin-top:0;padding-bottom:12px}
.cf-pf5__navlink{display:block;padding-block:10px}
.cf-pf5__base{flex-direction:column;align-items:flex-start}
}
@media (prefers-reduced-motion:reduce){
.cf-pf5__btn,.cf-pf5__field,.cf-pf5__toggle svg{transition:none}
.cf-pf5__btn:hover:not(:disabled),.cf-pf5__btn.is-hover,.cf-pf5__btn:active:not(:disabled),.cf-pf5__btn.is-active{transform:none}
.cf-pf5__spin{animation:none}
.cf-page-footer-5[data-anim] .cf-pf5__stop{opacity:1;transform:none;animation:none}
.cf-page-footer-5[data-anim] .cf-pf5__line::after{transform:none;transition:none}
}
`;
pieces/content/page-footer-5/specimen.tsx 76 lines
import __studioImage0da8c706 from "../assets/00901a5d7aebc0be.webp";
import * as React from 'react';
import { PageFooter5 } from '../page-footer-5';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
const productArt = __studioImage0da8c706;
export default function PageFooter5Specimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<PageFooter5
headline='Not ready yet? Get first dibs on new roasts.'
lead='Join the Kettle & Crumb list for fresh drops, restock alerts and brew notes, about twice a month.'
offer='Take 15% off your first bag when you join'
productImage={slot('product', productArt)}
productImageAlt='Kettle & Crumb small-batch coffee bag'
routeHeadline='From our roaster to your mug, on your terms'
routeHighlight='on your terms'
promises={[
{ title: 'Free shipping over $35', detail: 'Roasted Monday, on its way by Wednesday.' },
{ title: '30-day freshness promise', detail: 'Not loving a bag? We\u2019ll replace it or refund it.' },
{ title: 'Skip, pause or swap anytime', detail: 'Change your subscription from your account in two taps.' },
]}
brandName='Kettle & Crumb'
brandHref='#'
tagline='Small-batch coffee, roasted to order and shipped while it\u2019s fresh.'
supportEmail='hello@kettleandcrumb.example'
columns={[
{
title: 'Shop',
links: [
{ label: 'Single origins', href: '#' },
{ label: 'House blends', href: '#' },
{ label: 'Decaf', href: '#' },
{ label: 'Subscriptions', href: '#' },
{ label: 'Gift cards', href: '#' },
],
},
{
title: 'Help',
links: [
{ label: 'Shipping', href: '#' },
{ label: 'Returns', href: '#' },
{ label: 'Track an order', href: '#' },
{ label: 'Contact us', href: '#' },
],
},
{
title: 'About',
links: [
{ label: 'Our roastery', href: '#' },
{ label: 'How we source', href: '#' },
{ label: 'Brew guides', href: '#' },
{ label: 'Wholesale', href: '#' },
],
},
]}
cards={['visa', 'mastercard', 'amex', 'discover', 'paypal']}
year={2026}
secondaryLabel='Or keep browsing this week\u2019s roasts'
secondaryHref='#shop'
copy={{
button: 'Send My 15% Code',
required: 'Enter your email to get your 15% code.',
privacy: defaults.sample.registration.privacy,
failed: defaults.sample.registration.error,
}}
onSubmit={() => undefined}
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalPageFooter5 |
React.ReactNode |
|
lead OptionalPageFooter5 |
React.ReactNode |
|
offer OptionalPageFooter5 |
string |
|
productImage OptionalPageFooter5 |
string |
|
productImageAlt OptionalPageFooter5 |
string |
|
routeHeadline OptionalPageFooter5 |
React.ReactNode |
|
routeHighlight OptionalPageFooter5 |
string |
|
promises OptionalPageFooter5 |
PageFooter5Promise[] |
|
brandName OptionalPageFooter5 |
string |
|
logoImage OptionalPageFooter5 |
string |
|
brandHref OptionalPageFooter5 |
string |
|
tagline OptionalPageFooter5 |
string |
|
supportLabel OptionalPageFooter5 |
string |
|
supportEmail OptionalPageFooter5 |
string |
|
columns OptionalPageFooter5 |
PageFooter5Column[] |
|
cards OptionalPageFooter5 |
PageFooter5Card[] |
|
copyrightTemplate OptionalPageFooter5 |
string |
|
year OptionalPageFooter5 |
number | string |
|
secondaryLabel OptionalPageFooter5 |
string |
|
secondaryHref OptionalPageFooter5 |
string |
|
typoDomains OptionalPageFooter5 |
string[] |
|
copy OptionalPageFooter5 |
Partial<PageFooter5Copy> |
|
onSubmit OptionalPageFooter5 |
(values: { email: string }) => void | Promise<void> |
|
state OptionalPageFooter5 |
PageFooter5State |
|
className OptionalPageFooter5 |
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.
--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.
product- The main product shot or cover (ebook, kit, bottle).
-
00901a5d7aebc0be.webp
image/webp · 81.5 KB
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
75ba15955a7397f6.webp
image/webp · 18.6 KB
-
7d6f1c81c93d8f71.webp
image/webp · 18.2 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB