Skip to content

zk-tabs ​

Renders a Bootstrap-compatible tab navigation with panels from a data array. Tab IDs are unique per instance.

Props ​

PropTypeDefaultDescription
tabsarray[]Array of tab definitions
classstring|nullnullAdditional CSS class(es) on the <ul> nav element

All undeclared attributes forward to the outer <div> wrapper.

Tab Item Structure ​

KeyTypeRequiredDescription
labelstringYesTab button label
contentstringYesPanel HTML content

Examples ​

Basic tabs ​

blade
<x-zk-tabs :tabs="[
    ['label' => 'Overview',  'content' => '<p>Overview content</p>'],
    ['label' => 'Details',   'content' => '<p>Details content</p>'],
    ['label' => 'Reviews',   'content' => '<p>Reviews content</p>'],
]" />

From controller data ​

blade
<x-zk-tabs :tabs="$product->tabsData()" id="product-tabs" />

Multiple instances on same page ​

blade
{{-- Safe — each instance generates a unique ID prefix internally --}}
<x-zk-tabs :tabs="$tabs1" />
<x-zk-tabs :tabs="$tabs2" />

Notes ​

  • Requires Bootstrap JS for tab functionality (data-bs-toggle="tab").
  • The first tab is active by default.
  • Tab panel IDs are prefixed with uniqid() — safe for multiple instances on the same page.

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.