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

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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope