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

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

PRO

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

Above a product grid

Above a product grid: view
BLADE

As in the showcase section, put a zb:shop.product-grid below the heading; the heading becomes the section's h2.

blade
<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 strip's arrows in the heading: view
BLADE

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.

blade
<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?

PropTypeDefaultDescription
title— — The section's title (h2); required
eyebrow—nullThe small label above the title
description—nullA short description below the title
href—nullThe address of the link on the right; without it no link is drawn
link-label—nullThe link's text; null: "View all"
size—nullThe 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

Events, hooks and details
  • 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.
Zubazar UI · ZubazarDesigned for people.