© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
∂evelopeɾ

hide Tabs based on condition

I've seen other component with methods
hidden()
hidden()
and
visible()
visible()
which are very useful tbh, but the Tab component lacks of this methods, whats the workaround to hide Tabs based on conditions?
Solution
I think you can use a closure in
tabs()
tabs()
:
Tabs::make('My Tabs')
    ->tabs(function ($get) {
        if ($get('my_field') === 'value') {
            return [
                /* some tabs */
            ];
        }
        
        return [
            /* other tabs */
        ];
    })
Tabs::make('My Tabs')
    ->tabs(function ($get) {
        if ($get('my_field') === 'value') {
            return [
                /* some tabs */
            ];
        }
        
        return [
            /* other tabs */
        ];
    })
Jump to solution
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

Hide RelationManager card based on certain condition
FilamentFFilament / ❓┊help
3y ago
Hide Input Form inside Repeater based on condition
FilamentFFilament / ❓┊help
16mo ago
show/hide reorder based on conditions?
FilamentFFilament / ❓┊help
3y ago
reordering based on condition
FilamentFFilament / ❓┊help
3y ago