Page Footer 9
Store page footer that wins one last low-friction yes: a colour-blocked signup band with the first-order
Use it in a prompt
Use content/page-footer-9 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-9.tsx. - Import it and pass your copy and images (Props tab):
import { PageFooter9 } from "@/components/funneldna/content/page-footer-9"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/page-footer-9/component.tsx 1028 lines
// layout: split-contrast
// Store page footer that wins one last low-friction yes: a colour-blocked signup band with the first-order
// offer and a typo-catching email field, then the store promises, link columns, card marks and copyright.
// Theme notes: every colour reads the theme tokens; hex appears only as the last fallback inside var().
// The band is --accent-fill with --accent-fill-ink text; the field, button and messages sit on a --card bar,
// so the action colour and the status colours keep their guaranteed contrast whatever the accent is.
// Documented exception: the card-network SVGs keep their official colours.
import * as React from 'react';
import { AlertCircle, ChevronDown, Gift, Loader2, Lock, MailCheck } from 'lucide-react';
import {
AmericanExpress,
Discover,
Mastercard,
PayPal,
Visa,
} from 'react-svg-credit-card-payment-icons/icons/flat-rounded';
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 PageFooter9Link = { label: string; href: string };
export type PageFooter9Column = {
/** Column heading, e.g. 'Shop'. On phones it becomes the accordion toggle. */
title: string;
links: PageFooter9Link[];
};
export type PageFooter9Promise = {
/** Bold lead-in phrase, e.g. 'Free shipping over $35.' */
lead: string;
/** Plain sentence after the lead-in. */
detail?: string;
/** Imported fx spot asset; defaults cycle truck, shield, calendar. */
spot?: string;
};
export type PageFooter9CardMark =
| 'visa'
| 'mastercard'
| 'amex'
| 'discover'
| 'paypal'
| 'applepay'
| 'googlepay';
export type PageFooter9Copy = {
emailLabel: string;
placeholder: string;
/** Shown when the visitor submits an empty field. */
required: string;
/** Shown on blur or submit when the address is malformed. */
invalid: string;
/** Typo hint button text; {email} is replaced with the suggested address. */
hint: string;
/** Button text while the promise returned by onSubmit is pending. */
submitting: string;
/** Accessible name of the promise list. */
promisesLabel: string;
/** Accessible name of the legal links. */
legalLabel: string;
/** Accessible name of the card marks list. */
paymentsLabel: string;
};
export type PageFooter9State = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export type PageFooter9Props = {
/** The signup promise. A string headline can take one marker stroke via `highlight`. */
headline?: React.ReactNode;
/** Phrase inside a string headline that gets the marker stroke. */
highlight?: string;
/** Supplied first-order offer line; hidden when empty. */
offer?: string;
lead?: string;
/** Product cut-out on a transparent background (slot 'product'); hidden on phones. */
productImage?: string;
productImageAlt?: string;
/** Button text (one line). */
label?: string;
/** Privacy line under the signup; hidden when empty. */
privacy?: string;
/** Quiet secondary line under the signup, e.g. 'or keep browsing the shop'. */
secondaryLabel?: string;
secondaryHref?: string;
/** Prefills the email field. */
defaultEmail?: string;
/** Called with the validated email. Return a promise to show the submitting state until it settles. */
onSubmit?: (values: { email: string }) => void | Promise<unknown>;
/** Shipping, returns and subscription promises (supplied copy only). */
promises?: PageFooter9Promise[];
brandName?: string;
/** Logo image (slot 'logo'). Without it the text wordmark shows. */
logoImage?: string;
/** Makes the wordmark or logo a link. */
brandHref?: string;
tagline?: string;
columns?: PageFooter9Column[];
legalLinks?: PageFooter9Link[];
/** Card and wallet marks the store really accepts. Marks without an official icon in the payment set
* ('applepay', 'googlepay') are accepted for compatibility but not drawn. */
cards?: PageFooter9CardMark[];
/** Accessible names of the card marks. */
cardLabels?: Partial<Record<PageFooter9CardMark, string>>;
/** Named placeholders: {year} and {brand}. */
copyrightTemplate?: string;
/** Year in the copyright; defaults to the current year. */
year?: number | string;
copy?: Partial<PageFooter9Copy>;
/** Forced state for previews. */
state?: PageFooter9State;
className?: string;
};
export function PageFooter9(props: PageFooter9Props) {
const {
headline = 'Not ready to order? Join the list.',
highlight,
offer,
lead = 'One short email with new arrivals, how-tos and what is coming next.',
productImage,
productImageAlt = '',
label = 'Join the List',
privacy,
secondaryLabel,
secondaryHref,
defaultEmail = '',
onSubmit,
promises = [],
brandName = 'Your Store',
logoImage,
brandHref,
tagline,
columns = DEFAULT_COLUMNS,
legalLinks = [],
cards = [],
cardLabels,
copyrightTemplate = '© {year} {brand}. All rights reserved.',
year,
state = 'default',
className,
} = props;
const copy: PageFooter9Copy = { ...DEFAULT_COPY, ...props.copy };
const markLabels = { ...DEFAULT_CARD_LABELS, ...cardLabels };
const uid = React.useId();
const headingId = `${uid}-heading`;
const inputId = `${uid}-email`;
const errorId = `${uid}-error`;
const hintId = `${uid}-hint`;
const privacyId = `${uid}-privacy`;
const [email, setEmail] = React.useState(defaultEmail);
const [error, setError] = React.useState<string | null>(() =>
state === 'error' ? validateEmail(defaultEmail.trim(), true, copy) : null,
);
const [suggestion, setSuggestion] = React.useState<string | null>(() =>
state === 'error' ? suggestEmail(defaultEmail.trim()) : null,
);
const [submitting, setSubmitting] = React.useState(false);
const [open, setOpen] = React.useState<Record<number, boolean>>({});
const narrow = useMedia('(max-width: 719px)');
const inputRef = React.useRef<HTMLInputElement>(null);
const nudged = React.useRef(false);
const mounted = React.useRef(true);
React.useEffect(() => {
mounted.current = true;
return () => {
mounted.current = false;
};
}, []);
// Forced preview states reset the field only when the state or the prefill changes.
React.useEffect(() => {
const value = defaultEmail.trim();
setEmail(defaultEmail);
nudged.current = false;
if (state === 'error') {
setError(validateEmail(value, true, copy));
setSuggestion(suggestEmail(value));
} else {
setError(null);
setSuggestion(null);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state, defaultEmail]);
const busy = submitting || state === 'disabled';
const forced = state === 'hover' || state === 'active' ? state : undefined;
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value;
setEmail(value);
nudged.current = false;
if (suggestion) setSuggestion(null);
if (error && !validateEmail(value.trim(), true, copy)) setError(null);
};
const handleBlur = () => {
const value = email.trim();
setError(validateEmail(value, false, copy));
setSuggestion(suggestEmail(value));
};
const acceptSuggestion = () => {
if (!suggestion) return;
setEmail(suggestion);
setError(null);
setSuggestion(null);
nudged.current = false;
inputRef.current?.focus();
};
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (busy) return;
const value = email.trim();
const nextError = validateEmail(value, true, copy);
const nextSuggestion = suggestEmail(value);
setError(nextError);
setSuggestion(nextSuggestion);
if (nextError) {
inputRef.current?.focus();
return;
}
// A likely typo pauses the first submit once so the hint is seen; a second submit keeps the address.
if (nextSuggestion && !nudged.current) {
nudged.current = true;
return;
}
setSuggestion(null);
const result = onSubmit?.({ email: value });
if (result && typeof (result as Promise<unknown>).then === 'function') {
setSubmitting(true);
const done = () => {
if (mounted.current) setSubmitting(false);
};
Promise.resolve(result).then(done, done);
}
};
const describedBy =
[error ? errorId : '', suggestion ? hintId : '', privacy ? privacyId : '']
.filter(Boolean)
.join(' ') || undefined;
const copyright = fillTemplate(copyrightTemplate, {
year: String(year ?? new Date().getFullYear()),
brand: brandName,
});
const shownPromises = promises.filter((item) => Boolean(item && item.lead));
const shownCards = cards.filter((mark) => Boolean(CARD_MARKS[mark]));
const hasUnder = Boolean((secondaryLabel && secondaryHref) || privacy);
const wordmark = logoImage ? (
<img className='cf-pf9__logo' src={logoImage} alt={brandName} />
) : (
<span>{brandName}</span>
);
return (
<footer className={className ? `cf-pf9 ${className}` : 'cf-pf9'}>
<style>{CSS}</style>
<section className='cf-pf9__band' aria-labelledby={headingId}>
<div className='cf-pf9__band-in' data-product={productImage ? '' : undefined}>
{productImage ? (
<div className='cf-pf9__shot' data-rise='' style={rise(0)}>
<img
className='cf-pf9__product'
src={productImage}
alt={productImageAlt}
width={480}
height={480}
loading='lazy'
decoding='async'
/>
</div>
) : null}
<div className='cf-pf9__main'>
<div className='cf-pf9__copy' data-rise='' style={rise(1)}>
<h2 id={headingId} className='cf-pf9__headline'>
{renderHeadline(headline, highlight)}
</h2>
{offer ? (
<p className='cf-pf9__offer'>
<Gift className='cf-pf9__ico' aria-hidden strokeWidth={2.5} />
{offer}
</p>
) : null}
{lead ? <p className='cf-pf9__lead'>{lead}</p> : null}
</div>
<form
className='cf-pf9__form'
noValidate
onSubmit={handleSubmit}
aria-busy={busy || undefined}
data-rise=''
style={rise(2)}
>
<label className='cf-pf9__label' htmlFor={inputId}>
{copy.emailLabel}
</label>
<div className='cf-pf9__bar'>
<div className='cf-pf9__row'>
<input
ref={inputRef}
id={inputId}
className='cf-pf9__input'
type='email'
name='email'
inputMode='email'
autoComplete='email'
autoCapitalize='none'
spellCheck={false}
placeholder={copy.placeholder}
value={email}
onChange={handleChange}
onBlur={handleBlur}
aria-invalid={error ? true : undefined}
aria-describedby={describedBy}
readOnly={busy}
/>
<button type='submit' className='cf-pf9__btn' data-state={forced} disabled={busy}>
{busy ? (
<>
<Loader2 className='cf-pf9__spin' aria-hidden size={20} strokeWidth={2.5} />
<span>{copy.submitting}</span>
</>
) : (
<span>{label}</span>
)}
</button>
</div>
<div className='cf-pf9__msgs' aria-live='polite'>
{error ? (
<p id={errorId} className='cf-pf9__error'>
<AlertCircle className='cf-pf9__ico' aria-hidden strokeWidth={2.5} />
{error}
</p>
) : null}
{suggestion ? (
<p id={hintId} className='cf-pf9__hint'>
<button type='button' className='cf-pf9__hint-btn' onClick={acceptSuggestion}>
<MailCheck className='cf-pf9__ico' aria-hidden strokeWidth={2.5} />
{renderHint(copy.hint, suggestion)}
</button>
</p>
) : null}
</div>
</div>
{hasUnder ? (
<div className='cf-pf9__under'>
{secondaryLabel && secondaryHref ? (
<p className='cf-pf9__alt'>
<a href={secondaryHref}>{secondaryLabel}</a>
</p>
) : null}
{privacy ? (
<p id={privacyId} className='cf-pf9__privacy'>
<Lock className='cf-pf9__ico' aria-hidden strokeWidth={2.5} />
{privacy}
</p>
) : null}
</div>
) : null}
</form>
</div>
</div>
</section>
<div className='cf-pf9__base'>
<div className='cf-pf9__base-in'>
{shownPromises.length > 0 ? (
<ul
className='cf-pf9__promises'
aria-label={copy.promisesLabel}
style={{ '--pf9-n': Math.min(shownPromises.length, 3) } as React.CSSProperties}
>
{shownPromises.map((item, index) => (
<li key={`${item.lead}-${index}`} className='cf-pf9__promise' data-rise='' style={rise(index + 3)}>
<span className='cf-pf9__spot' aria-hidden='true'>
<Spot src={item.spot ?? DEFAULT_SPOTS[index % DEFAULT_SPOTS.length]} size={60} />
</span>
<p className='cf-pf9__promise-text'>
<strong>{item.lead}</strong>
{item.detail ? <> {item.detail}</> : null}
</p>
</li>
))}
</ul>
) : null}
<div
className='cf-pf9__nav'
style={{ '--pf9-cols': Math.max(columns.length, 1) } as React.CSSProperties}
>
<div className='cf-pf9__brand'>
{brandHref ? (
<a className='cf-pf9__wordmark' href={brandHref}>
{wordmark}
</a>
) : (
<p className='cf-pf9__wordmark'>{wordmark}</p>
)}
{tagline ? <p className='cf-pf9__tagline'>{tagline}</p> : null}
</div>
{columns.map((column, index) => {
const isOpen = Boolean(open[index]);
const listId = `${uid}-col-${index}`;
return (
<nav
key={`${column.title}-${index}`}
className='cf-pf9__col'
aria-label={column.title}
data-open={narrow ? String(isOpen) : undefined}
>
<h3 className='cf-pf9__col-title'>
{narrow ? (
<button
type='button'
className='cf-pf9__toggle'
aria-expanded={isOpen}
aria-controls={listId}
onClick={() => setOpen((current) => ({ ...current, [index]: !current[index] }))}
>
<span>{column.title}</span>
<ChevronDown className='cf-pf9__chev' aria-hidden size={20} strokeWidth={2.5} />
</button>
) : (
column.title
)}
</h3>
<ul id={listId} className='cf-pf9__list'>
{column.links.map((link, linkIndex) => (
<li key={`${link.label}-${linkIndex}`}>
<a className='cf-pf9__link' href={link.href}>
{link.label}
</a>
</li>
))}
</ul>
</nav>
);
})}
</div>
<div className='cf-pf9__legal'>
<div className='cf-pf9__legal-copy'>
<p className='cf-pf9__copyright'>{copyright}</p>
{legalLinks.length > 0 ? (
<ul className='cf-pf9__legal-links' aria-label={copy.legalLabel}>
{legalLinks.map((link, index) => (
<li key={`${link.label}-${index}`}>
<a className='cf-pf9__link' href={link.href}>
{link.label}
</a>
</li>
))}
</ul>
) : null}
</div>
{shownCards.length > 0 ? (
<ul className='cf-pf9__cards' aria-label={copy.paymentsLabel}>
{shownCards.map((mark) => {
const Icon = CARD_MARKS[mark];
if (!Icon) return null;
return (
<li key={mark}>
<span className='cf-pf9__card' role='img' aria-label={markLabels[mark]}>
<Icon width={44} height={28} aria-hidden />
</span>
</li>
);
})}
</ul>
) : null}
</div>
</div>
</div>
</footer>
);
}
export default PageFooter9;
type MarkIcon = React.ComponentType<{ width?: number | string; height?: number | string; 'aria-hidden'?: boolean }>;
// The flat-rounded payment set has no Apple Pay or Google Pay mark; those keys resolve to no icon and are
// filtered out of the list, exactly as before (the missing imports were undefined at runtime).
const CARD_MARKS: Partial<Record<PageFooter9CardMark, MarkIcon>> = {
visa: Visa as unknown as MarkIcon,
mastercard: Mastercard as unknown as MarkIcon,
amex: AmericanExpress as unknown as MarkIcon,
discover: Discover as unknown as MarkIcon,
paypal: PayPal as unknown as MarkIcon,
};
const DEFAULT_CARD_LABELS: Record<PageFooter9CardMark, string> = {
visa: 'Visa',
mastercard: 'Mastercard',
amex: 'American Express',
discover: 'Discover',
paypal: 'PayPal',
applepay: 'Apple Pay',
googlepay: 'Google Pay',
};
const DEFAULT_SPOTS: string[] = [truck, shield, calendar];
const DEFAULT_COPY: PageFooter9Copy = {
emailLabel: 'Your email',
placeholder: 'you@example.com',
required: 'Enter your email to join the list.',
invalid: 'Check your email. It should look like you@example.com.',
hint: 'Did you mean {email}?',
submitting: 'Sending…',
promisesLabel: 'Our promises',
legalLabel: 'Legal',
paymentsLabel: 'Payment methods we accept',
};
const DEFAULT_COLUMNS: PageFooter9Column[] = [
{
title: 'Shop',
links: [
{ label: 'All products', href: '#' },
{ label: 'New arrivals', href: '#' },
{ label: 'Gift cards', href: '#' },
],
},
{
title: 'Help',
links: [
{ label: 'Contact us', href: '#' },
{ label: 'Shipping', href: '#' },
{ label: 'Returns', href: '#' },
],
},
{
title: 'About',
links: [
{ label: 'Our story', href: '#' },
{ label: 'Journal', href: '#' },
],
},
];
// Domains a typo hint may suggest, and domains that are real and never corrected.
const SUGGEST_DOMAINS = [
'gmail.com',
'yahoo.com',
'hotmail.com',
'outlook.com',
'icloud.com',
'aol.com',
'live.com',
'msn.com',
'me.com',
'mac.com',
'ymail.com',
'comcast.net',
'protonmail.com',
];
const KNOWN_DOMAINS = SUGGEST_DOMAINS.concat([
'mail.com',
'gmx.com',
'proton.me',
'hey.com',
'fastmail.com',
'googlemail.com',
'yahoo.co.uk',
'hotmail.co.uk',
'outlook.co.uk',
'att.net',
'verizon.net',
]);
const EMAIL_PATTERN = /^[^ @]+@[^ @]+[.][^ @]{2,}$/;
function validateEmail(value: string, submitting: boolean, copy: PageFooter9Copy): string | null {
if (!value) return submitting ? copy.required : null;
return EMAIL_PATTERN.test(value) ? null : copy.invalid;
}
function suggestEmail(value: 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 < 3 || KNOWN_DOMAINS.indexOf(domain) !== -1) return null;
const hasDot = domain.indexOf('.') !== -1;
let best: string | null = null;
let bestDistance = Infinity;
for (const candidate of SUGGEST_DOMAINS) {
const target = hasDot ? candidate : candidate.split('.')[0];
const distance = editDistance(domain, target);
if (distance < bestDistance) {
best = candidate;
bestDistance = distance;
}
}
const limit = hasDot && domain.length > 8 ? 2 : 1;
if (!best || bestDistance > limit) return null;
return `${local}@${best}`;
}
// Optimal string alignment distance: a swapped pair of letters counts as one edit.
function editDistance(a: string, b: string): number {
const rows: number[][] = [];
for (let i = 0; i <= a.length; i += 1) rows[i] = [i];
for (let j = 0; j <= b.length; j += 1) rows[0][j] = j;
for (let i = 1; i <= a.length; i += 1) {
for (let j = 1; j <= b.length; j += 1) {
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
let value = Math.min(rows[i - 1][j] + 1, rows[i][j - 1] + 1, rows[i - 1][j - 1] + cost);
if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
value = Math.min(value, rows[i - 2][j - 2] + 1);
}
rows[i][j] = value;
}
}
return rows[a.length][b.length];
}
function useMedia(query: string): boolean {
const [matches, setMatches] = React.useState(false);
React.useEffect(() => {
if (typeof window === 'undefined' || !window.matchMedia) return undefined;
const media = window.matchMedia(query);
const sync = () => setMatches(media.matches);
sync();
media.addEventListener('change', sync);
return () => media.removeEventListener('change', sync);
}, [query]);
return matches;
}
function rise(index: number): React.CSSProperties {
return { animationDelay: `${Math.min(index * 0.07, 0.28).toFixed(2)}s` };
}
function fillTemplate(template: string, values: { year: string; brand: string }): string {
return template.split('{year}').join(values.year).split('{brand}').join(values.brand);
}
function renderHeadline(headline: React.ReactNode, highlight?: string): React.ReactNode {
if (typeof headline !== 'string' || !highlight) return headline;
const at = headline.indexOf(highlight);
if (at === -1) return headline;
return (
<>
{headline.slice(0, at)}
<span className='cf-pf9__mark'>{highlight}</span>
{headline.slice(at + highlight.length)}
</>
);
}
function renderHint(template: string, address: string): React.ReactNode {
const parts = template.split('{email}');
return parts.map((part, index) => (
<React.Fragment key={index}>
{part}
{index < parts.length - 1 ? <strong>{address}</strong> : null}
</React.Fragment>
));
}
const CSS = `
.cf-pf9 {
--pf9-btn: var(--button-bg, var(--cta, #d4372c));
--pf9-btn-2: var(--button-bg-2, var(--cta-2, #b52a20));
--pf9-fill: var(--accent-fill, var(--accent, #2e62c9));
--pf9-fill-ink: var(--accent-fill-ink, var(--card, #ffffff));
--pf9-sh: var(--shadow, oklch(0.22 0.03 256));
--pf9-hair: oklch(from var(--ink, #1b2333) l c h / 0.12);
--pf9-ring: var(--field-focus, var(--accent, #2e62c9));
--pf9-gutter: clamp(16px, 5vw, 48px);
display: block;
font-family: var(--font-body);
color: var(--ink, #1b2333);
background: var(--surface, #ffffff);
}
.cf-pf9, .cf-pf9 *, .cf-pf9 *::before, .cf-pf9 *::after { box-sizing: border-box; }
/* Signup band */
.cf-pf9__band {
position: relative;
background: var(--pf9-fill);
color: var(--pf9-fill-ink);
padding: clamp(48px, 7vw, 96px) var(--pf9-gutter) clamp(56px, 7.5vw, 104px);
}
.cf-pf9__band-in { max-width: 1120px; margin: 0 auto; display: grid; gap: 32px; }
.cf-pf9__shot { display: none; }
.cf-pf9__product {
display: block;
width: 100%;
max-width: 400px;
height: auto;
aspect-ratio: 1;
object-fit: contain;
object-position: center bottom;
filter: drop-shadow(0 2px 3px oklch(from var(--pf9-sh) l c h / 0.35)) drop-shadow(0 18px 18px oklch(from var(--pf9-sh) l c h / 0.28));
}
.cf-pf9__main { display: grid; gap: 32px; align-content: start; min-width: 0; }
.cf-pf9__copy { min-width: 0; }
.cf-pf9__headline {
margin: 0;
color: inherit;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: clamp(2rem, 3.6vw, 3.25rem);
line-height: 1.06;
text-wrap: balance;
}
.cf-pf9__mark {
background-image: linear-gradient(transparent 56%, oklch(from var(--pf9-fill-ink) l c h / 0.22) 56%, oklch(from var(--pf9-fill-ink) l c h / 0.22) 92%, transparent 92%);
padding: 0 0.1em;
margin: 0 -0.04em;
border-radius: 0.12em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-pf9__offer {
margin: 16px 0 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.2;
letter-spacing: -0.01em;
text-wrap: balance;
}
.cf-pf9__lead {
margin: 12px 0 0;
max-width: 44ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
font-weight: 500;
line-height: 1.4;
text-wrap: pretty;
}
.cf-pf9__ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; margin-inline-end: 0.4em; }
/* Signup form */
.cf-pf9__form { margin: 0; min-width: 0; width: 100%; container-type: inline-size; container-name: pf9-signup; }
.cf-pf9__label { display: block; margin: 0 0 12px; color: inherit; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.cf-pf9__bar {
padding: 8px;
color: var(--ink, #1b2333);
background: var(--card, #ffffff);
border: 1px solid var(--card-border, oklch(from var(--ink, #1b2333) l c h / 0.12));
border-radius: calc(var(--card-radius, var(--radius, 12px)) + 8px);
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--pf9-sh) l c h / 0.22), 0 12px 24px -8px oklch(from var(--pf9-sh) l c h / 0.32)));
}
.cf-pf9__row { display: flex; gap: 8px; align-items: stretch; }
.cf-pf9__input {
flex: 1 1 auto;
min-width: 0;
width: 100%;
min-height: 56px;
margin: 0;
padding: 0 16px;
border: 1px solid var(--field-border, color-mix(in oklch, var(--ink, #1b2333) 22%, transparent));
border-radius: var(--field-radius, var(--radius, 12px));
background: var(--field, #ffffff);
color: var(--field-ink, #1b2333);
font-family: var(--font-body);
font-size: 17px;
line-height: 1.3;
transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cf-pf9__input::placeholder { color: color-mix(in oklch, var(--field-ink, #1b2333) 65%, var(--field, #ffffff)); opacity: 1; }
.cf-pf9__input:hover { border-color: color-mix(in oklch, var(--ink, #1b2333) 38%, transparent); }
.cf-pf9__input:focus { outline: none; border-color: var(--pf9-ring); box-shadow: 0 0 0 3px oklch(from var(--pf9-ring) l c h / 0.35); }
.cf-pf9__input[aria-invalid='true'] { border-color: var(--danger, #b42318); }
.cf-pf9__input[aria-invalid='true']:focus { box-shadow: 0 0 0 3px oklch(from var(--danger, #b42318) l c h / 0.3); }
.cf-pf9__btn {
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 56px;
margin: 0;
padding: 0 24px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(oklch(from var(--pf9-btn) calc(l + 0.04) c h), oklch(from var(--pf9-btn-2) calc(l - 0.02) c h));
color: var(--button-ink, var(--cta-ink, #ffffff));
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: 1.125rem;
line-height: 1.15;
white-space: nowrap;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--pf9-btn) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--pf9-btn) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--pf9-sh) l c h / 0.3), 0 8px 16px -6px oklch(from var(--pf9-sh) l c h / 0.45));
cursor: pointer;
transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.cf-pf9__btn:hover:not(:disabled), .cf-pf9__btn[data-state='hover'] {
background: linear-gradient(oklch(from var(--pf9-btn) calc(l - 0.01) c h), oklch(from var(--pf9-btn-2) calc(l - 0.07) c h));
transform: translateY(-1px);
box-shadow: inset 0 1px 0 oklch(from var(--pf9-btn) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--pf9-btn) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--pf9-sh) l c h / 0.32), 0 12px 20px -6px oklch(from var(--pf9-sh) l c h / 0.5);
}
.cf-pf9__btn:active:not(:disabled), .cf-pf9__btn[data-state='active'] {
background: linear-gradient(oklch(from var(--pf9-btn) calc(l - 0.05) c h), oklch(from var(--pf9-btn-2) calc(l - 0.09) c h));
transform: translateY(1px);
box-shadow: inset 0 2px 3px oklch(from var(--pf9-btn) calc(l - 0.22) c h / 0.5), inset 0 -2px 0 oklch(from var(--pf9-btn) calc(l - 0.18) c h), 0 1px 2px oklch(from var(--pf9-sh) l c h / 0.3);
}
.cf-pf9__btn:focus-visible { outline: 3px solid var(--pf9-ring); outline-offset: 3px; }
.cf-pf9__btn:disabled { cursor: progress; }
.cf-pf9__msgs { display: grid; gap: 2px; padding: 8px 8px 0; }
.cf-pf9__msgs:empty { display: none; }
.cf-pf9__msgs > * { animation: cf-pf9-rise 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-pf9__error {
margin: 0;
padding: 4px 0;
color: var(--danger, #b42318);
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
text-wrap: pretty;
}
.cf-pf9__hint { margin: 0; }
.cf-pf9__hint-btn {
display: block;
width: 100%;
min-height: 44px;
margin: 0;
padding: 10px 0;
border: 0;
border-radius: 6px;
background: none;
color: var(--link, var(--accent, #2e62c9));
font-family: var(--font-body);
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
text-align: left;
text-decoration: underline;
text-decoration-color: oklch(from var(--link, var(--accent, #2e62c9)) l c h / 0.45);
text-underline-offset: 0.18em;
overflow-wrap: anywhere;
cursor: pointer;
}
.cf-pf9__hint-btn:hover { color: oklch(from var(--link, var(--accent, #2e62c9)) calc(l - 0.08) c h); text-decoration-color: currentColor; }
.cf-pf9__hint-btn:focus-visible { outline: 3px solid var(--pf9-ring); outline-offset: 2px; }
.cf-pf9__hint-btn strong { font-weight: 800; }
.cf-pf9__under { display: grid; gap: 8px; margin-top: 16px; }
.cf-pf9__alt { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.cf-pf9__alt a {
color: inherit;
text-decoration: underline;
text-decoration-thickness: 1px;
text-decoration-color: oklch(from var(--pf9-fill-ink) l c h / 0.55);
text-underline-offset: 0.2em;
border-radius: 4px;
}
.cf-pf9__alt a:hover { text-decoration-thickness: 2px; text-decoration-color: currentColor; }
.cf-pf9__alt a:focus-visible { outline: 3px solid var(--pf9-fill-ink); outline-offset: 3px; }
.cf-pf9__privacy { margin: 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.4; text-wrap: pretty; }
@container pf9-signup (max-width: 27rem) {
.cf-pf9__row { flex-direction: column; }
.cf-pf9__btn { width: 100%; white-space: normal; text-wrap: balance; }
}
@media (min-width: 720px) {
.cf-pf9__band-in[data-product] { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.cf-pf9__band-in[data-product] .cf-pf9__shot { display: flex; justify-content: center; }
.cf-pf9__band-in[data-product] .cf-pf9__form { max-width: 36rem; }
}
@media (min-width: 860px) {
.cf-pf9__band-in:not([data-product]) .cf-pf9__main { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: clamp(32px, 5vw, 72px); align-items: start; }
}
/* Store footer */
.cf-pf9__base { padding: clamp(48px, 6vw, 80px) var(--pf9-gutter) clamp(28px, 4vw, 40px); background: var(--surface, #ffffff); color: var(--ink, #1b2333); }
.cf-pf9__base-in { max-width: 1120px; margin: 0 auto; }
.cf-pf9__promises {
list-style: none;
margin: 0;
padding: 0 0 clamp(32px, 4.5vw, 56px);
display: grid;
grid-template-columns: repeat(var(--pf9-n, 3), minmax(0, 1fr));
gap: 24px clamp(16px, 3vw, 40px);
border-bottom: 1px solid var(--pf9-hair);
}
.cf-pf9__promise { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.cf-pf9__spot { flex: none; display: block; width: 60px; height: 60px; line-height: 0; }
.cf-pf9__promise-text {
margin: 0;
min-width: 0;
color: var(--muted, #4a5568);
font-size: clamp(1rem, 1.25vw, 1.0625rem);
line-height: 1.5;
text-wrap: pretty;
}
.cf-pf9__promise-text strong { color: var(--ink, #1b2333); font-weight: 800; }
@media (min-width: 720px) and (max-width: 959px) {
.cf-pf9__promise { flex-direction: column; gap: 12px; }
}
.cf-pf9__nav {
display: grid;
grid-template-columns: minmax(0, 1.5fr) repeat(var(--pf9-cols, 3), minmax(0, 1fr));
gap: clamp(24px, 4vw, 48px);
padding: clamp(32px, 4.5vw, 56px) 0;
}
.cf-pf9__brand { min-width: 0; }
.cf-pf9__wordmark {
display: inline-block;
margin: 0;
color: var(--ink, #1b2333);
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
text-decoration: none;
border-radius: 4px;
}
a.cf-pf9__wordmark:focus-visible { outline: 3px solid var(--pf9-ring); outline-offset: 3px; }
.cf-pf9__logo { display: block; height: 40px; width: auto; max-width: 200px; object-fit: contain; }
.cf-pf9__tagline { margin: 12px 0 0; max-width: 34ch; color: var(--muted, #4a5568); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.cf-pf9__col { min-width: 0; }
.cf-pf9__col-title {
margin: 0;
color: var(--ink, #1b2333);
font-family: var(--font-body);
font-size: 0.875rem;
font-weight: 800;
letter-spacing: 0.08em;
line-height: 1.2;
text-transform: uppercase;
}
.cf-pf9__list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.cf-pf9__link {
color: var(--muted, #4a5568);
font-size: 1rem;
line-height: 1.4;
text-decoration: none;
text-underline-offset: 0.22em;
border-radius: 4px;
transition: color 0.16s ease;
}
.cf-pf9__link:hover { color: var(--ink, #1b2333); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--link, var(--accent, #2e62c9)); }
.cf-pf9__link:focus-visible { outline: 3px solid var(--pf9-ring); outline-offset: 3px; color: var(--ink, #1b2333); }
.cf-pf9__toggle {
display: flex;
width: 100%;
min-height: 56px;
align-items: center;
justify-content: space-between;
gap: 16px;
margin: 0;
padding: 0;
border: 0;
border-radius: 6px;
background: none;
color: inherit;
font: inherit;
letter-spacing: inherit;
text-transform: inherit;
text-align: left;
cursor: pointer;
}
.cf-pf9__toggle:hover { color: var(--link, var(--accent, #2e62c9)); }
.cf-pf9__toggle:focus-visible { outline: 3px solid var(--pf9-ring); outline-offset: 2px; }
.cf-pf9__chev { flex: none; transition: transform 0.16s ease; }
.cf-pf9__col[data-open='true'] .cf-pf9__chev { transform: rotate(180deg); }
.cf-pf9__legal {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 16px 32px;
padding-top: 24px;
border-top: 1px solid var(--pf9-hair);
}
.cf-pf9__legal-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-width: 0; }
.cf-pf9__copyright { margin: 0; color: var(--muted, #4a5568); font-size: 0.9375rem; line-height: 1.4; }
.cf-pf9__legal-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.cf-pf9__legal-links .cf-pf9__link { font-size: 0.9375rem; }
.cf-pf9__cards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-pf9__card { display: block; line-height: 0; filter: drop-shadow(0 1px 1px oklch(from var(--pf9-sh) l c h / 0.22)); }
.cf-pf9__card svg { display: block; width: 44px; height: auto; }
@media (max-width: 719px) {
.cf-pf9__promises { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding-bottom: 32px; }
.cf-pf9__promise { flex-direction: column; gap: 12px; }
.cf-pf9__promise:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; gap: 16px; }
.cf-pf9__promise-text { font-size: 1rem; }
.cf-pf9__nav { grid-template-columns: 1fr; gap: 0; padding: 32px 0; }
.cf-pf9__brand { padding-bottom: 24px; }
.cf-pf9__col { border-top: 1px solid var(--pf9-hair); }
.cf-pf9__col:last-child { border-bottom: 1px solid var(--pf9-hair); }
.cf-pf9__col[data-open] .cf-pf9__list { margin: 0; padding: 0 0 16px; gap: 0; }
.cf-pf9__col[data-open='false'] .cf-pf9__list { display: none; }
.cf-pf9__col[data-open] .cf-pf9__link { display: flex; align-items: center; min-height: 44px; }
.cf-pf9__legal { flex-direction: column-reverse; align-items: flex-start; gap: 16px; padding-top: 0; border-top: 0; }
}
/* Motion */
@keyframes cf-pf9-rise { from { opacity: 0.82; transform: translateY(8px); } }
@keyframes cf-pf9-spin { to { transform: rotate(360deg); } }
.cf-pf9 [data-rise] { animation: cf-pf9-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-pf9__spin { animation: cf-pf9-spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) {
.cf-pf9 [data-rise], .cf-pf9 .cf-pf9__msgs > *, .cf-pf9 .cf-pf9__spin { animation: none; }
.cf-pf9 .cf-pf9__btn, .cf-pf9 .cf-pf9__input, .cf-pf9 .cf-pf9__link, .cf-pf9 .cf-pf9__chev { transition: none; }
.cf-pf9 .cf-pf9__btn:hover:not(:disabled), .cf-pf9 .cf-pf9__btn[data-state='hover'] { transform: none; }
.cf-pf9 .cf-pf9__btn:active:not(:disabled), .cf-pf9 .cf-pf9__btn[data-state='active'] { transform: none; }
}
`;
pieces/content/page-footer-9/specimen.tsx 80 lines
import __studioImageb5dae074 from "../assets/891bd9a118b7929b.webp";
// Specimen: Kettle & Crumb, a fictional small-batch coffee store, closing every page with its Roast List signup.
import * as React from 'react';
import { PageFooter9 } from '../page-footer-9';
import type { PageFooter9State } from '../page-footer-9';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
import truck from '../../fx/spots/truck';
import shield from '../../fx/spots/shield';
import calendar from '../../fx/spots/calendar';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
export default function PageFooter9Specimen({ state = 'default' }: { state?: PageFooter9State }) {
return (
<PageFooter9
state={state}
headline='Not ready to order? Get on the Roast List.'
highlight='the Roast List'
offer='Take 15% off your first bag when you join.'
lead='One email each Monday: what we roasted, how to brew it and when it ships.'
productImage={slot(
'product',
__studioImageb5dae074,
)}
productImageAlt='Kettle & Crumb coffee bag beside a scatter of roasted beans'
label='Send My 15% Code'
privacy={defaults.sample.registration.privacy}
secondaryLabel='or keep browsing the coffee'
secondaryHref='#shop'
defaultEmail={state === 'error' ? 'dana@gmial' : undefined}
onSubmit={() => undefined}
promises={[
{ lead: 'Free shipping over $35.', detail: 'Every bag leaves within a day of roasting.', spot: truck },
{ lead: 'The fresh-or-free promise.', detail: `Not loving a bag? We'll replace it or refund you.`, spot: shield },
{ lead: 'Subscribe on your terms.', detail: 'Skip, swap or pause any delivery from your account.', spot: calendar },
]}
brandName='Kettle & Crumb'
brandHref='/'
tagline='Small-batch coffee from a two-roaster shop. Roasted every Monday.'
columns={[
{
title: 'Shop',
links: [
{ label: 'Whole bean coffee', href: '#shop' },
{ label: 'Ground coffee', href: '#shop' },
{ label: 'Subscriptions', href: '#subscribe' },
{ label: 'Brew gear', href: '#gear' },
{ label: 'Gift cards', href: '#gift' },
],
},
{
title: 'Help',
links: [
{ label: 'Track your order', href: '#track' },
{ label: 'Shipping', href: '#shipping' },
{ label: 'Returns & refunds', href: '#returns' },
{ label: 'Contact us', href: '#contact' },
],
},
{
title: 'About',
links: [
{ label: 'Our roastery', href: '#roastery' },
{ label: 'How we source', href: '#sourcing' },
{ label: 'Wholesale', href: '#wholesale' },
{ label: 'Brew journal', href: '#journal' },
],
},
]}
legalLinks={[
{ label: 'Privacy', href: '#privacy' },
{ label: 'Terms', href: '#terms' },
{ label: 'Accessibility', href: '#accessibility' },
]}
cards={['visa', 'mastercard', 'amex', 'discover', 'paypal']}
year={2026}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalPageFooter9 |
React.ReactNode |
|
highlight OptionalPageFooter9 |
string |
|
offer OptionalPageFooter9 |
string |
|
lead OptionalPageFooter9 |
string |
|
productImage OptionalPageFooter9 |
string |
|
productImageAlt OptionalPageFooter9 |
string |
|
label OptionalPageFooter9 |
string |
|
privacy OptionalPageFooter9 |
string |
|
secondaryLabel OptionalPageFooter9 |
string |
|
secondaryHref OptionalPageFooter9 |
string |
|
defaultEmail OptionalPageFooter9 |
string |
|
onSubmit OptionalPageFooter9 |
(values: { email: string }) => void | Promise<unknown> |
|
promises OptionalPageFooter9 |
PageFooter9Promise[] |
|
brandName OptionalPageFooter9 |
string |
|
logoImage OptionalPageFooter9 |
string |
|
brandHref OptionalPageFooter9 |
string |
|
tagline OptionalPageFooter9 |
string |
|
columns OptionalPageFooter9 |
PageFooter9Column[] |
|
legalLinks OptionalPageFooter9 |
PageFooter9Link[] |
|
cards OptionalPageFooter9 |
PageFooter9CardMark[] |
|
cardLabels OptionalPageFooter9 |
Partial<Record<PageFooter9CardMark, string>> |
|
copyrightTemplate OptionalPageFooter9 |
string |
|
year OptionalPageFooter9 |
number | string |
|
copy OptionalPageFooter9 |
Partial<PageFooter9Copy> |
|
state OptionalPageFooter9 |
PageFooter9State |
|
className OptionalPageFooter9 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
75ba15955a7397f6.webp
image/webp · 18.6 KB
-
7d6f1c81c93d8f71.webp
image/webp · 18.2 KB
-
891bd9a118b7929b.webp
image/webp · 117 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB