Staaarter

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.

By Staaarter Team
Error
Docs
Live preview

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.json

Prefer 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

PropTypeDefaultDescription
eyebrowstring"404"Small uppercase label above the headline.
headingstring"This article moved"Main headline.
descriptionstringnoneShort supporting copy under the headline.
ctaLabelstring"Back to all writing"Label for the pill CTA button.
ctaHrefstring"/blog"Link target for the pill CTA.
entriesRecentEntry[]noneRecent posts shown as image tiles below the CTA.
classNamestringnoneExtra 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.