KANTO DS v1.12.0
Customise

Theme

Accent

Font

Corners

Density

Text size

Reset to Kanto
Blocks

kt-error-page

GitHub Copy link

The page a person lands on when the one they wanted is not there: not found, broken, or down for maintenance — said plainly, with the way on.

Preview

Request id: 7f3a9c

The page a person lands on when the one they wanted is not there: not found, broken, or down for maintenance — said plainly, with the way on.

<kt-error-page fill home-href="/app"></kt-error-page> <kt-error-page kind="error"> <span>Request id: 7f3a9c</span> </kt-error-page> <kt-error-page kind="maintenance"></kt-error-page>

Kinds

kindCodeSaysOffers
not-found404Page not foundGo home
error500Something went wrongTry again, then Go home
maintenance503Back in a momentNothing it cannot do

code shows another code — 410, 403. home-href is where Go home leads, / by default. Try again fires kt-retry; cancel it to retry your own way — refetch the data, re-render the route — otherwise the page reloads.

The actions slot replaces the buttons — a search field, a link to the status page — and the default slot goes under them, for a contact line or a request id to quote to support.

Layout and words

fill makes it take its container's height and centre itself in it, as a page on its own. Every word is in texts, English until given others; heading-level sets the heading's level, 1 by default.

page.texts = { notFoundHeading: 'Page introuvable', goHome: "Retour à l'accueil" };

Accessibility

The heading says what happened; the large code is decoration to a screen reader, which hears the heading instead. Go home is a link, since it goes somewhere; Try again is a button, since it does something.

API

PropertyAttributeTypeDefault
kindkindKtErrorPageKind'not-found'
codecodestring''
homeHrefhome-hrefstring'/'
headingLevelheading-levelnumber1
fillfillbooleanfalse
texts—Partial<KtErrorPageTexts>{}
EventDetail
kt-retry— Cancelable; uncancelled, the page reloads.
SlotWhere
actionsReplaces the buttons
defaultUnder them: contact, a request id