PHPackages                             alenadashko/filament-dropdown-checkbox-list - 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. [Templating &amp; Views](/categories/templating)
4. /
5. alenadashko/filament-dropdown-checkbox-list

ActiveLibrary[Templating &amp; Views](/categories/templating)

alenadashko/filament-dropdown-checkbox-list
===========================================

A searchable dropdown CheckboxList component for Filament v3

v1.0.9(1mo ago)031MITBladePHP ^8.1

Since May 25Pushed 1mo agoCompare

[ Source](https://github.com/Alena009/filament-dropdown-checkbox-list)[ Packagist](https://packagist.org/packages/alenadashko/filament-dropdown-checkbox-list)[ RSS](/packages/alenadashko-filament-dropdown-checkbox-list/feed)WikiDiscussions main Synced 3w ago

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

Filament Dropdown Checkbox List
===============================

[](#filament-dropdown-checkbox-list)

A searchable dropdown CheckboxList component for Filament v3.

Wraps a standard `CheckboxList` inside a dropdown trigger with badge-style selected value display, server-side search support, and persistent selection state.

Features
--------

[](#features)

- Dropdown trigger showing selected values as badges (up to 3), then a counter
- Server-side search via a callback
- Client-side search (default, no callback needed)
- Selected options always visible in the list regardless of search query
- Grouped options (nestable to any depth) with a per-group checkbox that toggles all of its descendants, with collapsible groups
- Bulk toggle (select all / deselect all) scoped to visible options
- Options limit to prevent rendering thousands of items
- Full dark mode support
- Translatable strings (English and Polish included)

Requirements
------------

[](#requirements)

- PHP 8.1+
- Filament 3.x

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

[](#installation)

```
composer require alenadashko/filament-dropdown-checkbox-list
```

Usage
-----

[](#usage)

### Client-side search (simple)

[](#client-side-search-simple)

Options are loaded once, filtering happens in the browser:

```
use AlenaDashko\DropdownCheckboxList\Components\DropdownCheckboxList;

DropdownCheckboxList::make('tags')
    ->options(Tag::pluck('name', 'id'))
```

### Server-side search

[](#server-side-search)

Options are loaded from a callback on each search query. Use this for large datasets:

```
DropdownCheckboxList::make('products')
    ->searchUsing(fn (string $search) => Product::where('name', 'like', "%{$search}%")
        ->limit(50)
        ->pluck('name', 'id')
        ->toArray()
    )
    ->selectedOptionLabelsUsing(fn (array $values) => Product::whereIn('id', $values)
        ->pluck('name', 'id')
        ->toArray()
    )
```

`selectedOptionLabelsUsing` is required when using `searchUsing` — it fetches labels for already-selected values so they remain visible when the search query changes.

### Grouped options

[](#grouped-options)

Render options split into groups. Each group has its own checkbox that selects or deselects all of its child options at once (with an indeterminate state when only some children are selected):

```
DropdownCheckboxList::make('permissions')
    ->groupedOptions([
        'Users' => [
            'users.view'   => 'View users',
            'users.create' => 'Create users',
            'users.delete' => 'Delete users',
        ],
        'Posts' => [
            'posts.view'   => 'View posts',
            'posts.create' => 'Create posts',
        ],
    ])
```

The state is still a flat array of the selected child values (e.g. `['users.view', 'posts.create']`) — the group checkbox is only a UI control. Search matches both child labels and group labels (typing a group name reveals the whole group). Grouped options are intended for the default client-side mode and ignore `optionsLimit`.

#### Nested groups

[](#nested-groups)

Groups can be nested to any depth. A node whose value is an **array** is a (sub)group; a node whose value is a **scalar** is a selectable option. Every group, at every level, gets its own checkbox that toggles all of its descendant options and its own collapse toggle (collapsing a parent hides the whole subtree):

```
DropdownCheckboxList::make('categories')
    ->groupedOptions([
        'Goods' => [
            'Electronics' => [
                'phones'  => 'Phones',
                'laptops' => 'Laptops',
            ],
            'Clothing' => [
                'shirts' => 'Shirts',
                'shoes'  => 'Shoes',
            ],
        ],
        'Services' => [
            'Repair' => [
                'car-repair'   => 'Car repair',
                'phone-repair' => 'Phone repair',
            ],
        ],
    ])
```

Search matches leaf labels as well as any ancestor group/subgroup name, and reveals the matching branch.

Groups are collapsible: clicking a group's title (or its chevron) toggles its child list, while the group checkbox keeps toggling the selection. An active search query temporarily expands every matching group. To render groups collapsed initially:

```
DropdownCheckboxList::make('permissions')
    ->groupedOptions([...])
    ->collapseGroupsByDefault()
```

#### Server-side searched groups

[](#server-side-searched-groups)

For large, database-backed grouped datasets, use `searchGroupedOptionsUsing()`. The callback receives the current `$search` string and returns the grouped structure on each query (filtering happens on the server):

```
DropdownCheckboxList::make('permissions')
    ->searchGroupedOptionsUsing(fn (string $search) => Permission::query()
        ->when($search, fn ($q) => $q->where('label', 'like', "%{$search}%"))
        ->get()
        ->groupBy('group')
        ->map(fn ($items) => $items->pluck('label', 'id')->all())
        ->all()
    )
    ->selectedOptionLabelsUsing(fn (array $values) => Permission::whereIn('id', $values)
        ->pluck('label', 'id')
        ->toArray()
    )
```

As with flat server-side search, `selectedOptionLabelsUsing()` keeps labels for already-selected values that fall outside the current search results.

### Using in table filters

[](#using-in-table-filters)

Inside a table filter form, call `->live()` so the table re-queries immediately when the selection changes. Without it, the component's state is only synced into Livewire's data bag and the filter won't apply until the next request (e.g. a page reload):

```
use AlenaDashko\DropdownCheckboxList\Components\DropdownCheckboxList;
use Filament\Tables\Filters\Filter;
use Illuminate\Database\Eloquent\Builder;

Filter::make('subdepartments')
    ->form([
        DropdownCheckboxList::make('subdepartments')
            ->live()
            ->groupedOptions(/* ... */)
            ->searchable(),
    ])
    ->query(fn (Builder $query, array $data): Builder => $query->when(
        $data['subdepartments'] ?? null,
        fn (Builder $query, $value): Builder => $query->whereIn('subdepartment', $value),
    ))
```

### Options limit

[](#options-limit)

Prevents rendering too many options at once (default: 50):

```
DropdownCheckboxList::make('categories')
    ->options(Category::pluck('name', 'id'))
    ->optionsLimit(100)
```

Isolated search state (optional)
--------------------------------

[](#isolated-search-state-optional)

By default the component stores search state in a Livewire property named `{statePath}_search`. If your Livewire component uses table filters and you want to prevent the search from interfering with them, add the `HasDropdownSearch` trait:

```
use AlenaDashko\DropdownCheckboxList\Concerns\HasDropdownSearch;

class MyListResource extends Component
{
    use HasDropdownSearch;
}
```

This stores search state in a dedicated `filterSearches` array instead.

Publishing assets
-----------------

[](#publishing-assets)

Publish views to customise the template:

```
php artisan vendor:publish --tag=dropdown-checkbox-list-views
```

Publish translations:

```
php artisan vendor:publish --tag=dropdown-checkbox-list-lang
```

Adding translations
-------------------

[](#adding-translations)

After publishing, add a new language file at:

```
lang/vendor/dropdown-checkbox-list/{locale}/messages.php

```

```
return [
    'placeholder'    => 'Select...',
    'selected_count' => 'selected',
    'no_results'     => 'No results found',
    'select_all'     => 'Select all',
    'deselect_all'   => 'Deselect all',
];
```

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Total

10

Last Release

38d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b725004d9281a8dc195a21fb6b7d4d2291a466beeab18c9c2f927fed2313346?d=identicon)[AlenaDashko](/maintainers/AlenaDashko)

---

Top Contributors

[![Alena009](https://avatars.githubusercontent.com/u/21222126?v=4)](https://github.com/Alena009 "Alena009 (8 commits)")

---

Tags

laravelcomponentformdropdowncheckboxfilament

### Embed Badge

![Health badge](/badges/alenadashko-filament-dropdown-checkbox-list/health.svg)

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

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)[andreia/filament-nord-theme

A minimalist Arctic Nord theme for FilamentPHP

13843.4k2](/packages/andreia-filament-nord-theme)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16121.5k](/packages/backstage-mails)[filafly/brisk

A simple, friendly theme for Filament.

2217.7k2](/packages/filafly-brisk)

PHPackages © 2026

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