404 With Recent Writing
A monochrome 404 built for an article that's been renamed or removed: a headline and pill CTA back to the full archive, above three recent entries, each a full-colour image tile with a plain date line and a bold title.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/404-with-recent-writing.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/error/error32.tsx instead.
Usage
The file also exports error32Demo, 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 { Error32, error32Demo } from "@/components/blocks/error/error32"; export default function Page() { return <Error32 {...error32Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | "404" | Small uppercase label above the headline. |
| heading | string | "This article moved" | Main headline. |
| description | string | none | Short supporting copy under the headline. |
| ctaLabel | string | "Back to all writing" | Label for the pill CTA button. |
| ctaHref | string | "/blog" | Link target for the pill CTA. |
| entries | RecentEntry[] | none | Recent posts shown as image tiles below the CTA. |
| className | string | none | Extra classes for the outer section element. |
Types
interface RecentEntry { title: string; date: string; href: string; image: { src: string; alt: string }; }
Behavior notes
- This is a fully static server component; the CTA and every entry render as real Next.js Links via `href`, but nothing is fetched or dated live, the date strings are plain demo text.
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.