Skip to content

Add content to the tabs blade component #8587

Answered by leandrocfe
MarJose123 asked this question in Help
Discussion options

You must be logged in to vote

I think you need to use the Alpine or Livewire to achieve this

<div x-data="{ tab: 'tab1' }">
    <x-filament::tabs label="Content tabs">
        <x-filament::tabs.item @click="tab = 'tab1'" :alpine-active="'tab === \'tab1\''">
            Tab 1
        </x-filament::tabs.item>

        <x-filament::tabs.item @click="tab = 'tab2'" :alpine-active="'tab === \'tab2\''">
            Tab 2
        </x-filament::tabs.item>

    </x-filament::tabs>

    <div>
        <div x-show="tab === 'tab1'">
            content 1...
        </div>

        <div x-show="tab === 'tab2'">
            content 2...
        </div>
    </div>
</div>

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MarJose123
Comment options

@fikurimax
Comment options

@kwekubright
Comment options

Answer selected by MarJose123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants