Split Error Page
FreeA two-panel 404 with an error number and a clear route back to the homepage.
4 examples. Resize any preview to see it at phone and tablet widths.
A two-panel 404 with an error number and a clear route back to the homepage.
A 404 page with a search field that filters suggested destinations and announces how many it found.
"use client";
import { useId, useState } from "react";
import { ArrowRight, Search } from "lucide-react";
const pages = [
{ title: "Getting started", path: "/docs/start", words: "install setup quickstart begin" },
{ title: "Pricing", path: "/pricing", words: "plans cost billing price" },
{ title: "API reference", path: "/docs/api", words: "endpoints rest sdk keys" },
{ title: "Changelog", path: "/changelog", words: "releases updates new" },
{ title: "Contact support", path: "/support", words: "help email chat" },
{ title: "Status", path: "/status", words: "uptime incident outage" },
];
export default function NotFoundSearch() {
const id = useId();
const [query, setQuery] = useState("");
const q = query.trim().toLowerCase();
const results = q ? pages.filter((page) => `${page.title} ${page.words}`.toLowerCase().includes(q)) : pages.slice(0, 4);
return (
<section className="mx-auto w-full max-w-xl px-6 py-16 sm:py-24">
<p className="font-mono text-sm text-muted-foreground">404</p>
<h1 className="mt-3 text-balance text-4xl font-semibold tracking-[-0.04em] sm:text-5xl">That page has moved or never existed.</h1>
<p className="mt-4 text-pretty leading-relaxed text-muted-foreground">Search for it below, or pick one of the places people usually mean.</p>
<label htmlFor={id} className="sr-only">Search pages</label>
<div className="mt-8 flex h-12 items-center gap-3 rounded-lg border border-border bg-card px-4 transition-[border-color,box-shadow] duration-150 focus-within:border-ring focus-within:ring-4 focus-within:ring-ring/20">
<Search className="size-4 shrink-0 text-muted-foreground" aria-hidden />
<input id={id} type="search" value={query} onChange={(event) => setQuery(event.target.value)} placeholder="Search pages" aria-controls={`${id}-results`} className="min-w-0 flex-1 bg-transparent text-base outline-none placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden" />
</div>
<p role="status" className="sr-only">{q ? `${results.length} ${results.length === 1 ? "page" : "pages"} found` : ""}</p>
{/* Room for four rows is reserved, so filtering does not move what sits below. */}
<ul id={`${id}-results`} className="mt-3 min-h-[13.5rem]">
{results.slice(0, 4).map((page) => (
<li key={page.path} className="border-b border-border last:border-0">
<a href={page.path} className="group flex h-[3.375rem] items-center justify-between gap-4 rounded-md px-1 outline-none focus-visible:ring-2 focus-visible:ring-ring">
<span className="font-medium">{page.title}</span>
<span className="flex items-center gap-2 font-mono text-xs text-muted-foreground">
{page.path}
<ArrowRight className="size-3.5 transition-transform duration-200 ease-out group-hover:translate-x-0.5 motion-reduce:transition-none" aria-hidden />
</span>
</a>
</li>
))}
{results.length === 0 ? <li className="px-1 py-4 text-sm text-muted-foreground">Nothing matches “{query}”. Try a shorter word.</li> : null}
</ul>
</section>
);
}A 500 page that says the work is safe, retries with a loading state, reports when the retry fails, links to the status page and offers a reference to copy.
A maintenance page with the time left, the steps in progress, and a field to be emailed when the service is back.