PHPackages                             emuniq/filament-collapsible-subnav - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. emuniq/filament-collapsible-subnav

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

emuniq/filament-collapsible-subnav
==================================

A Filament v3, v4 &amp; v5 plugin for collapsible sub-navigation sidebar.

v1.6.0(1mo ago)810.3k↑152.3%4MITBladePHP ^8.1

Since Dec 11Pushed 1mo agoCompare

[ Source](https://github.com/Emuniq/filament-collapsible-subnav)[ Packagist](https://packagist.org/packages/emuniq/filament-collapsible-subnav)[ Docs](https://github.com/Emuniq/filament-collapsible-subnav)[ Fund](https://emuniq.com)[ GitHub Sponsors](https://github.com/emuniq)[ RSS](/packages/emuniq-filament-collapsible-subnav/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (10)Used By (0)

Filament Collapsible Sub-Navigation
===================================

[](#filament-collapsible-sub-navigation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ad4b180ddb5ab477b6a5400db9933b75e7140088b2878fda6a9f32f599e70bef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d756e69712f66696c616d656e742d636f6c6c61707369626c652d7375626e61762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emuniq/filament-collapsible-subnav)[![Total Downloads](https://camo.githubusercontent.com/bc7998f69190ae9f41d1ffc35c5ff17e8c1e000fdc334dd3ecae2ba8b370927b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d756e69712f66696c616d656e742d636f6c6c61707369626c652d7375626e61762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emuniq/filament-collapsible-subnav)[![Monthly Downloads](https://camo.githubusercontent.com/91f641f831177f72ef7b8d1473ee98eacaf172f0e684fced1b64b012e2b0505a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f656d756e69712f66696c616d656e742d636f6c6c61707369626c652d7375626e61762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emuniq/filament-collapsible-subnav)[![License](https://camo.githubusercontent.com/e203e4d451fc7aca74b17044a3a7e15dc21592ee94404f372a1d0926bffdc0c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656d756e69712f66696c616d656e742d636f6c6c61707369626c652d7375626e61762e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/0b2f8416efd5c90b63a98c13386fb98665957766c930192a2f8675db525f103d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f656d756e69712f66696c616d656e742d636f6c6c61707369626c652d7375626e61762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/emuniq/filament-collapsible-subnav)

A Filament v3, v4 &amp; 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):**[![Expanded Sidebar](images/regular.png)](images/regular.png)

**With Top Navigation:**[![Collapsed Sidebar](images/topbar.png)](images/topbar.png)

Compatibility
-------------

[](#compatibility)

Plugin versionFilamentPHPLaravel`^1.0`v3, v4, v58.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.

Installation
------------

[](#installation)

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.

### Optional: Theme Integration

[](#optional-theme-integration)

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.

Features
--------

[](#features)

- ✅ **Zero configuration** — Auto-registers to all panels
- ✅ Collapsible sub-navigation sidebar toggle
- ✅ Persistent state using cookies (server-side rendered to avoid FOUC)
- ✅ Works with SPA mode (`livewire:navigated` re-sync)
- ✅ Tooltips for collapsed items (native fallback for v4, Tippy for v3)
- ✅ Responsive — hidden on mobile (&lt;768px)
- ✅ Smooth transitions
- ✅ No theme, npm, or build step required

How It Works
------------

[](#how-it-works)

The plugin automatically:

1. Registers itself to all Filament panels on installation
2. Injects critical CSS in the `` to prevent flashes on reload
3. Adds a toggle button to **sub-navigation sidebars only** (not main panel navigation)
4. Persists the collapsed/expanded state via the `subnav_collapsed` cookie
5. Re-syncs after each Livewire SPA navigation

The plugin detects pages with sub-navigation and only applies to those specific sidebars, leaving your main panel navigation (top or sidebar) untouched.

Manual Registration (Optional)
------------------------------

[](#manual-registration-optional)

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());
}
```

Troubleshooting
---------------

[](#troubleshooting)

**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.

Contributing
------------

[](#contributing)

Issues and pull requests are welcome on [GitHub](https://github.com/Emuniq/filament-collapsible-subnav). For bugs, please include your Filament version, PHP version, and a minimal reproduction.

Maintained by Emuniq
--------------------

[](#maintained-by-emuniq)

This plugin is built and maintained by **[Emuniq](https://emuniq.com)** — a Laravel &amp; Filament consultancy based in Mexico. We help teams ship admin panels, custom Filament resources, and SaaS backoffices.

- 🌐 Website: [emuniq.com](https://emuniq.com)
- 💼 Need a hand with your Filament project? [Get in touch](https://emuniq.com).
- ⭐ If this plugin saves you time, a GitHub star helps others find it.

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE.md](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance90

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Recently: every ~38 days

Total

9

Last Release

52d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/227872768d209b013c1c0f320fc5144efc2bf537313ee299cbd4a5f8ee2a097b?d=identicon)[isach5](/maintainers/isach5)

---

Top Contributors

[![isach5](https://avatars.githubusercontent.com/u/150757961?v=4)](https://github.com/isach5 "isach5 (34 commits)")

---

Tags

laravelfilamentsidebarcollapsiblesubnavigation

### Embed Badge

![Health badge](/badges/emuniq-filament-collapsible-subnav/health.svg)

```
[![Health](https://phpackages.com/badges/emuniq-filament-collapsible-subnav/health.svg)](https://phpackages.com/packages/emuniq-filament-collapsible-subnav)
```

###  Alternatives

[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M25](/packages/ysfkaya-filament-phone-input)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12453.6k](/packages/jibaymcs-filament-tour)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

197.8k17](/packages/wsmallnews-filament-nestedset)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)[cocosmos/filament-quick-add-select

Instantly create and select new options in Filament relationship selects without opening modals

167.9k](/packages/cocosmos-filament-quick-add-select)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
