Componentfeedback0.8 KB gzipZero dependencies

Error Page

404/500/403 full-page layout with stamped code and return action.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add error-page

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { ErrorPage } from "@/components/ui/error-page"; <ErrorPage />

Source code

error-page.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxerror-page.tsx49 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ErrorPageProps extends React.HTMLAttributes<HTMLDivElement> {  code?: "404" | "500" | "403";  title?: string;  description?: string;  action?: React.ReactNode;} /** Full-page error display: large status code + description + return button. */export function ErrorPage({ code = "404", title, description, action, className, ...props }: ErrorPageProps) {  const defaults: Record<string, { t: string; d: string }> = {    "404": { t: "Page Not Found", d: "The page you are looking for does not exist or may have moved." },    "500": { t: "Server Error", d: "An unexpected error occurred behind the scenes. Please try again shortly." },    "403": { t: "Access Denied", d: "You do not have permission to view this section." },

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { ErrorPage } from "@/components/ui/error-page"; <ErrorPage />
PropTypeDescription
code"404" | "500" | "403"Configures code. (Default: "404")
titlestringPrimary heading or title text.
descriptionstringDescriptive helper or subtitle text.
actionReact.ReactNodeConfigures action.