PHPackages                             agroezinger/filament-navigation-enhanced - 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. agroezinger/filament-navigation-enhanced

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

agroezinger/filament-navigation-enhanced
========================================

Adds collapsible child-item support to the Filament sidebar navigation.

v1.0.2(1w ago)43881MITBladePHP ^8.2CI passing

Since Jun 5Pushed 1w agoCompare

[ Source](https://github.com/agroezinger/filament-navigation-enhanced)[ Packagist](https://packagist.org/packages/agroezinger/filament-navigation-enhanced)[ Docs](https://github.com/agroezinger/filament-navigation-enhanced/)[ RSS](/packages/agroezinger-filament-navigation-enhanced/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

filament-navigation-enhanced
============================

[](#filament-navigation-enhanced)

[![Plumb score](https://camo.githubusercontent.com/7c657b1517ce29960052b2d1dcfbc5e18cbc27a2351cadd6bac5cd24f215ffd3/68747470733a2f2f706c756d627068702e6465762f6261646765732f6167726f657a696e6765722f66696c616d656e742d6e617669676174696f6e2d656e68616e6365642f636f6d706f736974652e737667)](https://plumbphp.dev/agroezinger/filament-navigation-enhanced) [![Plumb security score](https://camo.githubusercontent.com/fe36bbf901882203613dfbe638f249fe01a83a00782a32dc48a9e48ed700f8f2/68747470733a2f2f706c756d627068702e6465762f6261646765732f6167726f657a696e6765722f66696c616d656e742d6e617669676174696f6e2d656e68616e6365642f73656375726974792e737667)](https://plumbphp.dev/agroezinger/filament-navigation-enhanced) [![Plumb maintenance score](https://camo.githubusercontent.com/8725a96d642a2848c31343376fa21a3387b74ff9f91b1e4af0878273a2c80916/68747470733a2f2f706c756d627068702e6465762f6261646765732f6167726f657a696e6765722f66696c616d656e742d6e617669676174696f6e2d656e68616e6365642f6d61696e74656e616e63652e737667)](https://plumbphp.dev/agroezinger/filament-navigation-enhanced) [![Plumb ecosystem score](https://camo.githubusercontent.com/23ed369c94706a38ed8d7917abce416d03b0626ae1b8e14f90e75953bc3f6569/68747470733a2f2f706c756d627068702e6465762f6261646765732f6167726f657a696e6765722f66696c616d656e742d6e617669676174696f6e2d656e68616e6365642f65636f73797374656d2e737667)](https://plumbphp.dev/agroezinger/filament-navigation-enhanced) [![Scanned by Plumb](https://camo.githubusercontent.com/1eaf77377b0f424fb9d9ca4af48275dec1dbe40a3f515e8b4917eeb24d5c359d/68747470733a2f2f706c756d627068702e6465762f6261646765732f6167726f657a696e6765722f66696c616d656e742d6e617669676174696f6e2d656e68616e6365642f7363616e6e65642e737667)](https://plumbphp.dev/agroezinger/filament-navigation-enhanced)

Adds collapsible child-item support to the [Filament](https://filamentphp.com) v5 sidebar navigation. A parent item becomes an expand/collapse toggle; its children are revealed in an animated sub-list. The group auto-expands whenever a child is active.

[![image](https://private-user-images.githubusercontent.com/12061647/602158326-ca42da52-e616-4680-b139-cdfa2c86e1a3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQxOTA5NzMsIm5iZiI6MTc4NDE5MDY3MywicGF0aCI6Ii8xMjA2MTY0Ny82MDIxNTgzMjYtY2E0MmRhNTItZTYxNi00NjgwLWIxMzktY2RmYTJjODZlMWEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzE2VDA4MzExM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4ZGJjMzJiN2QxODc4OTRmMGY0OTk2OTQ4ZDY1ZjUwODBhYjI3NWFmMmJjNWViYjA0NDUzM2VkYzE0MDdjZDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.ZedwsdDHH-WohJyJiBcV5rR7-ZdtaRQ8CNPGYNF-yoQ)](https://private-user-images.githubusercontent.com/12061647/602158326-ca42da52-e616-4680-b139-cdfa2c86e1a3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQxOTA5NzMsIm5iZiI6MTc4NDE5MDY3MywicGF0aCI6Ii8xMjA2MTY0Ny82MDIxNTgzMjYtY2E0MmRhNTItZTYxNi00NjgwLWIxMzktY2RmYTJjODZlMWEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzE2VDA4MzExM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4ZGJjMzJiN2QxODc4OTRmMGY0OTk2OTQ4ZDY1ZjUwODBhYjI3NWFmMmJjNWViYjA0NDUzM2VkYzE0MDdjZDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.ZedwsdDHH-WohJyJiBcV5rR7-ZdtaRQ8CNPGYNF-yoQ)Requirements
------------

[](#requirements)

DependencyVersionPHP^8.2filament/filament^5.0Installation
------------

[](#installation)

### Via Composer (Packagist)

[](#via-composer-packagist)

```
composer require agroezinger/filament-navigation-enhanced
```

### Publish the view override

[](#publish-the-view-override)

The package ships a replacement for Filament's `sidebar/item` component. Publish it once so Filament picks it up:

```
php artisan vendor:publish --tag=navigation-enhanced-views
```

This copies the view to `resources/views/vendor/filament-panels/components/sidebar/item.blade.php`.

Usage
-----

[](#usage)

### 1. Register the plugin

[](#1-register-the-plugin)

Add `NavigationEnhancedPlugin` to every panel that should use the feature:

```
use Agroezinger\FilamentNavigationEnhanced\NavigationEnhancedPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            NavigationEnhancedPlugin::make(),
        ]);
}
```

### 2. Register standalone parent items (no Page class needed)

[](#2-register-standalone-parent-items-no-page-class-needed)

Use `parentNavigationItem()` to declare a collapsible parent item directly on the plugin — no dummy Page or redirect required:

```
use Agroezinger\FilamentNavigationEnhanced\NavigationEnhancedPlugin;
use Filament\Navigation\NavigationItem;

NavigationEnhancedPlugin::make()
    ->parentNavigationItem(
        NavigationItem::make('Parent Menu Item')
            ->icon('heroicon-o-arrow-up-tray')
            ->group('Workflows')
            ->sort(10)
            ->childItems([
                NavigationItem::make('Sub-Menu-Item 1')
                    ->url(fn() => ImportOrderPositionsPage::getUrl())
                    ->isActiveWhen(fn() => request()->routeIs('filament.frontend.pages.sub-menu-item-1*')),

                NavigationItem::make('Sub-Menu-Item 2')
                    ->url(fn() => ImportPricelistPage::getUrl())
                    ->isActiveWhen(fn() => request()->routeIs('filament.frontend.pages.sub-menu-item-2*')),
            ])
    )
```

The child Pages must still opt out of standalone navigation registration:

```
protected static bool $shouldRegisterNavigation = false;
```

Call `->parentNavigationItem()` multiple times to register more than one standalone parent.

### 3. Add the trait to a parent Page or Resource

[](#3-add-the-trait-to-a-parent-page-or-resource)

```
use Agroezinger\FilamentNavigationEnhanced\Concerns\HasNavigationChildren;
use Filament\Navigation\NavigationItem;

class SettingsPage extends Page
{
    use HasNavigationChildren;

    protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-cog-6-tooth';
    protected static string|\UnitEnum|null $navigationGroup = 'Einstellungen';
    protected static ?string $navigationLabel = 'Einstellungen';

    public static function getNavigationChildItems(): array
    {
        return [
            NavigationItem::make('Allgemein')
                ->url(static::getUrl())
                ->icon('heroicon-o-cog-6-tooth')
                ->isActiveWhen(fn() => request()->routeIs('filament.club.pages.settings.general')),

            NavigationItem::make('Abteilungen')
                ->url(DepartmentResource::getUrl('index'))
                ->icon('heroicon-o-rectangle-stack')
                ->isActiveWhen(fn() => request()->routeIs('filament.club.resources.departments.*')),

            NavigationItem::make('Benutzer')
                ->url(UserResource::getUrl('index'))
                ->icon('heroicon-o-users')
                ->isActiveWhen(fn() => request()->routeIs('filament.club.resources.users.*')),
        ];
    }
}
```

### 3. Suppress child items from the top-level navigation

[](#3-suppress-child-items-from-the-top-level-navigation)

Resources and Pages that appear as children should not register themselves as standalone sidebar items. Override `shouldRegisterNavigation()` on the Resource:

```
class DepartmentResource extends Resource
{
    public static function shouldRegisterNavigation(): bool
    {
        return false;
    }
}
```

For a child Page, set:

```
protected static bool $shouldRegisterNavigation = false;
```

### 4. Active-state detection

[](#4-active-state-detection)

Use `request()->routeIs()` with a wildcard to match all pages of a resource (index, create, edit):

```
NavigationItem::make('Abteilungen')
    ->isActiveWhen(fn() => request()->routeIs('filament.{panel}.resources.{resource-slug}.*')),
```

For a single Page, match the exact route name:

```
NavigationItem::make('Allgemein')
    ->isActiveWhen(fn() => request()->routeIs('filament.{panel}.pages.{page-slug}')),
```

To find the exact route names for your panel, run:

```
php artisan route:list --name="filament.{panel}" --json \
  | php -r "foreach(json_decode(file_get_contents('php://stdin'),true) as \$r) echo \$r['name'].PHP_EOL;"
```

How it works
------------

[](#how-it-works)

The package publishes a custom `sidebar/item` Blade component that extends Filament's default one. When a `NavigationItem` carries child items (set via `$item->childItems([...])`), the component renders a `` toggle instead of an `` link, and wraps the children in an Alpine.js-powered `` with enter/leave transitions.

`HasNavigationChildren::getNavigationItems()` wraps the parent's items and calls `childItems()` on each with the return value of `getNavigationChildItems()`. The parent item auto-expands on load when `$active || $activeChildItems` is true.

Items without children fall through to Filament's original rendering path unchanged.

License
-------

[](#license)

MIT

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance98

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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 ~18 days

Total

3

Last Release

12d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c280c25a4609fb0911955b27ed40e70b9028dd8c1fcfad03beaa87a95c96a2bc?d=identicon)[agroezinger](/maintainers/agroezinger)

---

Top Contributors

[![agroezinger](https://avatars.githubusercontent.com/u/12061647?v=4)](https://github.com/agroezinger "agroezinger (7 commits)")

### Embed Badge

![Health badge](/badges/agroezinger-filament-navigation-enhanced/health.svg)

```
[![Health](https://phpackages.com/badges/agroezinger-filament-navigation-enhanced/health.svg)](https://phpackages.com/packages/agroezinger-filament-navigation-enhanced)
```

###  Alternatives

[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M26](/packages/ysfkaya-filament-phone-input)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

123177.8k1](/packages/stephenjude-filament-feature-flags)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16121.5k](/packages/backstage-mails)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.8k2](/packages/crumbls-layup)[eduardoribeirodev/filament-leaflet

Um widget de mapa para FilamentPHP.

2118.9k](/packages/eduardoribeirodev-filament-leaflet)[daacreators/creators-ticketing

A robust and dynamic ticketing system for Filament

293.8k](/packages/daacreators-creators-ticketing)

PHPackages © 2026

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