Section heading
The heading of a section on a page: a small label, the title, a short description and a "View all" link on the right.
zb:shop.section-heading zubazar/ui-pro
This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →
Title and link only
With href a link shows on the right; without link-label it reads "View all".
<zb:shop.section-heading title="You may also like" :href="route('web.products.index')" />
Label, description and link
eyebrow gives the small label on top, description the description and link-label the link's text.
<zb:shop.section-heading
eyebrow="Showcase"
title="This week's favourites"
description="The products added to carts most this week."
:href="route('web.products.index')"
link-label="All products"
/>
Above a product grid
As in the showcase section, put a zb:shop.product-grid below the heading; the heading becomes the section's h2.
<section>
<zb:shop.section-heading eyebrow="Showcase" title="This week's favourites" :href="route('web.products.index')" link-label="All products" />
<zb:shop.product-grid :products="$products" class="mt-8" />
</section>
The strip's arrows in the heading
The actions slot comes to the right of the link and holds a product strip's arrows (zb:carousel.controls); :mobile="false" hides them on phones.
<section>
<zb:shop.section-heading title="Best sellers" :href="route('web.products.index')">
<zb:slot:actions><zb:carousel.controls for="best-sellers" :mobile="false" /></zb:slot:actions>
</zb:shop.section-heading>
<zb:carousel id="best-sellers" :arrows="false" :per-view="['base' => 2, 'lg' => 4]" :loop="false" :pagination="false" label="Best sellers" class="mt-6">
@foreach ($products as $product)
<zb:carousel.item :label="$product->name"><zb:shop.product-card :product="$product" class="h-full" /></zb:carousel.item>
@endforeach
</zb:carousel>
</section>
Props
The values the component takes. What are props and slots?
| Prop | Type | Default | Description |
|---|---|---|---|
title | — | — | The section's title (h2); required |
eyebrow | — | null | The small label above the title |
description | — | null | A short description below the title |
href | — | null | The address of the link on the right; without it no link is drawn |
link-label | — | null | The link's text; null: "View all" |
size | — | null | The title's size: sm · md · lg (20 · 24 · 30 px on desktop); null: the store's (commerce.heading_size, lg by default) |
Slots: actions: beside the link, on the right (e.g. zb:carousel.controls)
Developer notes
- The store uses this heading in the home page's category and showcase sections, in the cart and in the "You may also like" section of the product page.
- The label and the description are optional; on narrow screens the link moves below the title.