PHPackages                             luanardev/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. [Framework](/categories/framework)
4. /
5. luanardev/livewire-modal

ActiveLibrary[Framework](/categories/framework)

luanardev/livewire-modal
========================

Laravel Livewire Modal

v1.1.0(3y ago)119MITPHP

Since May 7Pushed 3y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Laravel Livewire Modals
=======================

[](#laravel-livewire-modals)

This package allows you to dynamically show your Laravel Livewire components inside Bootstrap modals.

Documentation
-------------

[](#documentation)

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Modal Views](#modal-views)
    - [Showing Modals](#showing-modals)
    - [Mount Parameters](#mount-parameters)
    - [Hiding Modals](#hiding-modals)
    - [Emitting Events](#emitting-events)
- [Publishing Assets](#publishing-assets)
    - \[JavaScript\] (#javascript)
    - [Custom View](#custom-view)

Requirements
------------

[](#requirements)

- Bootstrap 4 or 5 must be installed via webpack first

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

[](#installation)

Require the package:

```
composer require luanardev/livewire-modal
```

Add the `livewire:modals` component to your app layout view:

```
@livewireModal
@livewireModalScript
@livewireScripts

```

Usage
-----

[](#usage)

### Modal Views

[](#modal-views)

Make a Livewire component you want to show as a modal. The view for this component must use the Bootstrap `modal-dialog` container:

```

            Modal title

            Modal body text goes here.

            Close
            Save changes

```

### Showing Modals

[](#showing-modals)

Show a modal by emitting the `showModal` event with the component alias:

```

    {{ __('Update Profile') }}

```

### Mount Parameters

[](#mount-parameters)

Pass parameters to the component `mount` method after the alias:

```

    {{ __('Update User #' . $user->id) }}

```

The component `mount` method for the example above would look like this:

```
namespace App\Http\Livewire\Users;

use App\Models\User;
use Livewire\Component;

class Update extends Component
{
    public $user;

    public function mount(User $user)
    {
        $this->user = $user;
    }

    public function render()
    {
        return view('users.update');
    }
}
```

### Hiding Modals

[](#hiding-modals)

Hide the currently open modal by emitting the `hideModal` event:

```

    {{ __('Close') }}

```

Or by using the Bootstrap `data-bs-dismiss` attribute:

```

    {{ __('Close') }}

```

### Emitting Events

[](#emitting-events)

You can emit events inside your views:

```

    {{ __('Close') }}

```

Or inside your components, just like any normal Livewire event:

```
public function save()
{
    $this->validate();

    // save the record

    $this->emit('hideModal');
}
```

Publishing Assets
-----------------

[](#publishing-assets)

### JavaScript

[](#javascript)

```
php artisan vendor:publish --tag=livewire-modal:scripts
```

### Custom View

[](#custom-view)

Use your own modals view by publishing the package view:

```
php artisan vendor:publish --tag=livewire-modals:views
```

Now edit the view file inside `resources/views/vendor/livewire-modal`. The package will use this view to render the component.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~280 days

Total

2

Last Release

1184d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d37087b4f12380420bf063e346a6fa05fe10af2a029388ae9a957459d658297?d=identicon)[luanardev](/maintainers/luanardev)

---

Top Contributors

[![briansimpo](https://avatars.githubusercontent.com/u/23210501?v=4)](https://github.com/briansimpo "briansimpo (1 commits)")[![luanardev](https://avatars.githubusercontent.com/u/90185393?v=4)](https://github.com/luanardev "luanardev (1 commits)")

### Embed Badge

![Health badge](/badges/luanardev-livewire-modal/health.svg)

```
[![Health](https://phpackages.com/badges/luanardev-livewire-modal/health.svg)](https://phpackages.com/packages/luanardev-livewire-modal)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[mhmiton/laravel-modules-livewire

Using Laravel Livewire in Laravel Modules package with automatically registered livewire components for every modules.

236409.6k9](/packages/mhmiton-laravel-modules-livewire)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[raugadh/fila-starter

Laravel Filament Starter.

614.9k](/packages/raugadh-fila-starter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
