[tabs] use :current for custom activation #580
-
I frequently use tabs without changing the URL, and it would be great to have an option to manually set which tab is active. Perhaps this option already exists, but I haven’t been able to find it in the documentation. |
Beta Was this translation helpful? Give feedback.
Answered by
ArvidDeJong
Nov 18, 2024
Replies: 2 comments 4 replies
-
@ArvidDeJong If I understand correctly, you can just e.g.
then in your Blade:
|
Beta Was this translation helpful? Give feedback.
4 replies
-
I'm not sure why it didn't work before, but it's working fine now: <flux:tabs class="mt-8 px-4" wire:model="showTab">
<flux:tab name="active" wire:click="$set('showTab','active')">
Active
</flux:tab>
<flux:tab name="trashed" wire:click="$set('showTab','trashed')">
Trashed
<flux:badge color="zinc">
{{ $trashed }}
</flux:badge>
</flux:tab>
</flux:tabs> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joshhanley
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure why it didn't work before, but it's working fine now: