# TallStackUI: Tab > TallStackUI is a TALL Stack (Tailwind CSS, Alpine.js, Laravel, Livewire) > component library providing 65+ Blade components for building modern web interfaces. A tabbed interface component with underline-styled tab navigation and content panels. On mobile, tabs collapse to a select dropdown by default (unless scroll-on-mobile is enabled). Supports Livewire property binding and tab-change events. ## Basic Usage ```blade

Profile content here.

Settings content here.

``` With Livewire binding: ```blade

Overview panel.

Details panel.

``` With scroll on mobile and centered tabs: ```blade

First tab content.

Second tab content.

``` Listening for tab navigation events: ```blade Home content About content ``` ## Attributes | Attribute | Type | Default | Description | |------------------|--------------|---------|------------------------------------------------------------------------------| | selected | string\|null | null | Initially selected tab identifier (or use `wire:model` for Livewire binding) | | scroll-on-mobile | bool\|null | null | Shows horizontal scrollable tabs on mobile instead of a select dropdown | | centered | bool\|null | null | Centers the tab navigation items | ## Slots | Slot | Description | |-----------|------------------------------------------------------------| | (default) | `` children defining each tab and its content | ## Events | Event | Detail | Description | |---------------|--------------------|-------------------------------------------------------| | x-on:navigate | `{select: string}` | Fired when a tab is selected, with the tab identifier | ## Route-Based Tabs Tabs can be associated with URLs using the `href` attribute on ``. When set, the tab's content only renders server-side if the current URL matches. Clicking a different tab navigates to its URL. This avoids rendering heavy Livewire components for inactive tabs. ```blade ``` Key behaviors: - Tab headers always appear regardless of URL match - The tab whose `href` matches the current URL is auto-selected - `navigate` uses `Livewire.navigate()` for SPA navigation - `navigate-hover` adds prefetching on hover before navigation - Without `navigate`/`navigate-hover`, uses plain `window.location.href` - Tabs without `href` continue to work as before (client-side switching) See `` documentation for full attribute details. ## Wireable Mode (Livewire Property Binding) Bind the active tab to a Livewire string property: ```blade Tab 1 Tab 2 Tab 3 Change to Tab 3 ``` Use `wire:model.live` for real-time server sync on every tab change. ## Route-Based Tabs Tabs can be linked to routes for URL-based navigation: ```blade ``` The `navigate` attribute uses Livewire's SPA-style navigation. ## Alpine.js Event Payload ```blade Invoices Transactions ``` ## Soft Customization Soft customization allows you to override default Tailwind CSS classes used by this component at runtime, either through a service provider or scoped per-instance. ### Customization ```php TallStackUi::customize() ->tab() ->block('base.wrapper', 'your-tailwind-classes'); ``` ### Available Blocks | Block Name | Purpose | |---------------|-----------------------------------------------------| | base.wrapper | Outer card container with background and shadow | | base.padding | Padding wrapper for the mobile select dropdown | | base.body | Flex container for the tab navigation list | | base.content | Content area padding and text color | | base.divider | Horizontal divider between tabs and content | | base.select | Mobile select dropdown styling | | item.wrapper | Individual tab item flex layout and padding | | item.select | Active/selected tab underline border and text color | | item.unselect | Inactive tab border and text color |