Skip to content

Error page layout ​

One centered shell for 404, 403, 500, maintenance and coming soon, so they read as a family.

Open in demo
Open in demo

TIP

The previews on this page hold the layout in a fixed box. On its own it fills the viewport, which is what it does on a real page.

Usage ​

title is the only required prop. code is the big numeral, and pages without one leave it out. The default slot is the message.

It fills the viewport and paints the app's ground itself, because these pages run under the blank layout with no shell around them.

A background pattern sits behind the column at 6% opacity. pattern="none" turns it off.

Examples ​

Tones and patterns ​

tone colors the code and the icon tile: muted, primary, warning or destructive. Body copy never changes color, which is what keeps every one of these pages readable.

API ​

Source: src/shared/components/common/pages/ErrorPageLayout.vue

Props ​

PropTypeDefaultDescription
codestring—The large numeral. Omit it for pages with no code.
titlestringrequiredThe heading.
iconComponent—Drawn in a rounded tile above the code.
tone'muted' | 'primary' | 'warning' | 'destructive''muted'Colors the code and the tile.
pattern'dots' | 'grid' | 'waves' | 'geometric' | 'mesh' | 'none''mesh'The background pattern.

Emits ​

None.

Slots ​

SlotDescription
defaultThe message, one sentence.
extraAnything richer: a countdown, a status list, a form.
actionsButtons under the message, centered and wrapping.

Accessibility ​

  • The title is the page's <h1>, so an error page has a heading like any other.
  • The code carries dir="ltr" and tabular numerals, so a numeral does not flip in a right-to-left layout or jitter if it counts down.
  • The message carries dir="auto". It is a full sentence, and inside a right-to-left shell a trailing full stop is bidi-neutral and would be painted at the start of the line.
  • The column is capped at a readable width and centered, so the message does not run the width of a desktop screen.