Components
You’re browsing the documentation for an old version of Flux. Go to v2.x ->

Tabs

Organize content into separate panels within a single container. Easily switch between sections without leaving the page.

For full-page navigation, use the navbar component ->
Copy to clipboard
<flux:tab.group>    <flux:tabs wire:model="tab">        <flux:tab name="profile">Profile</flux:tab>        <flux:tab name="account">Account</flux:tab>        <flux:tab name="billing">Billing</flux:tab>    </flux:tabs>    <flux:tab.panel name="profile">...</flux:tab.panel>    <flux:tab.panel name="account">...</flux:tab.panel>    <flux:tab.panel name="billing">...</flux:tab.panel></flux:tab.group>

With icons

Associate tab labels with icons to visually distinguish different sections.

<flux:tab.group>    <flux:tabs>        <flux:tab name="profile" icon="user">Profile</flux:tab>        <flux:tab name="account" icon="cog-6-tooth">Account</flux:tab>        <flux:tab name="billing" icon="banknotes">Billing</flux:tab>    </flux:tabs>    <flux:tab.panel name="profile">...</flux:tab.panel>    <flux:tab.panel name="account">...</flux:tab.panel>    <flux:tab.panel name="billing">...</flux:tab.panel></flux:tab.group>

Padded edges

By default, the tabs will have no horizontal padding around the edges. If you want to add padding you can do by adding Tailwind utilities to the tabs and/or tab.panel components.

<flux:tabs class="px-4">    <flux:tab name="profile">Profile</flux:tab>    <flux:tab name="account">Account</flux:tab>    <flux:tab name="billing">Billing</flux:tab></flux:tabs>

Segmented tabs

Tab through content with visually separated, button-like tabs. Ideal for toggling between views inside a container with a constrained width.

<flux:tabs variant="segmented">    <flux:tab>List</flux:tab>    <flux:tab>Board</flux:tab>    <flux:tab>Timeline</flux:tab></flux:tabs>

Segmented with icons

Combine segmented tabs with icon prefixes.

<flux:tabs variant="segmented">    <flux:tab icon="list-bullet">List</flux:tab>    <flux:tab icon="squares-2x2">Board</flux:tab>    <flux:tab icon="calendar-days">Timeline</flux:tab></flux:tabs>

Small segmented tabs

For more compact layouts, you can use the size="sm" prop to make the tabs smaller.

<flux:tabs variant="segmented" size="sm">    <flux:tab>Demo</flux:tab>    <flux:tab>Code</flux:tab></flux:tabs>

Pill tabs

Tab through content with visually separated, pill-like tabs.

<flux:tabs variant="pills">    <flux:tab>List</flux:tab>    <flux:tab>Board</flux:tab>    <flux:tab>Timeline</flux:tab></flux:tabs>

Dynamic tabs

If you need, you can dynamically generate additional tabs and panels in your Livewire component. Just make sure you use matching names for the new tabs and panels.

<flux:tab.group>    <flux:tabs>        @foreach($tabs as $id => $tab)            <flux:tab :name="$id">{{ $tab }}</flux:tab>        @endforeach        <flux:tab icon="plus" wire:click="addTab" action>Add tab</flux:tab>    </flux:tabs>    @foreach($tabs as $id => $tab)        <flux:tab.panel :name="$id">            <!-- ... -->        </flux:tab.panel>    @endforeach</flux:tab.group><!-- Livewire component example code...    public array $tabs = [        'tab-1' => 'Tab #1',        'tab-2' => 'Tab #2',    ];    public function addTab(): void    {        $id = 'tab-' . str()->random();        $this->tabs[$id] = 'Tab #' . count($this->tabs) + 1;    }-->
Copyright © 2025 Wireable LLC ·Terms of Service
Built with by
Caleb Porzio and Hugo Sainte-Marie