404 Support Panel
A card-style 404 panel: an icon badge and heading, the requested URL echoed back in monospace, a real browser-history back button paired with a homepage link, and a closing row of support and status links.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/404-support-panel.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/error/error5.tsx instead.
Usage
The file also exports error5Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Error5, error5Demo } from "@/components/blocks/error/error5"; export default function Page() { return <Error5 {...error5Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "This page isn't available" | Card heading. |
| description | string | "The link you followed may be broken, or the page may have been removed." | Short explanation under the heading. |
| requestedPath | string | "/products/wireless-headphones-v2" | URL path echoed back in the monospace panel. |
| homeHref | string | "/" | Link target for the homepage button. |
| homeLabel | string | "Go to homepage" | Label for the homepage button. |
| supportHref | string | "/support" | Link target for the support link. |
| supportLabel | string | "Contact support" | Label for the support link. |
| statusHref | string | "/status" | Link target for the status link. |
| statusLabel | string | "System status" | Label for the status link. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- "Go back" is a real handler: it calls window.history.back() to navigate the browser's actual history, unlike every other button/link in this block.
- "Go to homepage", "Contact support", and "System status" are decorative Next.js Links via the button's render prop, pointing wherever their href props say.
- requestedPath is a plain string prop, not the current browser URL, so the panel always shows whatever path you pass it.
More Error Blocks
View all →centered-404-message
Centered 404 Message
Minimal centered 404 with two CTAs and a divided row of popular page links.
404-with-site-search
404 With Site Search
404 screen with a working search box and a bordered list of suggested pages.
split-404-with-image
Split 404 With Image
Two-column 404 with the message on one side and a full-bleed photo that scales on hover on the other.
404-with-destination-cards
404 With Destination Cards
404 screen with a grid of icon destination cards plus fallback CTA buttons.
inline-404-line
Inline 404 Line
The smallest possible 404: code and message on one divided line with one button underneath.
404-notice-card
404 Notice Card
Compact bordered 404 card with an icon badge, status label, and stacked full-width buttons.