emuniq/filament-collapsible-subnav
Filament v3–v5 plugin that adds a collapsible toggle to resource page sub-navigation sidebars (secondary nav), working with both top navigation and sidebar layouts. Auto-registers to all panels with zero configuration; optional theme CSS bundling.
A Filament v3, v4 & v5 plugin that adds a collapsible toggle to sub-navigation sidebars only. Perfect for resource pages with multiple tabs or sections using ->subNavigationPosition(SubNavigationPosition::Start).
Works with both top navigation and sidebar navigation layouts — the plugin specifically targets the sub-navigation sidebar that appears on individual resource pages, not the main panel navigation.
Without Top Navigation (Sidebar Layout):

With Top Navigation:

| Plugin version | Filament | PHP | Laravel |
|---|---|---|---|
^1.0 |
v3, v4, v5 | 8.1+ | 10 / 11 / 12 / 13 |
Note: This plugin only affects sub-navigation sidebars (the secondary navigation within resource pages), not the main panel sidebar. It works regardless of whether you use top navigation or sidebar navigation for your main panel layout.
Install the package via composer:
composer require emuniq/filament-collapsible-subnav
That's it! The plugin auto-registers to all panels and works immediately with zero flash.
For a slight performance boost, you can integrate the CSS into your Filament theme:
php artisan collapsible-subnav:install
npm run build
This bundles the plugin CSS with your theme, reducing HTTP requests. Not required — the plugin works perfectly without this step.
livewire:navigated re-sync)The plugin automatically:
<head> to prevent flashes on reloadsubnav_collapsed cookieThe plugin detects pages with sub-navigation and only applies to those specific sidebars, leaving your main panel navigation (top or sidebar) untouched.
If you prefer manual control, you can register the plugin explicitly on individual panels:
use Emuniq\FilamentCollapsibleSubnav\CollapsibleSubnavPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(CollapsibleSubnavPlugin::make());
}
Cloudflare Rocket Loader strips the early script. The plugin marks its critical inline script with data-cfasync="false" so Rocket Loader skips it. If you still see a flash on reload, check that your CDN or HTML minifier preserves the attribute.
SPA mode (->spa()) leaves the toggle out of sync. Fixed since the SPA re-sync patch — the plugin now listens to livewire:navigated and re-applies state on every navigation.
Tooltips don't appear in Filament v4. Filament v4 doesn't expose Tippy globally; the plugin falls back to the native HTML title attribute so a tooltip always shows on hover.
Issues and pull requests are welcome on GitHub. For bugs, please include your Filament version, PHP version, and a minimal reproduction.
This plugin is built and maintained by Emuniq — a Laravel & Filament consultancy based in Mexico. We help teams ship admin panels, custom Filament resources, and SaaS backoffices.
The MIT License (MIT). Please see LICENSE.md for more information.
How can I help you explore Laravel packages today?