Download the PHP package wezlo/filament-search-spotlight without Composer
On this page you can find all versions of the php package wezlo/filament-search-spotlight. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wezlo/filament-search-spotlight
More information about wezlo/filament-search-spotlight
Files in wezlo/filament-search-spotlight
Package filament-search-spotlight
Short Description Full-screen Spotlight / command-palette style search overlay for Filament panels. Aggregates records, pages, and custom actions with keyboard navigation and a preview pane.
License MIT
Informations about the package 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
- ⌘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
SpotlightActionregistry + auto-generated "Create {Resource}" entries for resources with acreatepage
- Records — delegates to the panel's
- Recent & 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
Register the plugin on your panel:
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:
Then rebuild with npm run build / npm run dev.
Configuration
Publish the config file (optional):
Every option is settable fluently on the plugin or in
config/filament-search-spotlight.php. Fluent calls win over config values.
Fluent API
Config file
Actions
Fluent SpotlightAction
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():
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:
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
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
Categories are tiny — implement the Category contract:
Register it by overriding the default category list:
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
Feature tests live alongside the consumer app under
tests/Feature/FilamentSearchSpotlight/:
All versions of filament-search-spotlight with dependencies
filament/filament Version ^4.0 || ^5.0
spatie/laravel-package-tools Version ^1.0