404
The link is broken or the page has been removed.
The smallest possible 404: the status code and the message sit on one line separated by a vertical rule, stacking on mobile, with a single outline button underneath.
The smallest error page in the set: the status code and the message sit side by side on one line, separated by a vertical rule that disappears on mobile, with a single outline button underneath. Nothing else competes for attention.
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/error6"Base UI flavor
npx shadcn add "https://ui.beste.co/r-base/error6"This installs the block to components/beste/block/error6.tsx, plus the button shadcn/ui primitive it uses for the single action.
The installed file exports error6Demo alongside the block: the exact props behind the preview above. Spread it into Next.js's not-found.tsx for a working error page in one line.
import { Error6, error6Demo } from "@/components/beste/block/error6";
export default function NotFound() {
return <Error6 {...error6Demo} />;
}Then replace the demo with your own props. Written out, a trimmed setup looks like this:
import { Error6 } from "@/components/beste/block/error6";
export default function NotFound() {
return (
<Error6
code="404"
heading="This page could not be found"
description="The link is broken or the page has been removed."
link={{ label: "Back to home", href: "/" }}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
code | string | – | Status code shown at the start of the line |
heading | string | – | Message text, rendered as an h1 |
description | string | – | Secondary line under the message |
link | ActionLink | – | Single outline button below the line |
className | string | – | Extra classes for the outer <section> |
type ActionLink = {
label: string;
href: string;
};sm breakpoint, so the code sits above the message on phones instead of beside it.code and at least one of heading or description, and it is hidden below sm where the layout is stacked.heading and link set, the result is a one-line message with a button.