- How do I install Livewire Confirm-Modal in a Laravel app?
- Run composer require marcorombach/livewire-confirm-modal, then add ./vendor/marcorombach/livewire-confirm-modal/resources/views/components/*.php to the Tailwind content array and rebuild assets. Include <x-livewire-confirm-modal/> in every layout where the directive will be used. Optionally publish the package view with php artisan vendor:publish --tag="livewire-confirm-modal-views".
- How does the wire:confirm-modal directive work with wire:click?
- You attach wire:confirm-modal="title|description" alongside a wire:click on the same element. The directive intercepts the pending wire:click, renders a Tailwind/Alpine modal, and only releases the action when the user clicks the continue button. The title and description are passed as a pipe-delimited string, so translated text containing a pipe needs an internal wrapper or escaping strategy.
- Does Livewire Confirm-Modal support wire:submit, wire:model, or wire:poll?
- The documented contract is wire:click only; 0.2.0 explicitly notes that scope, while 0.2.1 fixed multiple parameters and 0.2.4 fixed no-parameter calls. wire:submit, lazy wire:model updates, wire:poll actions, and plain form posts are outside the documented behavior and should be verified before use. Do not assume the directive gates every Livewire action just because it gates wire:click.
- Why is my wire:click not firing when I use wire:confirm-modal?
- The most likely cause is a missing <x-livewire-confirm-modal/> component in that layout. Without the host component, the click is intercepted, no modal renders, and the action never executes, with no console error or network call to diagnose it. Add the component to every layout where the directive fires and retest the click path.
- Why is Livewire Confirm-Modal unstyled in production?
- Tailwind purges the package's modal classes unless the vendor view path is included in your tailwind.config.js content array. Add ./vendor/marcorombach/livewire-confirm-modal/resources/views/components/*.php and run a production build. Verify on the production build itself, because the modal can look correct on the dev server while being unstyled after purge.
- How do I customize the Livewire Confirm-Modal view?
- Publish the package views with php artisan vendor:publish --tag="livewire-confirm-modal-views", then edit the published Blade file to match your design system. Be careful when changing Alpine directives, since the modal behavior depends on them. Once published, the view becomes your code and a fork may carry maintenance and accessibility remediation work.
- Is Livewire Confirm-Modal compatible with Laravel 13 and Livewire 4?
- The changelog includes a 0.2.7 bump for Laravel 13 and Livewire 4, along with earlier fixes for Alpine coexistence and Tailwind 4 opacity utilities. However, the package has a single maintainer, 3 stars, and a 0.2.x version line that signals no stability promise. Verify the exact version on your target Laravel and Livewire majors before committing.
- Is Livewire Confirm-Modal accessible, and does it trap focus or close on Escape?
- Accessibility is undocumented in the README: there are no ARIA, focus-trap, Escape-to-close, or focus-restore claims. Because this modal gates destructive actions, that exposure becomes your application's responsibility at ship time. If those behaviors are required, plan to fork or wrap the published view and test with keyboard and screen-reader flows.
- How can I test Livewire Confirm-Modal in a Laravel app?
- Test the integration at the browser level, because the package is presentation-layer code with no server-side state, migration, or request-lifecycle hook. Cover no-parameter and multiple-parameter wire:click calls, the missing host component failure mode, and a production asset build. Also verify that wire:submit, lazy wire:model updates, and wire:poll actions are not expected to be gated by this directive.
- What are the alternatives to Livewire Confirm-Modal and is it actively maintained?
- Alternatives include Livewire's native wire:confirm, a custom Tailwind/Alpine modal component, or an internal wrapper around this package that normalizes the title and description payload. Maintenance risk is the main concern: one maintainer, 3 stars, 0 dependents, and no downstream ecosystem pressure to track Livewire 4, Alpine 4, or Tailwind 5. Expect that a future framework major may require you to own a fork.