Auth layout
The layout for login, registration, password reset and two-factor authentication pages.
zb:layout.auth zubazar/ui-pro
This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →
Open the auth layout as a full page
Cover variant
The default variant is cover: on wide screens an illustration sits on the left and the form column on the right.
<zb:layout.auth title="Log in">
<zb:slot:head>@vite(['resources/css/app.css', 'resources/js/app.js'])</zb:slot:head>
<zb:slot:logo><img src="/logo.svg" alt="Zubazar Panel" class="h-8 w-auto"></zb:slot:logo>
<zb:auth-header title="Welcome" description="Log in to your account to continue." />
<form wire:submit="login" class="mt-6 space-y-4">
<zb:input wire:model="email" type="email" variant="floating" label="Email" />
<zb:input wire:model="password" type="password" variant="floating" label="Password" viewable />
<zb:button type="submit" class="w-full">Log In</zb:button>
</form>
</zb:layout.auth>
| Prop | Values |
|---|---|
variant | cover | basic |
home-url | Link of the logo; defaults to url('/') |
Centered card
variant="basic" shows the form in a single card centered on a dotted background; it suits short forms such as forgot password.
<zb:layout.auth variant="basic" title="Forgot password">
<zb:auth-header title="Forgot password" description="Enter your registered email address and we will send you a password reset link." />
<form wire:submit="sendLink" class="mt-6 space-y-4">
<zb:input wire:model="email" type="email" label="Email" />
<zb:button type="submit" class="w-full">Send link</zb:button>
</form>
</zb:layout.auth>
| Prop | Values |
|---|---|
variant | cover | basic |
Heading and status message
Put a heading at the top of the form column with zb:auth-header, and the result of an action (e.g. "link sent") with zb:auth-session-status.
<zb:auth-header title="Forgot password" description="Enter your registered email address and we will send you a password reset link." />
<zb:auth-session-status class="mt-4" status="A reset link has been sent to your email address." />
| Prop | Values |
|---|---|
auth-header: title, description | Heading and the description below it (both required) |
auth-session-status: status | Message to show; not rendered when empty |
Illustration and colors
In the cover variant, replace the drawing on the left with the illustration slot; set the colors with mode and brand-color.
<zb:layout.auth brand-color="green" mode="light">
<zb:slot:illustration>
<img src="{{ asset('images/login.svg') }}" alt="" class="w-full max-w-xl">
</zb:slot:illustration>
…
</zb:layout.auth>
| Prop | Values |
|---|---|
mode | light | dark | system |
brand-color | default | green | red | yellow | blue | gray | dark | #rrggbb |
Props
The values the component takes. What are props and slots?
| Prop | Type | Default | Description |
|---|---|---|---|
variant | — | cover | cover (illustration + form) · basic (centered card) |
title | — | null | Tab title; defaults to the application name |
home-url | — | url('/') | Link of the logo |
navigate | boolean | true | The logo's link goes with wire:navigate; false: a full page load (a home page outside the same Livewire application) |
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 · #rrggbb |
auth-header: title, description | — | — | Form heading and description (required) |
auth-session-status: status | — | — | Status message; not rendered when empty |
Slots: head, logo (the full logo: mark and text together, not the side menu's square mark; it links home), illustration (cover only), default (form content)
Developer notes
- In the
covervariant only the form remains belowlg. When thelogoslot is given, it is shown in the top-left corner, linked tohome-url. - In the
basicvariant, without alogo, the application name is shown above the card. zb:auth-session-statusrenders nothing whenstatusis empty, sosession('status')can be passed directly.- The illustration area is hidden from screen readers; give the image an empty
alt. - Since the user is not yet known on the login page,
modeandbrand-colorare usually given fixed values, or left empty to fall back to the preference in the browser.