Add content to the tabs blade component #8587
Answered
by
leandrocfe
MarJose123
asked this question in
Help
-
I've followed the
|
Beta Was this translation helpful? Give feedback.
Answered by
leandrocfe
Sep 19, 2023
Replies: 2 comments 5 replies
-
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> |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
MarJose123
-
how can someone render the active tab dynamically for example in a foreach loop?
this above isnt working properly |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you need to use the Alpine or Livewire to achieve this