PHPackages                             wezlo/filament-search-spotlight - 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. [Search &amp; Filtering](/categories/search)
4. /
5. wezlo/filament-search-spotlight

ActiveLibrary[Search &amp; Filtering](/categories/search)

wezlo/filament-search-spotlight
===============================

Full-screen Spotlight / command-palette style search overlay for Filament panels. Aggregates records, pages, and custom actions with keyboard navigation and a preview pane.

1.0.0(2mo ago)1929↑19%1MITPHPPHP ^8.2

Since Apr 10Pushed 1mo agoCompare

[ Source](https://github.com/mustafakhaleddev/filament-search-spotlight)[ Packagist](https://packagist.org/packages/wezlo/filament-search-spotlight)[ RSS](/packages/wezlo-filament-search-spotlight/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (5)Versions (2)Used By (0)

Filament Search Spotlight
=========================

[](#filament-search-spotlight)

A full-screen Spotlight / command-palette search overlay for Filament panels. Opens on ⌘K (configurable), aggregates results from multiple categories (records, resources, pages, actions, plus recent/pinned from localStorage), and composes Filament's built-in `GlobalSearchProvider` — every resource that already implements `getGloballySearchableAttributes()` shows up automatically.

Features
--------

[](#features)

- ⌘K / Ctrl+K overlay, single-column centered layout
- Categories out of the box:
    - **Records** — delegates to the panel's `GlobalSearchProvider`, attaches the resource's navigation icon to each result
    - **Resources** — jump to any resource's index page by its plural label
    - **Pages** — fuzzy-matches standalone panel pages by navigation label
    - **Actions** — fluent `SpotlightAction` registry + auto-generated "Create {Resource}" entries for resources with a `create` page
- Recent &amp; pinned items persisted in browser `localStorage` (no DB, no migrations)
- Keyboard navigation: arrow keys wrap, enter activates, escape closes
- Single-click (or enter) to activate; hover syncs the highlighted row
- Fully configurable per panel and globally via config file

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

[](#installation)

```
composer require wezlo/filament-search-spotlight
```

Register the plugin on your panel:

```
use Wezlo\FilamentSearchSpotlight\FilamentSearchSpotlightPlugin;

->plugins([
    FilamentSearchSpotlightPlugin::make(),
])
```

That's it — press ⌘K inside any panel page.

If your panel uses a compiled Tailwind theme (e.g. `resources/css/filament/admin/theme.css`), make sure it scans the package's views so utility classes are generated:

```
@source '../../../../vendor/wezlo/filament-search-spotlight/resources/views/**/*';
```

Then rebuild with `npm run build` / `npm run dev`.

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

[](#configuration)

Publish the config file (optional):

```
php artisan vendor:publish --tag=filament-search-spotlight-config
```

Every option is settable fluently on the plugin or in `config/filament-search-spotlight.php`. Fluent calls win over config values.

### Fluent API

[](#fluent-api)

```
FilamentSearchSpotlightPlugin::make()
    // Keyboard binding (Mousetrap syntax). Accepts a string or an array.
    ->keyBinding('mod+k')

    // Placeholder text for the search input.
    ->placeholder('Jump to…')

    // Any valid CSS width (rem, px, vw, %, …). Applied as an inline style so
    // it is not subject to Tailwind purging.
    ->maxWidth('36rem')

    // Max results per category.
    ->resultLimitPerCategory(8)

    // Toggle built-in categories (all default on).
    ->records()           // records(false) to hide
    ->resources()
    ->pages()
    ->actionsEnabled()

    // Or completely override the category list with your own.
    ->categories([MyCustomCategory::class])

    // Exclude resources from both the Records and Resources categories
    // (also prevents their auto-generated Create action).
    ->excludeResources([AuditLogResource::class])

    // Register actions scoped to this panel (on top of the global registry).
    ->action(
        SpotlightAction::make('log-out')
            ->label('Log out')
            ->icon('heroicon-o-arrow-right-on-rectangle')
            ->keywords(['signout', 'quit'])
            ->group('Account')
            ->url(fn () => filament()->getLogoutUrl()),
    )
    ->actions([
        SpotlightAction::make('impersonate')->label('Impersonate user')->url('/impersonate'),
    ])

    // Hide actions registered in the global registry by name. Plugin-scoped
    // actions with the same name automatically override their global twin,
    // so overrideActions() is only needed when you want to hide without
    // replacing.
    ->overrideActions(['legacy-action'])

    // Skip the auto-generated "Create {Resource}" entries entirely.
    ->disableCreateActions()

    // Remove Filament's in-topbar global search input in favor of the overlay.
    ->disableDefaultGlobalSearch();
```

### Config file

[](#config-file)

```
return [
    'key_binding' => 'mod+k',

    'result_limit_per_category' => 8,

    'excluded_resources' => [],

    'disable_default_global_search' => false,

    'categories' => [
        'records' => true,
        'resources' => true,
        'pages' => true,
        'actions' => true,
    ],

    'disable_create_actions' => false,

    'placeholder' => 'Search…',

    'max_width' => '42rem',

    'override_actions' => [],
];
```

Actions
-------

[](#actions)

### Fluent `SpotlightAction`

[](#fluent-spotlightaction)

```
use Wezlo\FilamentSearchSpotlight\Actions\SpotlightAction;

SpotlightAction::make('log-out')
    ->label('Log out')
    ->icon('heroicon-o-arrow-right-on-rectangle')
    ->keywords(['signout', 'quit'])
    ->group('Account')
    ->url(fn () => filament()->getLogoutUrl());
```

### Global registry

[](#global-registry)

Call `->register()` to add an action to the app-wide registry (available to every panel using the plugin). Typically done in `AppServiceProvider::boot()`:

```
public function boot(): void
{
    SpotlightAction::make('clear-cache')
        ->label('Clear application cache')
        ->keywords(['flush', 'cache'])
        ->url(fn () => route('admin.cache.clear'))
        ->register();
}
```

### Plugin-scoped actions

[](#plugin-scoped-actions)

Pass actions directly to the plugin when you only want them on a specific panel, or when you want to override a registry action with the same name:

```
FilamentSearchSpotlightPlugin::make()
    ->action(SpotlightAction::make('log-out')->label('Custom Log out')->url('/custom-logout'));
```

A plugin-scoped action with the same `name` as a registry action automatically replaces the registry one in the overlay.

### Auto-discovered "Create X" actions

[](#auto-discovered-create-x-actions)

Any resource exposing a `create` page is automatically surfaced as a `Create {Label}` action. Disable with `->disableCreateActions()` or the `disable_create_actions` config value.

Adding a custom category
------------------------

[](#adding-a-custom-category)

Categories are tiny — implement the `Category` contract:

```
use Wezlo\FilamentSearchSpotlight\Categories\Category;
use Wezlo\FilamentSearchSpotlight\Data\SpotlightResult;

class SettingsCategory implements Category
{
    public function key(): string { return 'settings'; }

    public function label(): string { return 'Settings'; }

    public function search(string $query, int $limit): array
    {
        return collect($this->all())
            ->filter(fn ($item) => str_contains(strtolower($item['label']), strtolower($query)))
            ->take($limit)
            ->map(fn ($item) => new SpotlightResult(
                id: 'settings:'.$item['key'],
                category: 'settings',
                title: $item['label'],
                subtitle: null,
                icon: 'heroicon-o-cog-6-tooth',
                url: $item['url'],
            ))
            ->values()
            ->all();
    }

    protected function all(): array { /* … */ }
}
```

Register it by overriding the default category list:

```
FilamentSearchSpotlightPlugin::make()
    ->categories([
        \Wezlo\FilamentSearchSpotlight\Categories\RecordsCategory::class,
        \Wezlo\FilamentSearchSpotlight\Categories\ResourcesCategory::class,
        SettingsCategory::class,
    ]);
```

Recent &amp; pinned
-------------------

[](#recent--pinned)

Both lists are owned client-side in `localStorage` under `spotlight.recent` and `spotlight.pinned`. Activating a result appends it to recent (deduped, max 10). Nothing is persisted server-side, so there is no database migration to run and no state to clear on logout.

Tests
-----

[](#tests)

Feature tests live alongside the consumer app under `tests/Feature/FilamentSearchSpotlight/`:

```
php artisan test --compact tests/Feature/FilamentSearchSpotlight
```

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance88

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

60d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25182746?v=4)[Mustafa Khaled](/maintainers/mustafakhaleddev)[@mustafakhaleddev](https://github.com/mustafakhaleddev)

---

Top Contributors

[![mustafakhaleddev](https://avatars.githubusercontent.com/u/25182746?v=4)](https://github.com/mustafakhaleddev "mustafakhaleddev (2 commits)")[![Hamoi1](https://avatars.githubusercontent.com/u/92602172?v=4)](https://github.com/Hamoi1 "Hamoi1 (1 commits)")

---

Tags

searchlaravelfilamentspotlightcommand-palette

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/wezlo-filament-search-spotlight/health.svg)

```
[![Health](https://phpackages.com/badges/wezlo-filament-search-spotlight/health.svg)](https://phpackages.com/packages/wezlo-filament-search-spotlight)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17758.9k2](/packages/stephenjude-filament-jetstream)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84192.9k7](/packages/stephenjude-filament-two-factor-authentication)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6643.3k](/packages/marcelweidum-filament-passkeys)[jibaymcs/filament-tour

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

12351.0k](/packages/jibaymcs-filament-tour)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2210.5k](/packages/mradder-filament-logger)

PHPackages © 2026

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