Skip to main content
Version: 1.0.3

Error Page

The ErrorPage component provides a fully customizable, composable error page interface designed for modern web applications. It includes error code display with animations, customizable illustrations, search functionality, navigation links, and multiple visual variants.

404

Page Not Found

The page you're looking for doesn't exist. It might have been moved, deleted, or the URL might be incorrect.

ERROR 404 · PAGE NOT FOUND

Custom Design

A custom space-themed error page with animated stars background and custom styling.

404

Error illustration

Lost in space?

The page you're looking for drifted off into the void. Let's get you back on course.

ERROR 404 • PAGE NOT FOUND

Installation

ignix add component errorPage

Basic Usage

import {
ErrorPage,
ErrorPageContent,
ErrorPageErrorCode,
ErrorPageHeading,
ErrorPageDesc,
ErrorPageSearch,
ErrorPageLinks,
ErrorPageFooter,
ErrorPageIcons,
ErrorPageErrorReference,
} from '@ignix-ui/errorpage';
import { ButtonWithIcon } from '@ignix-ui/buttonwithicon';
import { Home, ArrowLeft } from 'lucide-react';

function NotFoundPage() {
return (
<ErrorPage variant="default">
<ErrorPageContent>
<ErrorPageErrorCode>404</ErrorPageErrorCode>
<ErrorPageHeading>Page Not Found</ErrorPageHeading>
<ErrorPageDesc>
The page you're looking for doesn't exist.
</ErrorPageDesc>
<ErrorPageSearch />
<ErrorPageLinks>
<ButtonWithIcon
variant="outline"
icon={<ArrowLeft />}
iconPosition="left"
onClick={() => window.history.back()}
>
Go back
</ButtonWithIcon>
<ButtonWithIcon
variant="default"
icon={<Home />}
iconPosition="left"
onClick={() => (window.location.href = "/")}
>
Take me home
</ButtonWithIcon>
</ErrorPageLinks>
</ErrorPageContent>
<ErrorPageFooter>
ERROR 404 · PAGE NOT FOUND
</ErrorPageFooter>
</ErrorPage>
);
}

500 Server Error Example

Here's a complete example for a 500 server error page with animated icons and error reference tracking:

import {
ErrorPage,
ErrorPageContent,
ErrorPageErrorCode,
ErrorPageHeading,
ErrorPageDesc,
ErrorPageLinks,
ErrorPageFooter,
ErrorPageIcons,
ErrorPageErrorReference,
} from '@ignix-ui/errorpage';
import { ButtonWithIcon } from '@ignix-ui/buttonwithicon';
import { RefreshCw, Bug, MessageCircle, AlertTriangle, Wrench, Zap, Rocket } from 'lucide-react';

function ServerErrorPage() {
// Generate error reference ID
const errorReferenceId = `ERR-${Date.now().toString(36).toUpperCase()}-${Math.random().toString(36).substring(2, 8).toUpperCase()}`;

const handleRetry = () => {
// write your code here
};

const handleReportBug = () => {
// write your code here
};

const handleContactSupport = () => {
// write your code here
};

const handleCopyReferenceId = (referenceId: string) => {
// write your code here
};

return (
<ErrorPage variant="dark">
<ErrorPageContent>
<ErrorPageIcons
icons={[AlertTriangle,Wrench,Zap,Rocket]}>
<ErrorPageErrorCode
errorCode="500"
animationType="rotate"
/>
</ErrorPageIcons>
<ErrorPageHeading>Server Error</ErrorPageHeading>
<ErrorPageDesc>
We apologize for the inconvenience. Something unexpected happened on our server.
Our technical team has been automatically notified and is investigating the issue.
</ErrorPageDesc>
<ErrorPageErrorReference
errorReferenceId={errorReferenceId}
onCopy={handleCopyReferenceId}
/>
<ErrorPageLinks>
<ButtonWithIcon
variant="default"
size="lg"
icon={<RefreshCw />}
iconPosition="left"
onClick={handleRetry}
>
Retry
</ButtonWithIcon>
<ButtonWithIcon
variant="default"
size="lg"
icon={<Bug />}
iconPosition="left"
onClick={handleReportBug}
>
Report a Bug
</ButtonWithIcon>
<ButtonWithIcon
variant="default"
size="lg"
icon={<MessageCircle />}
iconPosition="left"
onClick={handleContactSupport}
>
Contact Support
</ButtonWithIcon>
</ErrorPageLinks>
</ErrorPageContent>
<ErrorPageFooter>
ERROR 500 · SERVER ERROR · REF: {errorReferenceId}
</ErrorPageFooter>
</ErrorPage>
);
}

