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.
A card-style 404 panel for apps and documentation: it echoes the requested URL back in monospace, pairs a browser-history back button with ordinary link actions, and closes with a support and status link row.
Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.
Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.
Radix flavor
npx shadcn add "https://ui.beste.co/r/error5?email=YOUR_EMAIL&license_key=YOUR_KEY"Base UI flavor
npx shadcn add "https://ui.beste.co/r-base/error5?email=YOUR_EMAIL&license_key=YOUR_KEY"This installs the block to components/beste/block/error5.tsx, plus the button shadcn/ui primitive it uses for the back and action buttons.
The installed file exports error5Demo alongside the block: the exact props behind the preview above. Spread it to get a working 404 panel in one line.
import { Error5, error5Demo } from "@/components/beste/block/error5";
export default function NotFound() {
return <Error5 {...error5Demo} />;
}To show the URL that actually failed, read the pathname on the client and pass it in:
"use client";
import { House, Mail } from "lucide-react";
import { usePathname } from "next/navigation";
import { Error5 } from "@/components/beste/block/error5";
export default function NotFound() {
const pathname = usePathname();
return (
<Error5
code="Error 404"
heading="We cannot find that page"
description="The address below did not match anything on this site."
pathLabel="Requested URL"
path={pathname}
backLabel="Go back"
buttons={[{ label: "Back to home", href: "/", icon: House }]}
supportLabel="Still stuck?"
supportLinks={[{ label: "Contact support", href: "/support", icon: Mail }]}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
code | string | – | Status text inside the pill at the top of the card |
heading | string | – | Panel heading, rendered as an h1 |
description | string | – | Explanatory paragraph under the heading |
pathLabel | string | – | Caption above the echoed URL |
path | string | – | The requested URL, shown in monospace |
backLabel | string | – | Label for the history back button |
buttons | ActionButton[] | [] | Link actions next to the back button |
supportLabel | string | – | Lead-in text for the support link row |
supportLinks | SupportLink[] | [] | Links in the footer row |
onBack | () => void | – | Overrides the default browser history back behavior |
className | string | – | Extra classes for the outer <section> |
type ActionButton = {
label: string;
href: string;
variant?: "default" | "outline" | "secondary" | "ghost";
icon?: LucideIcon;
};
type SupportLink = {
label: string;
href: string;
icon?: LucideIcon;
};window.history.back() unless an onBack handler is passed, in which case only that handler runs. Pass onBack when you need router-aware navigation instead of a raw history step.backLabel is set, so leaving the label out gives a panel with link actions only.truncate inside its own bordered box, so a long path shortens with an ellipsis rather than widening the card or wrapping across lines.path is set; pathLabel on its own renders nothing.supportLinks is non-empty, which also hides supportLabel along with it.error4
404 page that recovers the visit with a grid of destination cards, each with an icon, title, description, and hover arrow, followed by a centered row of fallback buttons.
error9
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.
error7
Compact bordered 404 card with a circular icon, status label, heading, one-line explanation, and stacked full-width buttons. Sized for app shells and modals as well as full pages.
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.
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.
error24
Studio 404 that recovers a dead project URL: a square eyebrow and status code over a hairline rule, an accent headline and seal button, then two large project cards with category lines and hover arrow chips.