Staaarter

404 With Site Directory

A 404 page that doubles as a sitemap: left-aligned messaging and a fallback button sit above 4 columns of grouped links (Product, Company, Resources, Legal), so a broken link still leaves visitors somewhere useful to go.

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 dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/404-with-site-directory.json

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

Usage

The file also exports error13Demo, 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 { Error13, error13Demo } from "@/components/blocks/error/error13";

export default function Page() {
  return <Error13 {...error13Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstring"404 error"Small label above the heading.
headingstring"Page not found"Main heading text.
descriptionstring"We couldn't find the page you were looking for. Try one of the sections below, or head back home."Short supporting copy under the heading.
homeLabelstring"Back to homepage"Label for the fallback button.
homeHrefstring"#"Link target for the fallback button.
columnsDirectoryColumn[]noneGrouped columns of links shown below the messaging.
classNamestringnoneExtra classes for the outer section element.

Types

interface DirectoryColumn {
  heading: string;
  links: { label: string; href: string }[];
}

Behavior notes

  • Every directory link and the fallback button render as real Next.js Link components, but all default to "#" until you supply your own hrefs, none of them navigate anywhere meaningful in the demo.