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
This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →
With breadcrumbs
breadcrumbs items take label and url (or route with a route name); the home link is added first on its own.
<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 or a sort box written inside the component sits to the right of the title.
<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
On a category page, give the header the category's name and description and the area on the right the category's picture.
<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?
| Prop | Type | Default | Description |
|---|---|---|---|
title | — | — | The page's title (h1); required |
description | — | null | The description below the title |
breadcrumbs | — | [] | The breadcrumb items: [[label, url | route], …, [label]]; empty: no breadcrumbs |
size | — | null | The 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
- The store uses this header at the top of the product list, category, cart and checkout pages.
- The breadcrumbs are
zb:breadcrumbitems: the home link goes to thehomeroute, and the last item is written without a link because it is the current page.