Staaarter

404 Notice Card

A compact, bordered 404 card sized to work inside app shells and modals, not just full pages: a circular icon badge, a status label, a heading, a one-line explanation, and two stacked full-width buttons.

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

npx shadcn add https://staaarter.com/r/404-notice-card.json

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

Usage

The file also exports error7Demo, 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 { Error7, error7Demo } from "@/components/blocks/error/error7";

export default function Page() {
  return <Error7 {...error7Demo} />;
}

Props

PropTypeDefaultDescription
statusLabelstring"Error 404"Text shown in the small status badge.
headingstring"Page not found"Card heading.
descriptionstring"This page doesn't exist or has been moved."One-line explanation under the heading.
primaryLabelstring"Back to homepage"Label for the top full-width button.
primaryHrefstring"/"Link target for the top full-width button.
secondaryLabelstring"Contact support"Label for the bottom full-width button.
secondaryHrefstring"/support"Link target for the bottom full-width button.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • Both buttons are decorative Next.js Links via the button's render prop, pointing wherever primaryHref/secondaryHref say.
  • Unlike the rest of the error category, this card doesn't force min-h-[700px] on its section, it's a compact max-w-sm card meant to also drop into app shells or modals, not just full pages.