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 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

Latest Version on Packagist Total Downloads

This is a simple package aiming to provide a Livewire directive like wire:confirm but without using the default javascript confirm() function. This is useful if you need the same style for the confirm box across different browsers. It's also possible to apply your own style by changing the view.

By default this package uses TailwindCSS to style the modal. The look of the modal was inspired by the components of Pines UI.

alt text

Installation

You can install the package via composer:

composer require marcorombach/livewire-confirm-modal

You need to add the following to your tailwind.config.js

"./vendor/marcorombach/livewire-confirm-modal/resources/views/components/*.php"

It should look something like this:

content: [
    "./resources/**/*.blade.php",
    "./resources/**/*.js",
    ...
    "./vendor/marcorombach/livewire-confirm-modal/resources/views/components/*.php",
] 

To include the necessary scripts and the modal itself, make sure this is present in all your views that should use wire:confirm-modal

<x-livewire-confirm-modal/>

Optionally, you can publish the view using

php artisan vendor:publish --tag="livewire-confirm-modal-views"

You should be careful changing the view, especially when touching alpine directives.

Usage

<button wire:confirm-modal="title|description" wire:click="doSomething(1,2)">
    Test
</button>

Replace title and description with what you want the confirm modal to display. Now a modal is shown everytime the button is clicked. It will prevent wire:click from executing until the continue button in the modal is clicked.

Credits

License

The MIT License (MIT). Please see License File for more information.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin