Split 404 With Image
A two-column 404 screen: error code, heading, explanation, two CTAs, and a small note on one side, paired with a full-bleed photo that gently scales on hover on the other. The image side can be flipped with imageSide.
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/split-404-with-image.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/error/error3.tsx instead.
Usage
The file also exports error3Demo, 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 { Error3, error3Demo } from "@/components/blocks/error/error3"; export default function Page() { return <Error3 {...error3Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | "404" | Large error code shown above the heading. |
| heading | string | "Page not found" | Main heading. |
| description | string | "The page you're looking for doesn't exist or has been moved." | Short explanation under the heading. |
| note | string | "If you typed the address, double check the spelling and try again." | Small helper text under the CTAs. |
| primaryLabel | string | "Back to homepage" | Label for the primary CTA button. |
| primaryHref | string | "/" | Link target for the primary CTA. |
| secondaryLabel | string | "Contact support" | Label for the secondary CTA button. |
| secondaryHref | string | "/support" | Link target for the secondary CTA. |
| image | MediaSlotImage | none | Photo shown in the image panel. Falls back to a placeholder when omitted. |
| imageSide | "left" | "right" | "right" | Which side the image panel renders on at the lg breakpoint. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- The image scale-on-hover is a real CSS transition (transition-transform + hover:scale-105 on the image itself, clipped by an overflow-hidden wrapper), not JavaScript.
- Both CTA buttons are decorative Next.js Links via the button's render prop, pointing wherever primaryHref/secondaryHref say.
- The image panel is hidden below the lg breakpoint so the message stays full-width and readable on mobile.
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.
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.
404-notice-card
404 Notice Card
Compact bordered 404 card with an icon badge, status label, and stacked full-width buttons.