The new Popover component in Livewire/Flux 2.2.1 is indeed mentioned in the documentation, but as of version 2.2.1, it is a Pro-only component. That means it is only available if you have purchased and installed the Flux Pro package.
Why you see the error:
If you try to use <x-flux::popover> without Flux Pro installed, you'll get the error:
Unable to locate a class or view for component [flux::popover]
Why it doesn't show up with flux:publish:
The artisan flux:publish command only lists components available in the open-source (free) version. Pro components are not included unless you have the Pro package.
How to use the Popover component:
-
Purchase Flux Pro:
You need to have an active Flux Pro subscription.
https://laravel-livewire.com/pro -
Install Flux Pro:
Follow the installation instructions provided after purchase. Typically, you'll add a private repository to yourcomposer.jsonand run:composer require livewire/flux-pro -
Publish Pro components (if needed):
After installing, you can run:php artisan flux:publishNow, you should see the Popover component in the list.
-
Use the Popover component in your Blade files:
<x-flux::popover> <!-- Your popover content here --> </x-flux::popover>
Summary:
- The Popover component is Pro-only.
- You need to purchase and install Flux Pro to use it.
- It won’t show up or work in the free version.
Reference:
Flux Pro Documentation
If you have Flux Pro installed and still see this error, double-check your installation and that your composer.lock contains the livewire/flux-pro package.