Message layout
A full-page message layout for 404, 403, 500, maintenance and coming-soon pages.
zb:layout.message zubazar/ui-pro
This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →
Error page
code shows large above the title and heading is required; put the buttons in the action slot and the CSS and JS files in head.
{{-- resources/views/errors/404.blade.php --}}
<zb:layout.message code="404" heading="Page not found" description="The page you are looking for may have been moved or deleted.">
<zb:slot:head>@vite(['resources/css/app.css', 'resources/js/app.js'])</zb:slot:head>
<zb:slot:action>
<zb:button :href="url('/')">Back to home</zb:button>
<zb:button :href="url()->previous()" variant="white">Go back</zb:button>
</zb:slot:action>
</zb:layout.message>
| Prop | Values |
|---|---|
code | 404, 403, 500… |
heading | Main heading (required) |
description | Text below the heading |
action | Buttons (slot) |
Maintenance page
Without code the code line is not shown; content you write inside goes between the description and the buttons.
{{-- resources/views/errors/503.blade.php --}}
<zb:layout.message heading="Maintenance in progress" description="The panel will be available again shortly.">
<zb:slot:head>@vite(['resources/css/app.css', 'resources/js/app.js'])</zb:slot:head>
<p class="mt-4 text-sm text-muted">Estimated completion: 14:00</p>
</zb:layout.message>
| Prop | Values |
|---|---|
(slot) | Extra content between the description and the buttons |
Illustration
The illustration slot puts a centred image or a large icon at the bottom of the page.
<zb:layout.message code="403" heading="You do not have access to this page" description="Contact your system administrator for access.">
<zb:slot:head>@vite(['resources/css/app.css', 'resources/js/app.js'])</zb:slot:head>
<zb:slot:action><zb:button :href="url('/')">Back to home</zb:button></zb:slot:action>
<zb:slot:illustration>
<div class="flex justify-center text-faint"><zb:icon name="lock-closed" size="40" stroke="1" /></div>
</zb:slot:illustration>
</zb:layout.message>
| Prop | Values |
|---|---|
illustration | Image at the bottom of the page (slot) |
Props
The values the component takes. What are props and slots?
| Prop | Type | Default | Description |
|---|---|---|---|
heading | — | — | Main heading (required) |
code | — | null | Large code above the heading; not shown when empty |
description | — | null | Description below the heading |
title | — | null | Tab title; heading is used when empty |
mode | — | null | light · dark · system; when null, the preference in the browser |
scope | — | null | The scope the choices are kept in, in the browser; when null, panel |
brand-color | — | null | default · green · red · yellow · blue · gray · dark or #rrggbb |
Slots: head: the application's CSS/JS files. action: the buttons. illustration: the image at the bottom. Default slot: extra content between the description and the buttons.
Developer notes
- Laravel uses
resources/views/errors/{code}.blade.phpfor an error code on its own; duringphp artisan downit showserrors/503.blade.php. - On a page that has its own document, use
zb:message-panelfor the same screen.