v0.0.2
Demos (demo panel, opens in a new tab)

Message layout

A full-page message layout for 404, 403, 500, maintenance and coming-soon pages.

zb:layout.message zubazar/ui-pro

PRO

This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →

Error page

BLADE

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.

blade
{{-- 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>
PropValues
code404, 403, 500…
headingMain heading (required)
descriptionText below the heading
actionButtons (slot)

Maintenance page

BLADE

Without code the code line is not shown; content you write inside goes between the description and the buttons.

blade
{{-- 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>
PropValues
(slot)Extra content between the description and the buttons

Illustration

BLADE

The illustration slot puts a centred image or a large icon at the bottom of the page.

blade
<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>
PropValues
illustrationImage at the bottom of the page (slot)

Props

The values the component takes. What are props and slots?

PropTypeDefaultDescription
heading— — Main heading (required)
code—nullLarge code above the heading; not shown when empty
description—nullDescription below the heading
title—nullTab title; heading is used when empty
mode—nulllight · dark · system; when null, the preference in the browser
scope—nullThe scope the choices are kept in, in the browser; when null, panel
brand-color—nulldefault · 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

Events, hooks and details
  • Laravel uses resources/views/errors/{code}.blade.php for an error code on its own; during php artisan down it shows errors/503.blade.php.
  • On a page that has its own document, use zb:message-panel for the same screen.
Zubazar UI · ZubazarDesigned for people.