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

Page header

The heading of an inner page: the breadcrumbs, the page's title (h1), a description and an optional area on the right.

zb:shop.page-header zubazar/ui-pro

PRO

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

With breadcrumbs

With breadcrumbs: view
BLADE

breadcrumbs items take label and url (or route with a route name); the home link is added first on its own.

blade
<zb:shop.page-header
    title="Checkout"
    description="Enter your details and complete your order."
    :breadcrumbs="[
        ['label' => 'My cart', 'url' => route('web.cart')],
        ['label' => 'Checkout'],
    ]"
/>

A button on the right

A button on the right: view
BLADE

A button or a sort box written inside the component sits to the right of the title.

blade
<zb:shop.page-header title="My cart" description="There are 3 items in your cart." :breadcrumbs="[['label' => 'My cart']]">
    <zb:button variant="white" :href="route('web.products.index')">
        <zb:icon name="arrow-left" size="4" />
        Continue shopping
    </zb:button>
</zb:shop.page-header>

Category page

Category page: view
BLADE

On a category page, give the header the category's name and description and the area on the right the category's picture.

blade
<zb:shop.page-header
    :title="$category->name"
    :description="$category->description"
    :breadcrumbs="[
        ['label' => 'Categories', 'url' => route('web.categories.index')],
        ['label' => $category->name],
    ]"
>
    <zb:shop.product-visual :shape="$category->shape" :hue="$category->hue" class="hidden size-24 flex-none rounded-full sm:block" />
</zb:shop.page-header>

Props

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

PropTypeDefaultDescription
title— — The page's title (h1); required
description—nullThe description below the title
breadcrumbs—[]The breadcrumb items: [[label, url | route], …, [label]]; empty: no breadcrumbs
size—nullThe title's size: sm · md · lg (24 · 30 · 36 px on desktop); null: the store's (commerce.heading_size, lg by default)

Slots: The default slot is the area to the right of the title (buttons, a picture); on narrow screens it moves below the title.

Developer notes

Events, hooks and details
  • The store uses this header at the top of the product list, category, cart and checkout pages.
  • The breadcrumbs are zb:breadcrumb items: the home link goes to the home route, and the last item is written without a link because it is the current page.
Zubazar UI · ZubazarDesigned for people.