EN
Getting started
07 · Layout

Message layout

A full-page message layout for 404, 403, 500, maintenance and coming-soon pages: a large code, a heading, a description, buttons and an optional illustration. On a page that has its own document, use `acun:message-panel` for the same screen.

acun:layout.message
01

Error page

For an error code, Laravel automatically uses the resources/views/errors/{code}.blade.php file. code is shown large above the heading; heading is required. Put the buttons in the action slot; your application's CSS and JS files go in the head slot.

BLADE
{{-- resources/views/errors/404.blade.php --}}
<acun:layout.message code="404" heading="Page not found" description="The page you are looking for may have been moved or deleted.">
    <acun:slot:head>@vite(['resources/css/app.css', 'resources/js/app.js'])</acun:slot:head>
    <acun:slot:action>
        <acun:button :href="url('/')">Back to home</acun:button>
        <acun:button :href="url()->previous()" variant="white">Go back</acun:button>
    </acun:slot:action>
</acun:layout.message>
PropValues
code404, 403, 500…
headingMain heading (required)
descriptionText below the heading
actionButtons (slot)
02

Maintenance page

If code is not given, the code line is not shown at all; suited to maintenance and coming-soon pages. The content you write inside the component goes between the description and the buttons. When php artisan down is run, Laravel shows the errors/503.blade.php file.

BLADE
{{-- resources/views/errors/503.blade.php --}}
<acun:layout.message heading="Maintenance in progress" description="The panel will be available again shortly.">
    <acun:slot:head>@vite(['resources/css/app.css', 'resources/js/app.js'])</acun:slot:head>
    <p class="mt-4 text-sm text-gray-500 dark:text-zinc-400">Estimated completion: 14:00</p>
</acun:layout.message>
PropValues
(slot)Extra content between the description and the buttons
03

Illustration

The illustration slot is placed at the very bottom of the page, in a narrow centered area. Instead of an image, you can also use a large acun:icon.

BLADE
<acun:layout.message code="403" heading="You do not have access to this page" description="Contact your system administrator for access.">
    <acun:slot:head>@vite(['resources/css/app.css', 'resources/js/app.js'])</acun:slot:head>
    <acun:slot:action><acun:button :href="url('/')">Back to home</acun:button></acun:slot:action>
    <acun:slot:illustration>
        <div class="flex justify-center text-brand-200 dark:text-brand-500/30"><acun:icon name="lock-closed" size="40" stroke="1" /></div>
    </acun:slot:illustration>
</acun:layout.message>
PropValues
illustrationImage at the bottom of the page (slot)
API

Props and slots

The values the component accepts.

PropDefaultDescription
heading — Main heading (required)
codenullLarge code above the heading; not shown when empty
descriptionnullDescription below the heading
titlenullTab title; heading is used when empty
themenulllight · dark · system
brand-colornulldefault · 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.
Acun UI · Message layoutDetailed usage and examples