Props

ErrorPage

The main container component that wraps all error page content.

PropTypeDefaultDescription
variant"default" | "minimal" | "gradient" | "dark""default"Visual variant of the error page
backgroundImagestring-URL for background image
iconLucideIcon-Icon to display throughout the page with continuous motion
iconColorstring-Custom color class for the icon (e.g., "text-blue-500", "text-white"). Defaults to white when backgroundImage is present
classNamestring-Additional CSS classes
childrenReactNode-Child components

ErrorPageErrorCode

Displays the error code (e.g., 404, 500) with optional animations.

PropTypeDefaultDescription
errorCodestring"404"Error code to display
animationType"pulse" | "bounce" | "glow" | "shake" | "rotate" | "none""none"Animation type for the error code
illustrationReactNode | string-Illustration to display above the error code (topCenter position)
classNamestring-Additional CSS classes
childrenReactNode-Custom content (overrides errorCode)

ErrorPageHeading

Displays the main heading/title of the error page.

PropTypeDefaultDescription
titlestring"Page Not Found"Heading text
classNamestring-Additional CSS classes
childrenReactNode-Custom content (overrides title)

ErrorPageDesc

Displays the error description message.

PropTypeDefaultDescription
descriptionstring-Description text
classNamestring-Additional CSS classes
childrenReactNode-Custom content (overrides description)

ErrorPageIllustration

Displays an illustration (image, SVG, or custom React component).

PropTypeDefaultDescription
illustrationReactNode | string-Illustration (URL string or React node)
position"left" | "right" | "topCenter""left"Illustration position (responsive: top on mobile, side on desktop)
classNamestring-Additional CSS classes
childrenReactNode-Custom content (overrides illustration)

ErrorPageSearch

Provides a search bar for users to search for content.

PropTypeDefaultDescription
showSearchbooleantrueShow/hide search bar
searchPlaceholderstring"Search for content..."Placeholder text
onSearch(query: string) => void-Search callback function
searchButtonTextstring"Search"Search button text
classNamestring-Additional CSS classes

Container for navigation links/buttons.

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReactNode-Button components (typically ButtonWithIcon)

ErrorPageContent

Wrapper for main content area.

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReactNode-Content components

ErrorPageHead

Alternative wrapper for header content (similar to ErrorPageContent).

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReactNode-Header components

ErrorPageFooter

Footer section for additional information.

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReactNode-Footer content (renders only if children provided)

ErrorPageIcons

Displays animated icons around the error code (typically used with 500 errors).

PropTypeDefaultDescription
iconsErrorPageIconItem[]-Array of 4 items. Supports two formats: Basic: LucideIcon[] (icon components only, uses default colors) or Tuple: [LucideIcon, string][] ([iconComponent, colorClass] for custom colors)
classNamestring-Additional CSS classes
childrenReactNode-Error code component (typically ErrorPageErrorCode)

ErrorPageErrorReference

Displays an error reference ID for support tracking (typically used with 500 errors).

PropTypeDefaultDescription
errorReferenceIdstring-Error reference ID to display
labelstring"Error Reference ID"Label text for the reference ID
helperTextstring"Please include this ID when contacting support"Helper text shown below the reference ID
onCopy(referenceId: string) => void-Callback when copy button is clicked
showCopyButtonbooleantrueShow copy button
copyButtonTextstring"Copy"Copy button text
classNamestring-Additional CSS classes
childrenReactNode-Custom content (overrides default implementation)