PHPackages                             passasooz/filament-tree-dropdown - 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. passasooz/filament-tree-dropdown

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

passasooz/filament-tree-dropdown
================================

A generic Filament custom dropdown component for tree structures (parent-child-grandchild).

v1.0.0(3mo ago)118MITBladePHP ^8.1

Since Apr 10Pushed 3mo agoCompare

[ Source](https://github.com/passasooz/filament-tree-dropdown)[ Packagist](https://packagist.org/packages/passasooz/filament-tree-dropdown)[ Docs](https://github.com/passasooz/filament-tree-dropdown)[ RSS](/packages/passasooz-filament-tree-dropdown/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Filament Tree Dropdown
======================

[](#filament-tree-dropdown)

A Filament component for tree-structured selection (parent → child → grandchild) with checkboxes. Supports single item selection, group selection and optional text search.

---

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

[](#installation)

```
composer require passasooz/filament-tree-dropdown
```

### Register the plugin in your Filament panel

[](#register-the-plugin-in-your-filament-panel)

In your `PanelProvider` (e.g. `app/Providers/Filament/AdminPanelProvider.php`), add the plugin inside the `panel()` method:

```
use Passasooz\FilamentTreeDropdown\FilamentTreeDropdownPlugin;

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

### Publish the view (optional)

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

To override the blade view in your project:

```
php artisan vendor:publish --tag="filament-tree-dropdown-views"
```

---

Usage
-----

[](#usage)

```
use Passasooz\FilamentTreeDropdown\Forms\Components\TreeDropdown;
```

### Fluent builder

[](#fluent-builder)

Use `group()` for group nodes and `item()` for leaf nodes. Methods are chainable and nesting levels are unlimited.

```
TreeDropdown::make('category')
    ->label('Category')
    ->group('Animals', function ($g) {
        $g->group('Mammals', function ($g) {
            $g->item('Dog', 'dog');
            $g->item('Cat', 'cat');
        });
        $g->group('Birds', function ($g) {
            $g->item('Stork', 'stork');
            $g->item('Parrot', 'parrot');
        });
    })
    ->group('Plants', function ($g) {
        $g->item('Rose', 'rose');
        $g->item('Oak', 'oak');
    })
    ->searchable()   // optional
```

### Raw array

[](#raw-array)

If your data is already structured (e.g. from a DB or API):

```
TreeDropdown::make('category')
    ->tree([
        [
            'label' => 'Animals',
            'children' => [
                ['label' => 'Dog', 'value' => 'dog'],
                ['label' => 'Cat', 'value' => 'cat'],
            ],
        ],
    ])
    ->searchable()
```

You can change the array keys if your data uses different names:

```
->labelKey('name')      // default: 'label'
->valueKey('id')        // default: 'value'
->childrenKey('items')  // default: 'children'
```

---

Options
-------

[](#options)

MethodDescription`->searchable()`Enables the search bar inside the dropdown`->searchable(false)`Disables search (default)`->label('...')`Field label and placeholder text### How search works

[](#how-search-works)

Search filters by **substring** on the item label (case-insensitive).

- Query `"stork"` → shows all items whose label contains `"stork"`
- Query `"sto"` → shows all items whose label contains `"sto"` (e.g. "Stork" is shown)
- Parent groups are shown automatically if at least one child matches
- Groups with no matching children are hidden

---

Selection behaviour
-------------------

[](#selection-behaviour)

- **Leaf node**: toggles the single value.
- **Group node**: selects/deselects all descendant leaf nodes.
    - Checkbox is indeterminate when only some children are selected.
- Groups can be expanded/collapsed with the arrow icon (only when search is inactive).

---

Development / customisation
---------------------------

[](#development--customisation)

- Source files are in `src/Forms/Components/`.
- The view is in `resources/views/tree-dropdown.blade.php`.
- Publish the view with `vendor:publish` to override it in your project.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance80

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

105d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7440944?v=4)[Francesco Passanante](/maintainers/passasooz)[@passasooz](https://github.com/passasooz)

---

Top Contributors

[![passasooz](https://avatars.githubusercontent.com/u/7440944?v=4)](https://github.com/passasooz "passasooz (2 commits)")

---

Tags

laraveltreecomponentformdropdownselectfilamentfilamentphp

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/passasooz-filament-tree-dropdown/health.svg)

```
[![Health](https://phpackages.com/badges/passasooz-filament-tree-dropdown/health.svg)](https://phpackages.com/packages/passasooz-filament-tree-dropdown)
```

###  Alternatives

[dotswan/filament-map-picker

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

128192.3k3](/packages/dotswan-filament-map-picker)[jibaymcs/filament-tour

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

12453.6k](/packages/jibaymcs-filament-tour)[tomatophp/filament-icons

Picker &amp; Table Column &amp; Icons Provider for FilamentPHP

38115.1k13](/packages/tomatophp-filament-icons)[guava/filament-modal-relation-managers

Allows you to embed relation managers inside filament modals.

7981.8k7](/packages/guava-filament-modal-relation-managers)[wsmallnews/filament-nestedset

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

197.8k19](/packages/wsmallnews-filament-nestedset)[cocosmos/filament-quick-add-select

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

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

PHPackages © 2026

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