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

Auth layout

The layout for login, registration, password reset and two-factor authentication pages.

zb:layout.auth zubazar/ui-pro

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

BLADE

The default variant is cover: on wide screens an illustration sits on the left and the form column on the right.

blade
<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>
PropValues
variantcover | basic
home-urlLink of the logo; defaults to url('/')

Centered card

BLADE

variant="basic" shows the form in a single card centered on a dotted background; it suits short forms such as forgot password.

blade
<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>
PropValues
variantcover | basic

Heading and status message

Heading and status message: view
BLADE

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.

blade
<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." />
PropValues
auth-header: title, descriptionHeading and the description below it (both required)
auth-session-status: statusMessage to show; not rendered when empty

Illustration and colors

BLADE

In the cover variant, replace the drawing on the left with the illustration slot; set the colors with mode and brand-color.

blade
<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>
PropValues
modelight | dark | system
brand-colordefault | green | red | yellow | blue | gray | dark | #rrggbb

Props

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

PropTypeDefaultDescription
variant—covercover (illustration + form) · basic (centered card)
title—nullTab title; defaults to the application name
home-url—url('/')Link of the logo
navigatebooleantrueThe logo's link goes with wire:navigate; false: a full page load (a home page outside the same Livewire application)
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 · #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

Events, hooks and details
  • In the cover variant only the form remains below lg. When the logo slot is given, it is shown in the top-left corner, linked to home-url.
  • In the basic variant, without a logo, the application name is shown above the card.
  • zb:auth-session-status renders nothing when status is empty, so session('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, mode and brand-color are usually given fixed values, or left empty to fall back to the preference in the browser.
Zubazar UI · ZubazarDesigned for people.