Staaarter

Editorial 404 With Portrait Image

Two-column 404 screen: a parenthetical eyebrow, a two-line display headline, a pill-shaped CTA, and an oversized "report this link" email address on the left, paired with a tall captioned photograph filling the right column.

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/editorial-404-with-portrait-image.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/error/error20.tsx instead.

Usage

The file also exports error20Demo, 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 { Error20, error20Demo } from "@/components/blocks/error/error20";

export default function Page() {
  return <Error20 {...error20Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstring"(error)"Small parenthetical label above the headline.
headingReactNodenoneTwo-line display headline.
ctaLabelstring"Back to homepage"Label on the pill-shaped CTA button.
ctaHrefstring"/"Link target for the CTA button.
reportEmailstringnoneEmail address rendered as an oversized mailto link for reporting broken links.
imageMediaSlotImageundefinedPhoto filling the right column, falls back to a placeholder.
captionstringundefinedCaption shown in a card overlaid on the bottom of the photo.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • Entirely static/server-rendered: the CTA is a plain next/link via Button's render prop, and the reportEmail link is a real mailto: link, but there is no client state anywhere in the block.
  • The photo column is hidden below the lg breakpoint (hidden lg:block), so on small screens only the text column renders.