Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Livewire Confirm Modal

Livewire Confirm Modal Laravel Package

marcorombach/livewire-confirm-modal

A Livewire directive that shows a styled confirm modal instead of the browser's native confirm() dialog, so confirmations look consistent across browsers. Supports custom titles and descriptions via wire:confirm-modal, works with wire:click, and the view is publishable for your own Tailwind styling.

View on GitHub
Deep Wiki
Context7

Livewire Confirm-Modal replaces JavaScript's native confirm() with a styled, reusable modal for Livewire actions. Add wire:confirm-modal="title|description" to any element, and the modal appears on click—holding back wire:click until the user confirms.

Styled with TailwindCSS (inspired by Pines UI), it delivers a consistent look across all browsers and can be fully customized.

  • Drop-in directive: works alongside existing wire:click handlers
  • Consistent cross-browser styling instead of native dialogs
  • Publishable Blade view for custom themes and layouts
  • TailwindCSS-ready with simple config inclusion
  • Lightweight setup via <x-livewire-confirm-modal/>
Frequently asked questions about Livewire Confirm Modal
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.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle