PHPackages                             bezhansalleh/filament-panel-switch - 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. bezhansalleh/filament-panel-switch

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

bezhansalleh/filament-panel-switch
==================================

Easily Switch between your Filament Panels

3.0.0(3mo ago)159323.5k—10%29[1 issues](https://github.com/bezhanSalleh/filament-panel-switch/issues)2MITBladePHP ^8.2CI passing

Since Aug 5Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/bezhanSalleh/filament-panel-switch)[ Packagist](https://packagist.org/packages/bezhansalleh/filament-panel-switch)[ Docs](https://github.com/bezhansalleh/filament-panel-switch)[ GitHub Sponsors](https://github.com/bezhanSalleh)[ RSS](/packages/bezhansalleh-filament-panel-switch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (2)

[](https://github.com/bezhansalleh/filament-panel-switch)[![Panel Switch](https://repository-images.githubusercontent.com/674460446/9c4530cf-420e-4745-a401-0be18d1dd09d "Panel Switch")](https://repository-images.githubusercontent.com/674460446/9c4530cf-420e-4745-a401-0be18d1dd09d)

 [ ![FILAMENT 4.x](https://camo.githubusercontent.com/13befbe0cffd101b2484ce1cdd985dabcddcbf1176d17a675674d53af99cfdbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46494c414d454e542d342e782d4542423330343f7374796c653d666f722d7468652d6261646765) ](https://filamentphp.com/docs/4.x/introduction/overview) [ ![FILAMENT 5.x](https://camo.githubusercontent.com/3ec960aa304b803da9f1192f01e82da976a3d220ea85931fec930003e0532c77/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46494c414d454e542d352e782d4542423330343f7374796c653d666f722d7468652d6261646765) ](https://filamentphp.com/docs/5.x/introduction/overview) [ ![Packagist](https://camo.githubusercontent.com/a5c16dd7eba047223e2b1c1dd4c24ecf33253c745ba33cdc5e396ea93516ee13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62657a68616e73616c6c65682f66696c616d656e742d70616e656c2d7377697463682e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374) ](https://packagist.org/packages/bezhansalleh/filament-panel-switch) [ ![Code Style Passing](https://camo.githubusercontent.com/44ced6449fd9d508de4c2b979f4c757699f26c48dd8a3ea498cd6a892f470d00/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f62657a68616e73616c6c65682f66696c616d656e742d70616e656c2d7377697463682f6669782d7068702d636f64652d7374796c696e672e796d6c3f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6162656c3d636f64652532307374796c65) ](https://github.com/bezhansalleh/filament-panel-switch/actions?query=workflow%3A)[ ![Downloads](https://camo.githubusercontent.com/718fde3dfab46329ade6342e3d723c6bd25468a8e0cb5cc7afc95b476ea55323/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62657a68616e73616c6c65682f66696c616d656e742d70616e656c2d7377697463682e7376673f7374796c653d666f722d7468652d6261646765) ](https://packagist.org/packages/bezhansalleh/filament-panel-switch)

Panel Switch
============

[](#panel-switch)

The Panel Switch Plugin for Filament offers a robust and customizable component for switching between panels in applications built with FilamentPHP.

[![Demo](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/modern-icon-demo.gif?raw=true "Modern Icon Demo")](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/modern-icon-demo.gif?raw=true)[![Demo](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/modern-image-demo.gif?raw=true "Modern Image Demo")](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/modern-image-demo.gif?raw=true)[![Demo](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/demo.gif?raw=true "Simple Demo")](https://raw.githubusercontent.com/bezhanSalleh/filament-panel-switch/master/art/demo.gif?raw=true)

Table Of Contents
-----------------

[](#table-of-contents)

- [Panel Switch](#panel-switch)
    - [Installation](#installation)
    - [Configuration](#configuration)
        - [Panel Access &amp; Navigation](#panel-access--navigation)
        - [Design or Style](#design-or-style)
        - [Labels](#labels)
        - [Icons](#icons)
        - [Sort Order](#sort-order)
        - [Placement](#placement)
        - [Full Example](#full-example)
    - [Changelog](#changelog)
    - [Contributing](#contributing)
    - [Security Vulnerabilities](#security-vulnerabilities)
    - [Credits](#credits)
    - [License](#license)

#### Compatibility

[](#compatibility)

Package VersionFilament Version[1.x](https://github.com/bezhanSalleh/filament-panel-switch/tree/1.x)[3.x](https://filamentphp.com/docs/3.x/panels/installation)[2.x](https://github.com/bezhanSalleh/filament-panel-switch/tree/2.x)[4.x](https://filamentphp.com/docs/4.x/introduction/overview) &amp; [5.x](https://filamentphp.com/docs/5.x/introduction/overview)3.x - current[4.x](https://filamentphp.com/docs/4.x/introduction/overview) &amp; [5.x](https://filamentphp.com/docs/5.x/introduction/overview)Installation
------------

[](#installation)

You can install the package via composer:

```
composer require bezhansalleh/filament-panel-switch
```

Important

The plugin follows Filament's theming rules. So, to use the plugin create a custom theme if you haven't already, and add the following line to your `theme.css` file:

```
@source '../../../../vendor/bezhansalleh/filament-panel-switch/resources/views/**/*.blade.php';
```

Now build your theme using:

```
npm run build
```

---

Upon installation, the Plugin seamlessly integrates with Filament without any further setup. Though the plugin works out-of-the-box, it's designed for customization. Delve into the Configuration section below for detailed customization options.

Configuration
-------------

[](#configuration)

Start your custom configuration using the `configureUsing` method in your service provider's boot method:

```
use BezhanSalleh\PanelSwitch\PanelSwitch;

PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    // Custom configurations go here
});
```

### Panel Access &amp; Navigation

[](#panel-access--navigation)

The panel switch is automatically visible when the authenticated user has access to two or more panels. Panel access is determined via the `canAccessPanel` method on your User model — no additional configuration needed. Panels the user cannot access are automatically hidden from the switch.

To further limit which panels appear in the switch, use the `panels()` method:

```
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch->panels([
        'admin',
        'dev',
        'app'
    ]);
});
```

The `panels()` method also accepts a closure that returns an array of panel ids. This is useful when you want to dynamically determine the panels that will be listed. The plugin will also validate the panels to ensure that they are valid filament panels. If any of the panels provided are invalid, the plugin will throw an `InvalidArgumentException`.

### Design or Style

[](#design-or-style)

The plugin supports two design styles:

- **Modern** (default) — Uses Filament's [Modal Blade component](https://filamentphp.com/docs/3.x/support/blade-components/modal). You can customize the modal heading, [width](https://filamentphp.com/docs/3.x/support/blade-components/modal#changing-the-modal-width), or use a slide-over:

    ```
    PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
        $panelSwitch
            ->modalHeading('Available Panels')
            ->modalWidth('sm')
            ->slideOver();
    });
    ```
- **Simple** — A dropdown list for switching panels directly:

    ```
    PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
        $panelSwitch->simple();
    });
    ```

For full control over the look and feel, you can publish the views and make your own adjustments:

```
php artisan vendor:publish --tag="filament-panel-switch-views"
```

### Labels

[](#labels)

Provide custom labels for each panel. The keys should be valid panel IDs, and values can be strings or translatable strings:

```
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch
        ->labels([
            'admin' => 'Custom Admin Label',
            'general_manager' => __('General Manager')
        ]);
});
```

### Icons

[](#icons)

Define icons for each panel using the `icons()` method. The keys should be valid panel IDs:

```
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch->icons([
        'admin' => 'heroicon-o-square-2-stack',
        'app' => 'heroicon-o-star',
    ]);
});
```

For images instead of icons, set the `asImage` parameter to `true`:

```
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch->icons([
        'admin' => 'https://example.com/admin.jpg',
        'app' => 'https://example.com/app.jpg',
    ], asImage: true);
});
```

Use `iconSize()` to customize the size (default `128px`). The value is multiplied by 4:

```
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch->iconSize(32); // 128px
});
```

### Sort Order

[](#sort-order)

By default panels are listed in registration order, or in the order provided via `panels()`. Use `sort()` to sort alphabetically:

```
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch
        ->panels(['admin', 'dev', 'app'])
        ->sort();         // ascending: ['admin', 'app', 'dev']
        // ->sort('desc') // descending: ['dev', 'app', 'admin']
});
```

### Placement

[](#placement)

By default the panel switch is rendered via the `panels::global-search.before` render hook. You can change this to any available Filament [Render Hook](https://filamentphp.com/docs/3.x/support/render-hooks#available-render-hooks):

```
PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch->renderHook('panels::global-search.after');
});
```

### Full Example

[](#full-example)

```
use BezhanSalleh\PanelSwitch\PanelSwitch;

PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch
        ->panels(['admin', 'app', 'dev'])
        ->heading('Available Panels')
        ->modalWidth('sm')
        ->slideOver()
        ->icons([
            'admin' => 'heroicon-o-square-2-stack',
            'app' => 'heroicon-o-star',
        ])
        ->iconSize(16)
        ->labels([
            'admin' => 'Admin Panel',
            'app' => 'SaaS Application'
        ]);

});
```

### Testing

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

If you want to contribute to this packages, you may want to test it in a real Filament project:

- Fork this repository to your GitHub account.
- Create a Filament app locally.
- Clone your fork in your Filament app's root directory.
- In the `/filament-panel-switch` directory, create a branch for your fix, e.g. `fix/error-message.`

Install the packages in your app's `composer.json:`

```
"require": {
    "bezhansalleh/filament-panel-switch": "dev-fix/error-message as main-dev",
},
"repositories": [
    {
        "type": "path",
        "url": "filament-panel-switch"
    }
]
```

Now, run composer update.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Bezhan Salleh](https://github.com/bezhanSalleh)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance81

Actively maintained with recent releases

Popularity54

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 70.4% 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 ~51 days

Recently: every ~43 days

Total

19

Last Release

100d ago

Major Versions

0.0.3 → 1.0.02023-09-19

1.x-dev → 2.0.02025-08-19

2.x-dev → 3.x-dev2026-02-08

PHP version history (2 changes)0.0.1PHP ^8.1

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/19da25a8d07a5911120a520529905f744c8d56bf5e15901916f245b1d329bf03?d=identicon)[bezhanSalleh](/maintainers/bezhanSalleh)

---

Top Contributors

[![bezhanSalleh](https://avatars.githubusercontent.com/u/10007504?v=4)](https://github.com/bezhanSalleh "bezhanSalleh (95 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![lucasgiovanny](https://avatars.githubusercontent.com/u/4853801?v=4)](https://github.com/lucasgiovanny "lucasgiovanny (4 commits)")[![pelmered](https://avatars.githubusercontent.com/u/680058?v=4)](https://github.com/pelmered "pelmered (4 commits)")[![gchaumont](https://avatars.githubusercontent.com/u/21203742?v=4)](https://github.com/gchaumont "gchaumont (3 commits)")[![zsp03](https://avatars.githubusercontent.com/u/112597617?v=4)](https://github.com/zsp03 "zsp03 (1 commits)")[![chengkangzai](https://avatars.githubusercontent.com/u/43839286?v=4)](https://github.com/chengkangzai "chengkangzai (1 commits)")[![ianlandsman](https://avatars.githubusercontent.com/u/53144?v=4)](https://github.com/ianlandsman "ianlandsman (1 commits)")[![ryanmortier](https://avatars.githubusercontent.com/u/2053960?v=4)](https://github.com/ryanmortier "ryanmortier (1 commits)")[![ThijmenKort](https://avatars.githubusercontent.com/u/101055765?v=4)](https://github.com/ThijmenKort "ThijmenKort (1 commits)")[![andrewdwallo](https://avatars.githubusercontent.com/u/104294090?v=4)](https://github.com/andrewdwallo "andrewdwallo (1 commits)")

---

Tags

filamentfilament-pluginfilamentphppanel-switchpanelsfilamentbezhanSallehpanel-switchfilament-panel-switchpanel-changerpanel-navigation

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/bezhansalleh-filament-panel-switch/health.svg)

```
[![Health](https://phpackages.com/badges/bezhansalleh-filament-panel-switch/health.svg)](https://phpackages.com/packages/bezhansalleh-filament-panel-switch)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[jibaymcs/filament-tour

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

12247.8k](/packages/jibaymcs-filament-tour)

PHPackages © 2026

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