"use client";
import { ErrorPage } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
error | Error & { digest?: string } | — | The error from a framework error boundary; digest is shown as a reference. |
reset | () => void | — | Retry callback (Next.js reset): renders a "Try again" button. |
actions | ReactNode | — | Action slot (buttons or links). |
code | ReactNode | — | Short code above the title, e.g. 404 or 500. |
description | ReactNode | — | Supporting text. |
headingAs | "h1" | "h2" | h1 | Heading level of the title (default h1). |
homeHref | string | false | / | Link of the default "Back to home" action (default /). |
homeLabel | ReactNode | — | Action overrides. |
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. |
errorError & { digest?: string }
The error from a framework error boundary; digest is shown as a reference.
reset() => void
Retry callback (Next.js reset): renders a "Try again" button.
actionsReactNode
Action slot (buttons or links).
codeReactNode
Short code above the title, e.g. 404 or 500.
descriptionReactNode
Supporting text.
headingAsdefault h1"h1" | "h2"
Heading level of the title (default h1).
homeHrefdefault /string | false
Link of the default "Back to home" action (default /).
homeLabelReactNode
Action overrides.
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.
500
An unexpected error occurred. Try again, or go back to the home page.
Error reference: a1b2c3
"use client";
// app/error.tsx
import { ErrorPage } from "@pixxl-tools/components";
export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
return <ErrorPage error={error} reset={reset} />;
}