Left-aligned 404 for documentation and marketing sites: the requested path is shown struck through in monospace above a did-you-mean box linking to the closest matching page.
A left-aligned 404 for sites where URLs move: the address that failed is printed struck through in monospace, and directly beneath it a did-you-mean box links to the closest matching page.
Free block
This block is free. No license or account is required: install it with the CLI and use it in unlimited projects.
Radix flavor
npx shadcn add "https://ui.beste.co/r/error9"Base UI flavor
npx shadcn add "https://ui.beste.co/r-base/error9"This installs the block to components/beste/block/error9.tsx, plus the button shadcn/ui primitive it uses for the closing action.
The installed file exports error9Demo alongside the block: the exact props behind the preview above. Spread it to get a working page in one line.
import { Error9, error9Demo } from "@/components/beste/block/error9";
export default function NotFound() {
return <Error9 {...error9Demo} />;
}Feed it the real pathname and whatever your redirect map suggests:
"use client";
import { usePathname } from "next/navigation";
import { Error9 } from "@/components/beste/block/error9";
export default function NotFound() {
const pathname = usePathname();
return (
<Error9
code="404"
heading="That page moved"
description="We could not match this address, but one page comes close."
requestedPath={pathname}
suggestionLabel="Did you mean"
suggestion={{ label: "/docs/getting-started", href: "/docs/getting-started" }}
button={{ label: "Back to home", href: "/" }}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
code | string | – | Small uppercase status label above the heading |
heading | string | – | Main page heading, rendered as an h1 |
description | string | – | Explanatory paragraph under the heading |
requestedPath | string | – | The address that failed, printed struck through in monospace |
suggestionLabel | string | – | Lead-in text inside the suggestion box |
suggestion | ActionLink | – | The closest matching page, linked from inside the box |
button | ActionLink | – | Outline button at the bottom |
className | string | – | Extra classes for the outer <section> |
type ActionLink = {
label: string;
href: string;
};truncate, so a long URL shortens with an ellipsis instead of wrapping across lines and pushing the suggestion box down.break-all, so a long suggested path wraps inside the box rather than overflowing it.suggestion is set. suggestionLabel on its own renders nothing, which keeps the block usable as a plain 404 when no match was found.error13
404 page that doubles as a sitemap: left-aligned messaging over four columns of grouped section links, so visitors on a large site can jump straight to the area they wanted.
error5
Card-style 404 panel that echoes the requested URL in monospace, pairs a browser-history back button with link actions, and closes with a support and status link row.
error2
Search-first 404 page: a controlled search field with a submit handler, plus a bordered list of suggested pages with titles, descriptions, and hover arrows.
error30
Monochrome 404 that hands the visitor a search field: a display headline with a muted emphasis clause, a rounded search bar with a circular submit seal wired to a callback, and a ruled list of the most travelled routes.
error11
Store 404 for dead product URLs: the message and shopping buttons sit above a four-up product grid with square imagery, prices, and optional strikethrough compare-at prices.
error32
Monochrome 404 for a renamed article: a display headline and pill call to action above three recent entries, each a full-colour image tile with a plain date line and a bold title.