Not Found 5
404 block for sites full of old links: reads the dead path, fuzzy-matches it against the live pages and puts the
Use it in a prompt
Use content/not-found-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/not-found-5.tsx. - Import it and pass your copy and images (Props tab):
import { NotFound5 } from "@/components/funneldna/content/not-found-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/not-found-5/component.tsx 817 lines
// layout: spotlight-row
// 404 block for sites full of old links: reads the dead path, fuzzy-matches it against the live pages and puts the
// best match centre stage (‘Did you mean /tickets?’ plus its button), runner-ups beneath, and this year’s event card
// when the old link names a past year. The visitor gets to the right page in one click.
import * as React from 'react';
import { CalendarDays, FileText, Keyboard, MapPin } from 'lucide-react';
import { FX_HOST, Spotlight } from '../fx/fx';
export type NotFound5Page = {
label: string;
href: string;
/** One short line under the label on a link tile. */
detail?: string;
/** Extra words the matcher uses (never shown). */
keywords?: string;
};
export type NotFound5Event = {
/** Band heading above the card, e.g. ‘Heading to GrowthCamp 2027?’. Falls back to eventLabel. */
label?: string;
title: string;
date: string;
city: string;
/** One short line under the facts. */
detail?: string;
/** Falls back to eventActionLabel. */
actionLabel?: string;
href?: string;
/** Slot scene: a photo of the event. */
image?: string;
imageAlt?: string;
/** This edition’s year. A path naming an earlier year shows the card. Defaults to the current year. */
year?: number | string;
};
export type NotFound5State = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export type NotFound5Props = {
/** The missing path. Read from the browser address when omitted. */
path?: string;
/** Every live page the matcher can suggest. */
pages?: NotFound5Page[];
/** Fallback pages when nothing matches (and fillers for weak runner-ups). Defaults to the first four pages. */
popular?: NotFound5Page[];
/** This year’s event; the card is hidden when omitted. */
event?: NotFound5Event;
/** ‘past-year’ shows the card only when the path names an earlier year. */
showEvent?: 'past-year' | 'always';
/** Lowest score (0 to 1) that still counts as a match. */
minScore?: number;
runnerCount?: number;
/** Runner-ups scoring under this are replaced by popular pages. */
runnerFloor?: number;
/** How many popular tiles the no-match fallback shows under its button. */
popularCount?: number;
askLabel?: string;
typedLabel?: string;
/** One sentence per line; a single-word line becomes the emphasis line. */
lines?: string[];
/** Template: {year} is replaced. Added when the path names a past year. */
pastYearLine?: string;
/** Template: {label} and {href} are replaced. */
actionLabel?: string;
/** Template: {label} and {href} are replaced. Hidden when empty. */
actionNote?: string;
runnerHeading?: string;
noMatchHeadline?: string;
noMatchLines?: string[];
popularHeading?: string;
eventLabel?: string;
eventActionLabel?: string;
/** Screen-reader names of the event facts. */
dateLabel?: string;
cityLabel?: string;
/** Any page link click (main button, runner-ups, popular). Call preventDefault to route it yourself. */
onAction?: (page: NotFound5Page, event: React.MouseEvent<HTMLAnchorElement>) => void;
/** The event card’s ticket button. */
onEventAction?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
/** Preview states; ‘error’ shows the no-match fallback. */
state?: NotFound5State;
className?: string;
};
const DEFAULT_PAGES: NotFound5Page[] = [
{ label: 'Tickets', href: '/tickets', detail: 'Passes and pricing', keywords: 'register registration buy passes pricing' },
{ label: 'Schedule', href: '/schedule', detail: 'Every session, day by day', keywords: 'agenda program sessions timetable' },
{ label: 'Speakers', href: '/speakers', detail: 'Who’s on stage', keywords: 'lineup talks presenters' },
{ label: 'Venue & travel', href: '/venue', detail: 'Location, hotels and getting there', keywords: 'hotel location travel map directions' },
{ label: 'Home', href: '/', detail: 'Start from the top', keywords: 'start main index' },
{ label: 'Contact', href: '/contact', detail: 'Questions about your ticket', keywords: 'help support email refund' },
];
const DEFAULT_LINES = ['Found.', 'The page you wanted lives at a new address.'];
const DEFAULT_NO_MATCH = ['That address doesn’t match any page here.', 'Start with one of these.'];
const useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
export function NotFound5(props: NotFound5Props) {
const {
path,
pages = DEFAULT_PAGES,
popular,
event,
showEvent = 'past-year',
minScore = 0.55,
runnerCount = 2,
runnerFloor = 0.34,
popularCount = 3,
askLabel = 'Did you mean',
typedLabel = 'You typed',
lines = DEFAULT_LINES,
pastYearLine = 'That link is from {year}.',
actionLabel = 'Take me to {label}',
actionNote = 'Goes straight to {href}',
runnerHeading = 'Not it? Try one of these',
noMatchHeadline = 'That page has moved on.',
noMatchLines = DEFAULT_NO_MATCH,
popularHeading = 'Or jump straight to a popular page',
eventLabel = 'Looking for this year’s event?',
eventActionLabel = 'Get my ticket',
dateLabel = 'Date',
cityLabel = 'City',
onAction,
onEventAction,
state = 'default',
className,
} = props;
const uid = React.useId();
const headingId = `${uid}-h`;
const moreId = `${uid}-m`;
const sideId = `${uid}-s`;
const eventId = `${uid}-e`;
const [livePath, setLivePath] = React.useState<string | undefined>(undefined);
useIsoLayoutEffect(() => {
if (path === undefined) setLivePath(window.location.pathname);
}, [path]);
const typed = normalizePath(path ?? livePath ?? '');
const ranked = React.useMemo(() => rankPages(typed, pages), [typed, pages]);
const pool = popular && popular.length > 0 ? popular : pages.slice(0, 4);
const disabled = state === 'disabled';
const forced = state === 'hover' ? 'is-hover' : state === 'active' ? 'is-active' : undefined;
const top = ranked[0];
const best = state !== 'error' && top && top.score >= minScore ? top.page : null;
const primary = best ?? pool[0] ?? null;
const tiles = best
? pickRunners(ranked, best, pool, runnerCount, runnerFloor)
: pool.filter((page) => !primary || page.href !== primary.href).slice(0, popularCount);
const year = detectYear(typed);
const eventYear = event && event.year != null ? Number(event.year) : NaN;
const thisYear = Number.isNaN(eventYear) ? new Date().getFullYear() : eventYear;
const pastYear = year !== null && year < thisYear;
const showCard = Boolean(event) && (showEvent === 'always' || pastYear);
const baseLines = best ? lines : noMatchLines;
const yearText = pastYear && pastYearLine ? fill(pastYearLine, { year: String(year) }) : '';
let shownLines = baseLines;
if (yearText) {
const at = baseLines.findIndex((line) => line.trim().includes(' '));
const index = at < 0 ? baseLines.length : at;
shownLines = [...baseLines.slice(0, index), yearText, ...baseLines.slice(index)];
}
const runs = best && typed ? diffRuns(typed, normalizePath(best.href)) : [];
const bestShown = best ? (best.href === '/' ? best.label : best.href) : '';
const showTrail = Boolean(typed) && typed !== '/';
const go = (page: NotFound5Page) => (e: React.MouseEvent<HTMLAnchorElement>) => {
if (disabled) {
e.preventDefault();
return;
}
onAction?.(page, e);
};
const goEvent = (e: React.MouseEvent<HTMLAnchorElement>) => {
if (disabled) {
e.preventDefault();
return;
}
onEventAction?.(e);
};
const hasTiles = tiles.length > 0;
const showRow = hasTiles || showCard;
return (
<section className={cx('cf-nf5', className)} style={FX_HOST} aria-labelledby={headingId}>
<style>{CSS}</style>
<Spotlight />
<div className='cf-nf5-in'>
<div className='cf-nf5-hero'>
<h1 id={headingId} className='cf-nf5-h cf-nf5-rise'>
{best ? (
<>
<span className='cf-nf5-ask'>{askLabel} </span>
<span className='cf-nf5-path'>{bestShown}?</span>
</>
) : (
noMatchHeadline
)}
</h1>
{showTrail ? (
<>
<p className='cf-nf5-trail cf-nf5-rise' style={cssVars({ '--i': 1 })} aria-hidden='true'>
<Keyboard className='cf-nf5-ic-inline' size={18} strokeWidth={2.5} aria-hidden='true' />
<span className='cf-nf5-trail-lbl'>{typedLabel}</span>{' '}
{best ? (
<span className='cf-nf5-diff' key={`${typed}|${best.href}`}>
{renderRuns(runs)}
</span>
) : (
<span className='cf-nf5-diff cf-nf5-eq'>{typed}</span>
)}
</p>
<p className='cf-nf5-sr'>
{typedLabel} {typed}
</p>
</>
) : null}
{shownLines.length > 0 ? (
<div className='cf-nf5-lines cf-nf5-rise' style={cssVars({ '--i': 2 })}>
{shownLines.map((line, i) => (
<p key={`${i}-${line}`} className={cx('cf-nf5-line', !line.trim().includes(' ') && 'is-word')}>
{line}
</p>
))}
</div>
) : null}
{primary ? (
<div className='cf-nf5-act cf-nf5-rise' style={cssVars({ '--i': 3 })}>
<a
className={cx('cf-nf5-cta', forced)}
href={disabled ? undefined : primary.href}
aria-disabled={disabled || undefined}
onClick={go(primary)}
>
{fill(actionLabel, { label: primary.label, href: primary.href })}
</a>
{actionNote ? (
<p className='cf-nf5-note'>{fill(actionNote, { label: primary.label, href: primary.href })}</p>
) : null}
</div>
) : null}
</div>
{showRow ? (
<div className={cx('cf-nf5-row', showCard && 'has-event', !showCard && 'no-event', !hasTiles && 'no-links')}>
{hasTiles ? (
<nav className='cf-nf5-more' aria-labelledby={moreId}>
<h2 id={moreId} className='cf-nf5-sub'>
{best ? runnerHeading : popularHeading}
</h2>
<ul className='cf-nf5-tiles'>
{tiles.map((page, i) => (
<li key={page.href} className='cf-nf5-rise' style={cssVars({ '--i': i + 4 })}>
<a
className={cx('cf-nf5-tile', i === 0 && forced)}
href={disabled ? undefined : page.href}
aria-disabled={disabled || undefined}
onClick={go(page)}
>
<span className='cf-nf5-disc' aria-hidden='true'>
<FileText size={20} strokeWidth={2.5} />
</span>
<span className='cf-nf5-tile-text'>
<span className='cf-nf5-tile-label'>{page.label}</span>
<span className='cf-nf5-tile-path'>{page.href}</span>
{page.detail ? <span className='cf-nf5-tile-detail'>{page.detail}</span> : null}
</span>
</a>
</li>
))}
</ul>
</nav>
) : null}
{showCard && event ? (
<div className='cf-nf5-side cf-nf5-rise' style={cssVars({ '--i': 5 })}>
<h2 id={sideId} className='cf-nf5-sub'>
{event.label ?? eventLabel}
</h2>
<article className={cx('cf-nf5-event', event.image && 'has-img')} aria-labelledby={eventId}>
{event.image ? (
<img
className='cf-nf5-event-img'
src={event.image}
alt={event.imageAlt ?? ''}
width={640}
height={400}
decoding='async'
/>
) : null}
<div className='cf-nf5-event-body'>
<h3 id={eventId} className='cf-nf5-event-h'>
{event.title}
</h3>
<dl className='cf-nf5-facts'>
<div>
<dt>
<CalendarDays size={18} strokeWidth={2.5} aria-hidden='true' />
<span className='cf-nf5-sr'>{dateLabel}</span>
</dt>
<dd>{event.date}</dd>
</div>
<div>
<dt>
<MapPin size={18} strokeWidth={2.5} aria-hidden='true' />
<span className='cf-nf5-sr'>{cityLabel}</span>
</dt>
<dd>{event.city}</dd>
</div>
</dl>
{event.detail ? <p className='cf-nf5-event-detail'>{event.detail}</p> : null}
<a
className={cx('cf-nf5-cta', 'cf-nf5-cta--card')}
href={disabled ? undefined : event.href}
aria-disabled={disabled || undefined}
onClick={goEvent}
>
{event.actionLabel ?? eventActionLabel}
</a>
</div>
</article>
</div>
) : null}
</div>
) : null}
</div>
</section>
);
}
export default NotFound5;
type Ranked = { page: NotFound5Page; score: number };
type Run = { kind: 'eq' | 'del' | 'ins'; text: string };
function cx(...parts: Array<string | false | null | undefined>): string {
return parts.filter(Boolean).join(' ');
}
function cssVars(vars: Record<string, string | number>): React.CSSProperties {
return vars as unknown as React.CSSProperties;
}
function fill(template: string, values: Record<string, string>): string {
return template.replace(/[{]([a-z]+)[}]/gi, (whole: string, key: string) => (key in values ? values[key] : whole));
}
function normalizePath(raw: string): string {
let p = raw.trim();
if (!p) return '';
p = p.replace(/^[a-z][a-z0-9+.-]*:[/][/][^/]*/i, '');
p = p.split(/[?#]/)[0];
try {
p = decodeURIComponent(p);
} catch {
// keep the raw path when it is not valid percent-encoding
}
p = p.toLowerCase().replace(/[/]{2,}/g, '/');
p = p.replace(/[/]index([.][a-z0-9]+)?$/, '/').replace(/[.](html?|php|aspx?)$/, '');
if (!p.startsWith('/')) p = '/' + p;
if (p.length > 1) p = p.replace(/[/]+$/, '') || '/';
return p.slice(0, 120);
}
function tokens(text: string): string[] {
return text
.toLowerCase()
.split(/[^a-z0-9]+/)
.filter((t) => t.length >= 2 && !/^(19|20)[0-9]{2}$/.test(t));
}
function detectYear(p: string): number | null {
const m = p.match(/(?:^|[^0-9])((?:19|20)[0-9]{2})(?![0-9])/);
return m ? Number(m[1]) : null;
}
function lev(a: string, b: string): number {
if (a === b) return 0;
if (!a.length) return b.length;
if (!b.length) return a.length;
let prev: number[] = Array.from({ length: b.length + 1 }, (_, j) => j);
for (let i = 1; i <= a.length; i++) {
const cur: number[] = [i];
for (let j = 1; j <= b.length; j++) {
cur[j] = Math.min(prev[j] + 1, cur[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
}
prev = cur;
}
return prev[b.length];
}
function sim(a: string, b: string): number {
if (a === b) return 1;
const score = 1 - lev(a, b) / Math.max(a.length, b.length);
const shorter = Math.min(a.length, b.length);
if (shorter >= 3 && (a.startsWith(b) || b.startsWith(a))) return Math.max(score, 0.88);
return score;
}
function rankPages(typed: string, pages: NotFound5Page[]): Ranked[] {
const want = tokens(typed);
if (!want.length) return [];
const joined = want.join('');
return pages
.map((page) => {
const own = tokens(normalizePath(page.href));
const named = tokens(page.label);
const extra = tokens(page.keywords ?? '');
const head = own.length ? own : named;
const bestFor = (t: string) =>
Math.max(0, ...own.map((c) => sim(t, c)), ...named.map((c) => sim(t, c)), ...extra.map((c) => sim(t, c) * 0.9));
const reach = want.reduce((sum, t) => sum + bestFor(t), 0) / want.length;
const fit = head.length
? head.reduce((sum, c) => sum + Math.max(0, ...want.map((t) => sim(t, c))), 0) / head.length
: 0;
const whole = own.length ? sim(joined, own.join('')) : 0;
return { page, score: Math.max(reach * (0.8 + 0.2 * fit), whole) };
})
.sort((x, y) => y.score - x.score);
}
function pickRunners(
ranked: Ranked[],
best: NotFound5Page,
pool: NotFound5Page[],
count: number,
floor: number,
): NotFound5Page[] {
const out: NotFound5Page[] = [];
const taken = new Set<string>([best.href]);
for (const r of ranked) {
if (out.length >= count) break;
if (r.score < floor || taken.has(r.page.href)) continue;
out.push(r.page);
taken.add(r.page.href);
}
for (const page of pool) {
if (out.length >= count) break;
if (taken.has(page.href)) continue;
out.push(page);
taken.add(page.href);
}
return out;
}
function diffRuns(from: string, to: string): Run[] {
const a = from.slice(0, 80);
const b = to.slice(0, 80);
const m = a.length;
const n = b.length;
const L: number[][] = Array.from({ length: m + 1 }, () => new Array<number>(n + 1).fill(0));
for (let i = m - 1; i >= 0; i--) {
for (let j = n - 1; j >= 0; j--) {
L[i][j] = a[i] === b[j] ? L[i + 1][j + 1] + 1 : Math.max(L[i + 1][j], L[i][j + 1]);
}
}
const runs: Run[] = [];
const push = (kind: Run['kind'], ch: string) => {
const last = runs[runs.length - 1];
if (last && last.kind === kind) last.text += ch;
else runs.push({ kind, text: ch });
};
let i = 0;
let j = 0;
while (i < m && j < n) {
if (a[i] === b[j]) {
push('eq', a[i]);
i++;
j++;
} else if (L[i + 1][j] >= L[i][j + 1]) {
push('del', a[i]);
i++;
} else {
push('ins', b[j]);
j++;
}
}
while (i < m) push('del', a[i++]);
while (j < n) push('ins', b[j++]);
return runs;
}
function renderRuns(runs: Run[]): React.ReactNode[] {
let step = 0;
return runs.map((run, i) => {
if (run.kind === 'eq') {
return (
<span key={i} className='cf-nf5-eq'>
{run.text}
</span>
);
}
const delay = Math.min(0.32 + step * 0.1, 0.9);
step += 1;
return (
<span
key={i}
className={run.kind === 'del' ? 'cf-nf5-del' : 'cf-nf5-ins'}
style={cssVars({ '--d': `${delay.toFixed(2)}s` })}
>
{run.text}
</span>
);
});
}
const CSS = `
.cf-nf5 {
--nf5-ink: var(--band-ink, #ffffff);
--nf5-soft: color-mix(in oklch, var(--band-ink, #ffffff) 84%, var(--band, #1b2c4f));
--nf5-quiet: color-mix(in oklch, var(--band-ink, #ffffff) 70%, var(--band, #1b2c4f));
--nf5-veil: oklch(from var(--band-ink, #ffffff) l c h / 0.07);
--nf5-veil-2: oklch(from var(--band-ink, #ffffff) l c h / 0.13);
--nf5-veil-3: oklch(from var(--band-ink, #ffffff) l c h / 0.18);
--nf5-line: oklch(from var(--band-ink, #ffffff) l c h / 0.16);
--nf5-line-2: oklch(from var(--band-ink, #ffffff) l c h / 0.34);
position: relative;
isolation: isolate;
overflow: hidden;
background: var(--band, #1b2c4f);
color: var(--nf5-ink);
font-family: var(--font-body, system-ui, sans-serif);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
}
.cf-nf5 *, .cf-nf5 *::before, .cf-nf5 *::after { box-sizing: border-box; }
.cf-nf5 .cf-nf5-sr {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cf-nf5 .cf-nf5-in { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.cf-nf5 .cf-nf5-hero {
position: relative;
max-width: 52rem; margin: 0 auto;
display: flex; flex-direction: column; align-items: center; text-align: center;
}
.cf-nf5 .cf-nf5-h {
margin: 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
font-size: clamp(2.5rem, 5.4vw, 4.875rem);
line-height: 1.04;
text-wrap: balance;
color: var(--nf5-ink);
}
.cf-nf5 .cf-nf5-ask { color: var(--nf5-soft); }
.cf-nf5 .cf-nf5-path { color: var(--nf5-ink); overflow-wrap: anywhere; }
.cf-nf5 .cf-nf5-trail {
display: block;
width: fit-content;
max-width: 100%;
margin: clamp(14px, 1.6vw, 22px) auto 0;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
font-weight: 500;
color: var(--nf5-quiet);
text-wrap: pretty;
overflow-wrap: anywhere;
}
.cf-nf5 .cf-nf5-ic-inline { display: inline-block; vertical-align: -0.15em; margin-inline-end: 0.4em; }
.cf-nf5 .cf-nf5-trail-lbl { font-weight: 600; }
.cf-nf5 .cf-nf5-diff { font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.cf-nf5 .cf-nf5-eq { color: var(--nf5-quiet); }
.cf-nf5 .cf-nf5-del { position: relative; color: var(--nf5-quiet); }
.cf-nf5 .cf-nf5-del::after {
content: '';
position: absolute; left: -2px; right: -2px; top: 54%;
height: 2px; border-radius: 2px;
background: currentColor;
transform-origin: left center;
animation: cf-nf5-strike 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both;
animation-delay: var(--d, 0.32s);
}
.cf-nf5 .cf-nf5-ins {
display: inline-block;
color: var(--nf5-ink);
font-weight: 800;
animation: cf-nf5-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
animation-delay: var(--d, 0.42s);
}
.cf-nf5 .cf-nf5-lines { margin-top: 24px; display: grid; gap: 8px; justify-items: center; }
.cf-nf5 .cf-nf5-line {
margin: 0; max-width: 40rem;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4; font-weight: 500;
color: var(--nf5-soft);
text-wrap: pretty;
}
.cf-nf5 .cf-nf5-line.is-word {
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--nf5-ink);
}
.cf-nf5 .cf-nf5-act { margin-top: 32px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.cf-nf5 .cf-nf5-cta {
--nf5-b: var(--button-bg, var(--cta, #d4351c));
--nf5-b2: var(--button-bg-2, var(--cta-2, #b32b15));
--nf5-sh: var(--shadow, oklch(0.22 0.03 260));
position: relative;
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
min-height: 72px; max-width: 100%;
padding: 12px 32px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(180deg, oklch(from var(--nf5-b) calc(l + 0.04) c h), oklch(from var(--nf5-b2) calc(l - 0.02) c h));
color: var(--button-ink, var(--cta-ink, #ffffff));
font-family: var(--button-font, var(--font-display, inherit));
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;
letter-spacing: -0.005em;
text-align: center;
text-decoration: none;
text-wrap: balance;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--nf5-b) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--nf5-b) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--nf5-sh) l c h / 0.4), 0 8px 16px -6px oklch(from var(--nf5-sh) l c h / 0.6));
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-nf5 .cf-nf5-cta:hover, .cf-nf5 .cf-nf5-cta.is-hover {
background: linear-gradient(180deg, oklch(from var(--nf5-b) calc(l - 0.01) c h), oklch(from var(--nf5-b2) calc(l - 0.07) c h));
transform: translateY(-1px);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--nf5-b) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--nf5-b) calc(l - 0.18) c h), 0 1px 2px oklch(from var(--nf5-sh) l c h / 0.45), 0 12px 20px -8px oklch(from var(--nf5-sh) l c h / 0.7));
}
.cf-nf5 .cf-nf5-cta:active, .cf-nf5 .cf-nf5-cta.is-active {
background: linear-gradient(180deg, oklch(from var(--nf5-b) calc(l - 0.04) c h), oklch(from var(--nf5-b2) calc(l - 0.09) c h));
transform: translateY(1px);
box-shadow: var(--button-shadow, inset 0 2px 4px oklch(from var(--nf5-b) calc(l - 0.22) c h / 0.5), inset 0 -2px 0 oklch(from var(--nf5-b) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--nf5-sh) l c h / 0.4));
}
.cf-nf5 .cf-nf5-cta:focus-visible { outline: 3px solid var(--nf5-ink); outline-offset: 4px; }
.cf-nf5 .cf-nf5-cta[aria-disabled='true'], .cf-nf5 .cf-nf5-cta[aria-disabled='true']:hover, .cf-nf5 .cf-nf5-cta[aria-disabled='true']:active {
background: var(--button-2-bg, var(--secondary, #e8ebf1));
color: var(--button-2-ink, var(--secondary-ink, #1a2233));
box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 2px oklch(0.22 0.03 260 / 0.2)));
text-shadow: none;
transform: none;
cursor: not-allowed;
}
.cf-nf5 .cf-nf5-note {
margin: 12px 0 0;
font-size: 0.9375rem; line-height: 1.4; font-weight: 600;
color: var(--nf5-quiet);
overflow-wrap: anywhere;
text-wrap: pretty;
}
.cf-nf5 .cf-nf5-row {
margin-top: clamp(48px, 6vw, 72px);
display: grid; gap: clamp(24px, 3vw, 32px); align-items: start;
}
.cf-nf5 .cf-nf5-row { grid-template-columns: minmax(0, 1fr); }
.cf-nf5 .cf-nf5-row.has-event { max-width: 60rem; margin-inline: auto; gap: clamp(40px, 5vw, 56px); }
.cf-nf5 .cf-nf5-row.no-event { max-width: 52rem; margin-inline: auto; }
.cf-nf5 .cf-nf5-row.has-event.no-links { max-width: 30rem; }
.cf-nf5 .cf-nf5-more, .cf-nf5 .cf-nf5-side { min-width: 0; }
.cf-nf5 .cf-nf5-sub {
margin: 0 0 16px;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.3;
letter-spacing: -0.005em;
color: var(--nf5-ink);
text-wrap: balance;
}
.cf-nf5 .cf-nf5-tiles {
list-style: none; margin: 0; padding: 0;
display: grid; gap: 16px;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.cf-nf5 .cf-nf5-tiles > li { display: flex; min-width: 0; }
.cf-nf5 .cf-nf5-tile {
flex: 1; min-width: 0; min-height: 44px;
display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; align-items: start;
padding: 20px;
border-radius: var(--card-radius, var(--radius, 14px));
background: var(--nf5-veil);
border: 1px solid var(--nf5-line);
color: var(--nf5-ink);
text-decoration: none;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.cf-nf5 .cf-nf5-tile:hover, .cf-nf5 .cf-nf5-tile.is-hover {
background: var(--nf5-veil-2);
border-color: var(--nf5-line-2);
transform: translateY(-2px);
}
.cf-nf5 .cf-nf5-tile:active, .cf-nf5 .cf-nf5-tile.is-active {
background: var(--nf5-veil-3);
border-color: var(--nf5-line-2);
transform: translateY(0);
}
.cf-nf5 .cf-nf5-tile:focus-visible { outline: 3px solid var(--nf5-ink); outline-offset: 3px; }
.cf-nf5 .cf-nf5-tile[aria-disabled='true'], .cf-nf5 .cf-nf5-tile[aria-disabled='true']:hover {
background: transparent;
border-color: var(--nf5-line);
transform: none;
cursor: not-allowed;
}
.cf-nf5 .cf-nf5-tile[aria-disabled='true'] .cf-nf5-tile-label { color: var(--nf5-soft); }
.cf-nf5 .cf-nf5-disc {
width: 40px; height: 40px; border-radius: 999px;
display: grid; place-items: center;
background: var(--nf5-veil-2);
color: var(--nf5-ink);
}
.cf-nf5 .cf-nf5-tile-text { display: grid; gap: 4px; min-width: 0; }
.cf-nf5 .cf-nf5-tile-label {
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--nf5-ink);
overflow-wrap: anywhere;
text-wrap: balance;
}
.cf-nf5 .cf-nf5-tile-path {
font-size: 0.9375rem; line-height: 1.4; font-weight: 700;
color: var(--nf5-quiet);
font-variant-numeric: tabular-nums;
overflow-wrap: anywhere;
}
.cf-nf5 .cf-nf5-tile-detail {
margin-top: 4px;
font-size: 0.9375rem; line-height: 1.4; font-weight: 500;
color: var(--nf5-soft);
text-wrap: pretty;
}
.cf-nf5 .cf-nf5-event {
display: grid;
padding: 12px;
text-align: left;
background: var(--card, #ffffff);
color: var(--ink, #1a2233);
border: 1px solid var(--card-border, oklch(from var(--ink, #1a2233) l c h / 0.12));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-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)));
}
.cf-nf5 .cf-nf5-event-img {
display: block; width: 100%; height: auto;
aspect-ratio: 16 / 10;
object-fit: cover; object-position: center 40%;
border-radius: max(calc(var(--card-radius, var(--radius, 14px)) - 4px), 6px);
}
.cf-nf5 .cf-nf5-event-body { min-width: 0; padding: 20px 12px 12px; display: grid; }
.cf-nf5 .cf-nf5-event:not(.has-img) .cf-nf5-event-body { padding-top: 12px; }
.cf-nf5 .cf-nf5-event-h {
margin: 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--ink, #1a2233);
text-wrap: balance;
}
.cf-nf5 .cf-nf5-facts { margin: 16px 0 0; display: grid; gap: 8px; }
.cf-nf5 .cf-nf5-facts > div { display: flex; align-items: flex-start; gap: 12px; }
.cf-nf5 .cf-nf5-facts dt { flex: none; display: grid; place-items: center; padding-top: 3px; color: var(--accent, #2563eb); }
.cf-nf5 .cf-nf5-facts dd {
margin: 0;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.4; font-weight: 700;
color: var(--ink, #1a2233);
overflow-wrap: anywhere;
}
.cf-nf5 .cf-nf5-event-detail {
margin: 12px 0 0;
font-size: 0.9375rem; line-height: 1.4; font-weight: 500;
color: var(--muted, #4a5568);
text-wrap: pretty;
}
.cf-nf5 .cf-nf5-cta.cf-nf5-cta--card { margin-top: 24px; width: 100%; min-height: 56px; padding: 10px 20px; }
.cf-nf5 .cf-nf5-cta.cf-nf5-cta--card:focus-visible { outline-color: var(--field-focus, var(--accent, #2563eb)); outline-offset: 3px; }
.cf-nf5 .cf-nf5-rise {
animation: cf-nf5-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
animation-delay: min(calc(var(--i, 0) * 0.07s), 0.28s);
}
@keyframes cf-nf5-rise { from { opacity: 0.82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cf-nf5-strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cf-nf5-pop { from { opacity: 0.82; transform: translateY(-6px) scale(0.9); } to { opacity: 1; transform: none; } }
@media (min-width: 641px) {
.cf-nf5 .cf-nf5-row.has-event:not(.no-links) .cf-nf5-event.has-img { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.cf-nf5 .cf-nf5-row.has-event:not(.no-links) .cf-nf5-event.has-img .cf-nf5-event-img { height: 100%; min-height: 280px; aspect-ratio: auto; }
.cf-nf5 .cf-nf5-row.has-event:not(.no-links) .cf-nf5-event.has-img .cf-nf5-event-body { padding: 20px 16px 12px 28px; align-content: start; }
}
@media (max-width: 640px) {
.cf-nf5 .cf-nf5-act .cf-nf5-cta { width: 100%; padding: 12px 20px; }
.cf-nf5 .cf-nf5-tile { padding: 16px; }
.cf-nf5 .cf-nf5-event-body { padding: 20px 8px 8px; }
.cf-nf5 .cf-nf5-event:not(.has-img) .cf-nf5-event-body { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
.cf-nf5 .cf-nf5-rise, .cf-nf5 .cf-nf5-ins, .cf-nf5 .cf-nf5-del::after { animation: none; }
.cf-nf5 .cf-nf5-cta, .cf-nf5 .cf-nf5-tile { transition: none; }
.cf-nf5 .cf-nf5-cta:hover, .cf-nf5 .cf-nf5-cta.is-hover, .cf-nf5 .cf-nf5-cta:active, .cf-nf5 .cf-nf5-cta.is-active,
.cf-nf5 .cf-nf5-tile:hover, .cf-nf5 .cf-nf5-tile.is-hover, .cf-nf5 .cf-nf5-tile:active, .cf-nf5 .cf-nf5-tile.is-active { transform: none; }
}
`;
pieces/content/not-found-5/specimen.tsx 46 lines
import __studioImage35053e79 from "../assets/e49ea08236484e60.webp";
import * as React from 'react';
import { NotFound5, type NotFound5Page, type NotFound5State } from '../not-found-5';
import { slot } from '../../slots';
// 'error' previews the no-match fallback (popular pages under the main button).
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
const PAGES: NotFound5Page[] = [
{ label: 'Tickets & passes', href: '/tickets', detail: 'Every pass for GrowthCamp 2027', keywords: 'register registration buy pricing passes' },
{ label: 'Group tickets', href: '/tickets/group', detail: 'Bring your team of five or more', keywords: 'team bulk company' },
{ label: 'Transfer a ticket', href: '/tickets/transfer', detail: 'Send your pass to a colleague', keywords: 'change name swap' },
{ label: 'Schedule', href: '/schedule', detail: 'Both days, session by session', keywords: 'agenda program sessions timetable' },
{ label: 'Speakers', href: '/speakers', detail: 'Who’s on the main stage', keywords: 'lineup talks presenters' },
{ label: 'Workshops', href: '/workshops', detail: 'Hands-on rooms, small groups', keywords: 'labs breakout' },
{ label: 'Venue & travel', href: '/venue', detail: 'Hotels, maps and getting to Austin', keywords: 'hotel location travel austin directions' },
{ label: 'Session videos', href: '/videos', detail: 'Watch past talks on demand', keywords: 'recordings replays archive talks' },
{ label: 'Home', href: '/', detail: 'Start from the top', keywords: 'start main index' },
];
const POPULAR: NotFound5Page[] = [PAGES[0], PAGES[3], PAGES[4], PAGES[6]];
export default function NotFound5Specimen({ state = 'default' }: { state?: NotFound5State }) {
return (
<NotFound5
path='/2024/tikets'
pages={PAGES}
popular={POPULAR}
pastYearLine='That link is from GrowthCamp {year}.'
noMatchHeadline='That page didn’t make it to this year.'
event={{
label: 'Heading to GrowthCamp 2027?',
title: 'Join us in Austin for GrowthCamp 2027',
date: 'March 18–19, 2027',
city: 'Austin, Texas',
detail: 'Two days of talks and hands-on workshops.',
actionLabel: 'Save my seat in Austin',
href: '/tickets',
year: 2027,
image: slot('scene', __studioImage35053e79),
imageAlt: 'A conference main stage seen from the audience',
}}
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
path OptionalNotFound5 |
string |
|
pages OptionalNotFound5 |
NotFound5Page[] |
|
popular OptionalNotFound5 |
NotFound5Page[] |
|
event OptionalNotFound5 |
NotFound5Event |
|
showEvent OptionalNotFound5 |
'past-year' | 'always' |
|
minScore OptionalNotFound5 |
number |
|
runnerCount OptionalNotFound5 |
number |
|
runnerFloor OptionalNotFound5 |
number |
|
popularCount OptionalNotFound5 |
number |
|
askLabel OptionalNotFound5 |
string |
|
typedLabel OptionalNotFound5 |
string |
|
lines OptionalNotFound5 |
string[] |
|
pastYearLine OptionalNotFound5 |
string |
|
actionLabel OptionalNotFound5 |
string |
|
actionNote OptionalNotFound5 |
string |
|
runnerHeading OptionalNotFound5 |
string |
|
noMatchHeadline OptionalNotFound5 |
string |
|
noMatchLines OptionalNotFound5 |
string[] |
|
popularHeading OptionalNotFound5 |
string |
|
eventLabel OptionalNotFound5 |
string |
|
eventActionLabel OptionalNotFound5 |
string |
|
dateLabel OptionalNotFound5 |
string |
|
cityLabel OptionalNotFound5 |
string |
|
onAction OptionalNotFound5 |
(page: NotFound5Page, event: React.MouseEvent<HTMLAnchorElement>) => void |
|
onEventAction OptionalNotFound5 |
(event: React.MouseEvent<HTMLAnchorElement>) => void |
|
state OptionalNotFound5 |
NotFound5State |
|
className OptionalNotFound5 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
e49ea08236484e60.webp
image/webp · 67.6 KB