Errors

Error Page

A full-page error state for 404, 500, or any custom error code. Ships with sensible default headlines and descriptions that can be overridden. Includes a back-home button and an optional illustration slot.

404

Page not found

Sorry, we couldn't find the page you're looking for. It may have been moved or deleted.

import { ErrorPage } from "@aetherstack/blocks"

Installation

terminal
npx aether-ui add error-page

Import

import.tsx
import { ErrorPage } from "@aetherstack/blocks"

Usage

error-page.tsx
import { ErrorPage } from "@aetherstack/blocks"

// 404
export default function NotFound() {
  return (
    <ErrorPage
      code="404"
      backHref="/"
      backLabel="Go back home"
    />
  )
}

// 500
export function ServerError() {
  return (
    <ErrorPage
      code="500"
      backHref="/"
    />
  )
}

Props

PropTypeDefaultDescription
codestring'404'Error code displayed in large type. Supports '404', '500', or any string.
headlinestringCustom headline. Defaults to a preset for 404/500.
descriptionstringCustom description. Defaults to a preset for 404/500.
backHrefstring'/'URL for the back link button.
backLabelstring'Go back home'Label for the back link button.
illustrationReactNodeOptional illustration rendered above the error code.
classNamestringAdditional classes on the root element.

* Required

Accessibility

  • The headline renders as an <h1>.
  • The back button uses a plain <a> wrapped in Button asChild.