Skip to content

ErrorPage

ErrorPage displays a framed status, explanation and recovery link using built-in English or French copy.

01Preview

Error / 404

Page not found

This page may have moved, or the address may be incorrect.

02Usage

Load @dg/ui/styles.css once in the root layout.

<script>
  import { ErrorPage } from "@dg/ui";
</script>

<ErrorPage status={404} />

03Examples

Error / 404

Page not found

This page may have moved, or the address may be incorrect.

04Notes

  • Native HTML attributes, DOM callbacks, class and style are forwarded to the framed section.
  • Forwarding uses native attribute types; unknown props are not supported. Pass class as a string.
  • Built-in English and French copy follows the Page language.
  • Rendering the component does not set an HTTP response status. The app or static host must send the appropriate status code.

05Parameters

NameTypeDefaultDescription
statusnumber500HTTP status shown in the frame. Built-in copy covers 400, 401, 403, 404, 429, 500 and 503; other values use fallback copy.
titlestringundefinedOverride the title selected from status and the Page language.
descriptionstringundefinedOverride the explanatory text selected from status and the Page language.
hrefstring"/"Recovery link destination.
linkLabelstringundefinedOverride the default localized recovery-link text.
level1 | 2 | 3 | 4 | 5 | 61Semantic title level; use a lower level for an embedded example.

06Accessibility

The app supplies the main landmark and document title. Choose level when embedding this component. Rendering a 404 does not set the HTTP status: the server or static host must do that.

Related subjects

distributed·gallery