Navbar
The store's ready-made navbars: the ten presets work with every theme and take the colours, corners and font from the current theme.
zb:shop.site-header zubazar/ui-pro
This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →
Open the Marketplace preset in full page
Choosing a preset
PHP
Pick one of the ten presets with the navbar setting; left empty, each theme draws its own navbar.
// config/zubazar-ui-pro.php (commerce)
'navbar' => env('SHOP_NAVBAR', 'marketplace'),
| Prop | Values |
|---|---|
marketplace | Marketplace |
fashion | Visual catalogue |
electronics | Store |
grocery | Grocery |
home-living | Home & living |
beauty | Beauty |
automotive | Automotive |
wholesale | Wholesale |
boutique | Boutique |
services | Corporate |
Header links
PHP
headerLinks() gives the links before the cart, such as the account and favourites, and topLinks() the small links of the utility strip.
public function headerLinks(): array
{
return [
['label' => 'My account', 'url' => route('account'), 'icon' => 'user'],
['label' => 'Favourites', 'url' => route('favourites'), 'icon' => 'heart'],
];
}
public function topLinks(): array
{
return [
['label' => 'My orders', 'url' => route('orders')],
['label' => 'Help & Support', 'url' => route('help')],
];
}
| Prop | Values |
|---|---|
headerLinks() | label, url, icon (a zb:icon name), external |
topLinks() | label, url, external |
freeShippingThreshold() | The threshold in minor units; null: no shipping promise in the strip |
Developer notes
- The shared layout, and a layout of your own, draw the navbar with
<zb:shop.site-header />. - The presets' parts: the utility strip, the logo, the search (with an optional Search button), the account and the cart (icons only, each icon above its name, or corporate: the account as the primary button), the category rail with its mega menu (words or round pictures) and, on phones, the drawer that steps into submenus.
- On a phone every preset has its own layout: a search with a button, in a dark band, in a thick frame, rounded or opened by a magnifier; departments as chips or as round icons that scroll sideways.
- In the corporate preset "Products" opens a full-width showcase: a search and "All products" at the top, the departments with their icons on the left, and each group as a heading over picture cards on the right. The other menu items with
childrenopen a panel of their own: links with icons in two columns on the left (icon, and a line under the name:description) and a feature card on the right (feature:title,text,cta,urlandimageorproduct). - The previews open in full width: the mega menu opens on hover, and the category rail hides while scrolling down and comes back on scrolling up.
- The mega menu shows the departments on the left and their groups in up to four columns on the right; each group shows its first five links, and "Show more" opens the rest.
- The mega menu's panel is always 32rem tall (it does not change with the department) and gets lower when the screen has less room; a long column scrolls on its own.
- On phones the header links move under the drawer; with neither
topLinks()norfreeShippingThreshold(), the utility strip is not drawn.