Krizaka
Documentation

Error page

When a page is not there: the code drawn huge, the bird that lost its way, one sentence, a search and the ways back — never a dead end.

WebBetaTemplates

Web only — React, from @krizaka/ui/error-page. Beta: its API may still change in a minor version.

When to use

  • Not found (404), server error (500), offline.
  • Any page that cannot show what was asked.

When not to use

Installation

Install

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Import

import { ErrorPage } from "@krizaka/ui/error-page";

Examples

Not found

The pigeon, a search and three ways back.

This page took another road

The address may have changed. Search for it, or start again from one of these.

Props

An error page: the code drawn, the bird, a sentence, a search and the ways back.

PropTypeDefaultDescription
coderequiredstring—The code (404, 500): drawn, not read — the title says it in words.
titlerequiredReactNode—The page's h1 (This page took another road).
actionsReactNode—The ways back (an ActionBar: home, the docs, contact).
mascotReactNode—The bird beside the code (a Mascot in its empty or error mood).
searchReactNode—A search, to find what was meant.
textReactNode—What happened and what to do, in one or two sentences.

Accessibility

  • The code is hidden from assistive technology; the h1 says what happened.
  • The ways back are a named list of links.

Best practices

  • The title says it in words; the code is drawn, not read.
  • Offer a search and two or three ways back.
  • Words and content arrive as props; the motion is the platform's ([data-reveal], still under reduced motion).

Generated from the code of @krizaka/ui 2.10.0: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page