<meta name="robots" content="noindex">
[the site header, with its skip link]
<main id="main" tabindex="-1" class="cap-error-page" data-status="404">
<div class="cap-empty" data-kind="failed" role="alert">
<div class="cap-empty-header">
<h1 class="cap-empty-title">[critical glyph]Page not found</h1>
<p class="cap-empty-text">There is nothing at this address. Check it for a typo, or start again from the home page.</p>
</div>
<div class="cap-empty-content"><a class="cap-btn" data-variant="primary" href="/">Go to the home page</a></div>
</div>
[children]
</main>
[the site footer]
<main id="main" tabindex="-1" class="cap-error-page" data-status="signed-out">
<div class="cap-empty" data-kind="nothing-yet" role="status">
<div class="cap-empty-header">
<h1 class="cap-empty-title">Signed out</h1>
<p class="cap-empty-text">You signed out of Example in this browser.</p>
</div>
<div class="cap-empty-content"><a class="cap-btn" data-variant="primary" href="/sign-in">Sign in again</a></div>
</div>
</main>
<main id="main" tabindex="-1" class="cap-error-page" data-status="410">
<div class="cap-empty" data-kind="nothing-yet">
<div class="cap-empty-header">
<h1 class="cap-empty-title">This page is gone</h1>
<p class="cap-empty-text">It was taken down on purpose.</p>
</div>
<div class="cap-empty-content"><a class="cap-btn" data-variant="primary" href="/blog">Read the blog</a></div>
</div>
</main>
Examples
410: taken down on purpose
<div data-mount="gone"></div>
410 with its one way out and the site's own sentence
<div data-mount="gone-to"></div>
404 with a second way out
<div data-mount="actions"></div>
404 under a site's own title band
<div data-mount="hero"></div>
Signed out by choice, behind Access
<div data-mount="signed-out"></div>
The session ended on its own
<div data-mount="session-ended"></div>
500: something went wrong, with Try again
<div data-mount="server"></div>
503: the database is down, with Try again
<div data-mount="database"></div>
Development: the thrown error's message and its stack
<div data-mount="dev"></div>
Phone: 404
<div data-mount="not-found"></div>
API reference
ErrorPage
Prop
Type
Required
Does
error
unknown
Yes
The ErrorBoundary's error (Route.ErrorBoundaryProps["error"]).
home
string
Yes
The home page's address, for the way out.
siteHeader
ReactNode
The site's header, so its skip link and banner landmark stay on the error page. It must read no loader data: on the error path there is none.
siteFooter
ReactNode
The site's footer (the contentinfo landmark), under the same condition.
children
ReactNode
Under the message, inside main: a search form, the site's most read pages.
dev
boolean
Development only: the thrown error's message and stack are shown. Pass import.meta.env.DEV; off by default, so production never shows a stack.
mainId
string
The main region's id, the skip link's target. Default "main".
className
string
A class for main beside cap-error-page, for the site's own page frame.
title
string
The site's own words, in place of errorWords' for this error: a site whose copy is edited content (julieedwards.info's 404 is Carrel copy in D1) passes it here.
text
string
homeLabel
string
The home link's words. Default "Go to the home page".
homeIcon
ReactNode
An icon after the home link's words, for a site whose buttons that go somewhere carry one (bsw's arrow): an svg with data-icon="end" and aria-hidden="true", so the button pulls its padding in and the link's name stays its words.
as
"main" | "div"
Render the region as a div when the site's Layout already wraps every page in its main, so the page keeps one main. Default "main".
actions
ReactNode
More ways out, after the home link: "Go to dashboard", "View demo".
gone
{ href: string; label: string }
A 410 is a page taken down on purpose: nothing went wrong, so it is no alert and offers no retry. gone names its one way out ("Read the blog", "/blog") in place of the home link.
hero
(words: ErrorWords) => ReactNode
The site's own title band in place of the message's heading (a site that keeps a client's brand lays its error page out as an interior page): it gets the words and draws the h1; the sentence and the ways out follow it in the page's column.
SignedOutPage
Prop
Type
Required
Does
app
string
Yes
The app's name: "Capsid Portal".
signIn
string
Yes
Where signing in starts again: the app's own address.
byChoice
boolean
Yes
The person signed out here (true), or the session ended on its own (false).
access
boolean
Under Access, an open Access session may sign the person straight back in: say so.
mainId
string
CSS variables
Variable
Default
--error-page-body-gap
var(--gap)
--error-page-body-pad-block
0
--error-page-hero-gap
var(--gap)
Parts and data attributes
Class
Is
.cap-error-page
the root
.cap-error-page-body
a part
.cap-error-page-stack
a part
Attribute
Values
data-status
404
State
Read from
:focus
the platform
Accessibility
Key
Does
Tab
The header's skip link first, then the header, then Try again (server errors) and Go to the home page
Enter on the skip link
Moves to main
The failed Empty's contract: shape, word and color together, role="alert", the title in --crit at 4.5:1 in both themes.
One h1, the title; one main. The header's skip link and landmarks come from the site's own header.
The development stack is a named, focusable region, so it scrolls by keyboard on a phone.