PHPackages                             sagor110090/livewire-modal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. sagor110090/livewire-modal

ActiveLibrary[Templating &amp; Views](/categories/templating)

sagor110090/livewire-modal
==========================

This Laravel Livewire package simplifies the implementation of dynamic, responsive modals in your web applications. With a focus on seamless integration and flexibility, this package allows developers to easily create and manage modals without the need for JavaScript or additional front-end dependencies. Featuring out-of-the-box support for multiple modal instances, dynamic content, and customizable design options, it’s perfect for crafting modern, interactive interfaces. Whether you need confirmation dialogs, form modals, or notification pop-ups, this package delivers a clean, reusable solution for your Livewire-powered applications.

1.1.0(1y ago)31622[1 issues](https://github.com/sagor110090/livewire-modal/issues)1MITPHPPHP ^7.4|^8.0|^8.1|^8.2

Since Aug 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sagor110090/livewire-modal)[ Packagist](https://packagist.org/packages/sagor110090/livewire-modal)[ Docs]()[ RSS](/packages/sagor110090-livewire-modal/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (1)

Laravel Livewire Modal Package
==============================

[](#laravel-livewire-modal-package)

[![Latest Version](https://camo.githubusercontent.com/b3d91eff8e87d935f48ac2a07028b1bd4b924def35648f8bd5927b04c666b0b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7361676f723131303039302f6c697665776972652d6d6f64616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sagor110090/livewire-modal)

A simple and flexible Laravel Livewire modal package that works seamlessly with any design framework like Bootstrap, Tailwind CSS, or even custom styles. This package allows you to quickly integrate modals into your Livewire projects without being tied to specific CSS libraries.

Features
--------

[](#features)

- **Framework-Agnostic**: Use with Bootstrap, Tailwind CSS, or custom designs.
- **Dynamic Modals**: Open and close modals using Livewire events.
- **Customizable**: Easily style your modals with your preferred CSS.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require sagor110090/livewire-modal
```

### Setup

[](#setup)

Add the following to your `app.blade.php` layout to enable modals throughout your application:

```

```

Include the required JavaScript and CSS files in your `resources/js/app.js`:

```
import '../../vendor/sagor110090/livewire-modal/resources/js/loader.js';
import '../../vendor/sagor110090/livewire-modal/resources/css/loader.css';
```

Usage
-----

[](#usage)

### Opening a Modal

[](#opening-a-modal)

To open a modal, you can dispatch a Livewire event from any button or action:

```

    Open Modal

```

- **component**: The name of the Livewire component you want to load.
- **data**: The data you want to pass to the component (e.g., user ID).

### Closing a Modal

[](#closing-a-modal)

To close a modal, simply dispatch the close event:

```

    Cancel

```

### Sample Livewire Component

[](#sample-livewire-component)

Here’s an example of a Livewire component you might use with this package:

```
