import { NotFoundPage } from "@pixxl-tools/components";
// In Server Components:
import { NotFoundPage } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
code | ReactNode | 404 | Short code above the title, e.g. 404 or 500. |
homeHref | string | false | / | Link of the default "Back to home" action (default /). |
secondaryLink | { href: string; label: ReactNode } | — | The standard site-specific second action, e.g. { href: "/blog", label: "Browse the blog" }: a secondary ActionLink after "Back to home", the same on every site. |
title | ReactNode | — | Title (any content). |
actions | ReactNode | — | Action slot (buttons or links). |
description | ReactNode | — | Supporting text. |
headingAs | "h1" | "h2" | h1 | Heading level of the title (default h1). |
homeLabel | ReactNode | / | Default primary action. |
illustration | ReactNode | — | Image or icon above the text. |
primaryAction | ReactNode | — | Replaces the default primary action. On a 404 keep "Back to home" as the primary action and add site-specific ones with secondaryLink. |
secondaryAction | ReactNode | — | Any extra action after the primary one. |
tone | Tone | — | Colour role (neutral, primary, danger, success, warning, info). |
codedefault 404ReactNode
Short code above the title, e.g. 404 or 500.
homeHrefdefault /string | false
Link of the default "Back to home" action (default /).
secondaryLink{ href: string; label: ReactNode }
The standard site-specific second action, e.g. { href: "/blog", label: "Browse the blog" }: a secondary ActionLink after "Back to home", the same on every site.
titleReactNode
Title (any content).
actionsReactNode
Action slot (buttons or links).
descriptionReactNode
Supporting text.
headingAsdefault h1"h1" | "h2"
Heading level of the title (default h1).
homeLabeldefault /ReactNode
Default primary action.
illustrationReactNode
Image or icon above the text.
primaryActionReactNode
Replaces the default primary action. On a 404 keep "Back to home" as the primary action and add site-specific ones with secondaryLink.
secondaryActionReactNode
Any extra action after the primary one.
toneTone
Colour role (neutral, primary, danger, success, warning, info).
Complex object props use fixed fixtures. Primitive props stay editable.
<NotFoundPage code="404" title="Page not found" homeHref="/" />404
The page you’re looking for doesn’t exist or has been moved.
// app/not-found.tsx; root layout: metadata.title = createTitleTemplate("Site")
import { NotFoundPage } from "@pixxl-tools/components";
import { notFoundPage } from "@pixxl-tools/components/locales/en";
export const metadata = { robots: { index: false }, title: notFoundPage.title }; // "Page not found – Site"
export default function NotFound() {
return <NotFoundPage secondaryLink={{ href: "/blog", label: "Browse the blog" }} />;
}<NotFoundPage code="404" title="Page not found" homeHref="/" />