© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•7mo ago•
1 reply
jw

Programmatically change active Tab

Hi, I'm trying to change the active tab of the tabs form component.

I'm using this code to trigger a traditional html click event when a checkbox is ticked.

Is there a better way to do this? I tried things like setting the 'activeTab' but it didn't work.

TYIA

if ($state) {
$this->js("function clickGuardianTab() {
var guardianTabButton = Array.from(document.querySelectorAll('button[role="tab"]')).find(btn => btn.textContent.trim().toLowerCase() === 'guardian');
guardianTabButton.click();
}");
}
2025-07-19_15_38_50-filament_tab.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Set active tab programmatically (v3)
FilamentFFilament / ❓┊help
3y ago
Change active Tab via callback
FilamentFFilament / ❓┊help
2y ago
Change table columns/filters based on active tab?
FilamentFFilament / ❓┊help
12mo ago
Action to change active form tab
FilamentFFilament / ❓┊help
3y ago