wire-elements/spotlight
Livewire Spotlight adds an Alfred-like command palette to Laravel. Open with configurable keyboard shortcuts or toggle via events, then search, navigate, and run actions from a sleek input bar. Easy Composer install and Livewire directive.
Enhancing User Experience (UX) for Power Users
Accelerating Developer Velocity
Reducing Cognitive Load
A/B Testing and Feature Flags
Look Elsewhere If:
resources/views) before adoption.Consider Alternatives If:
vendor:publish --tag=livewire-ui-spotlight-translations.*"Spotlight is a productivity multiplier for our power users—like giving them a keyboard-driven superpower. For example, in [Product X], users spend 15 minutes/day navigating menus to complete tasks. With Spotlight, we can cut that to 2 minutes by letting them search and execute actions via shortcuts (e.g., 'Create report for Q2' or 'Navigate to billing').
ROI:
- Reduces support tickets by surfacing hidden features (e.g., 'How do I reset my password?' becomes a searchable command).
- Increases retention for SaaS products by delighting advanced users.
- Low dev cost: Leverages existing Laravel/Livewire stack; no new backend infrastructure.
Risk: Minimal—we can A/B test with a subset of users and measure adoption via shortcut usage analytics."*
*"Spotlight is a Livewire component that adds Alfred/Spotlight-like search to Laravel apps. Key benefits:
- Plug-and-play: Install via Composer, add
@livewire('livewire-ui-spotlight')to your layout, and define custom commands.- Extensible: Build commands with dependencies (e.g., 'Create user' → prompts for team + name) using Laravel’s DI container.
- Customizable: Override shortcuts, UI, and translations via config files.
- Performance: Client-side fuzzy search (Fuse.js) for instant results; no API calls until command execution.
Implementation Path:
- Phase 1: Integrate core Spotlight + 3–5 critical commands (e.g., Logout, Search Users, Navigate to Dashboard).
- Phase 2: Add dependency-driven commands (e.g., 'Create Invoice' → prompts for client + amount).
- Phase 3: Extend with analytics (track command usage) and A/B testing.
Dependencies:
- Livewire 2/3.
- Alpine.js (auto-included if using Livewire 2).
- Tailwind CSS (optional; package includes fallback CSS).
Example Command:
class SearchUser extends SpotlightCommand { protected $name = 'Search User'; protected $description = 'Find a user by name or email'; public function execute(Spotlight $spotlight) { $spotlight->redirect('/users?search=' . request('query')); } } ```"*
*"Spotlight transforms discovery and execution into a single action:
- Before: Users hunt through menus (e.g., Dashboard → Reports → Q2 → Export).
- After: They type 'export q2 report' and hit Enter.
Key UX Wins:
- Reduces cognitive load: No more memorizing menu hierarchies.
- Surfaces hidden features: Commands can include 'less obvious' actions (e.g., 'Purge cache').
- Consistent UI: Uses a familiar modal pattern (like macOS Spotlight).
Design Considerations:
- Ensure the placeholder text (e.g., 'What do you want to do?') aligns with your app’s tone.
- Test keyboard shortcuts (CTRL/K) for accessibility and conflict with existing shortcuts.
- Customize the command list styling to match your design system (publish views with
vendor:publish)."*
How can I help you explore Laravel packages today?