404 Notice Card
A compact, bordered 404 card sized to work inside app shells and modals, not just full pages: a circular icon badge, a status label, a heading, a one-line explanation, and two stacked full-width buttons.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/404-notice-card.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/error/error7.tsx instead.
Usage
The file also exports error7Demo, 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 { Error7, error7Demo } from "@/components/blocks/error/error7"; export default function Page() { return <Error7 {...error7Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| statusLabel | string | "Error 404" | Text shown in the small status badge. |
| heading | string | "Page not found" | Card heading. |
| description | string | "This page doesn't exist or has been moved." | One-line explanation under the heading. |
| primaryLabel | string | "Back to homepage" | Label for the top full-width button. |
| primaryHref | string | "/" | Link target for the top full-width button. |
| secondaryLabel | string | "Contact support" | Label for the bottom full-width button. |
| secondaryHref | string | "/support" | Link target for the bottom full-width button. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- Both buttons are decorative Next.js Links via the button's render prop, pointing wherever primaryHref/secondaryHref say.
- Unlike the rest of the error category, this card doesn't force min-h-[700px] on its section, it's a compact max-w-sm card meant to also drop into app shells or modals, not just full pages.
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.
404-support-panel
404 Support Panel
Card-style 404 echoing the requested URL, with a real back button and a support/status link row.
inline-404-line
Inline 404 Line
The smallest possible 404: code and message on one divided line with one button underneath.