Livewire Embeddable Components In Static HTML Files
Livewire package allows embedding components in static HTML or any website using @wire-elements/wire-extender. Use #[Embeddable] attribute & wire-extender.js for seamless integration.
Laravel developer Philo Hermans is cooking up the wire-extender Livewire package that allows you to embed a component on any website or even a static HTML file. This package is still at an early stage, but I thought it would be as good a time as any to share!
The gist of this package is using the Embeddable attribute in a Livewire component along with a wire-extender.js file that ships with this package:
use WireElements\WireExtender\Attributes\Embeddable; #[Embeddable]class Counter extends Component {}
After creating the component like a normal Livewire component and following the documentati...