PHPackages                             mozhuilungdsuo/livewire-bootstrap-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mozhuilungdsuo/livewire-bootstrap-modal

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mozhuilungdsuo/livewire-bootstrap-modal
=======================================

Dynamic Laravel Livewire 3 Bootstrap modals.

v1.0.5(1y ago)104.5k1MITPHPCI passing

Since Sep 26Pushed 1y agoCompare

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

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

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

[](#laravel-livewire-modals)

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

**Warning:** This package is not backward compatible with Livewire 2.

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)
    - [Custom View](#custom-view)

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

[](#requirements)

- Bootstrap 5 must be installed via webpack first

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

[](#installation)

Require the package:

```
composer require mozhuilungdsuo/livewire-bootstrap-modal
```

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

```

```

Require `../../vendor/mozhuilungdsuo/livewire-bootstrap-modal/resources/js/modals` in your app javascript file:

```
import('@popperjs/core');
import '../../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js';
import '../../vendor/mozhuilungdsuo/livewire-bootstrap-modal/resources/js/modals.js';
```

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

```

### To call from a normal blade view

[](#to-call-from-a-normal-blade-view)

```

                            Click me to open modal

```

### Showing Modals

[](#showing-modals)

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

```

Click me

```

### Mount Parameters

[](#mount-parameters)

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

```

Click me

- Note 'backdrop':'static',message:'Are you sure?' are optional
```

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') }}

```

### 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->dispatch('hideModal');
}
```

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

[](#publishing-assets)

### Custom View

[](#custom-view)

Use your own modals view by publishing the package view:

```
php artisan vendor:publish --tag=livewire-bootstrap-modal:views
```

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance44

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.1% 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 ~104 days

Recently: every ~130 days

Total

6

Last Release

441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6372fbb59453de0c379e7e99663f75a624f87ae7136dbe57e857452d8e30fc8b?d=identicon)[mozhui](/maintainers/mozhui)

---

Top Contributors

[![mozhuilungdsuo](https://avatars.githubusercontent.com/u/33083654?v=4)](https://github.com/mozhuilungdsuo "mozhuilungdsuo (26 commits)")[![aliqasemzadeh](https://avatars.githubusercontent.com/u/26847446?v=4)](https://github.com/aliqasemzadeh "aliqasemzadeh (16 commits)")[![marispro](https://avatars.githubusercontent.com/u/5610414?v=4)](https://github.com/marispro "marispro (1 commits)")[![MDylan](https://avatars.githubusercontent.com/u/2527132?v=4)](https://github.com/MDylan "MDylan (1 commits)")

### Embed Badge

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

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

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4205.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

2381.5k10](/packages/marcorieser-statamic-livewire)[aerni/livewire-forms

A Statamic forms framework powered by Laravel Livewire

2912.8k](/packages/aerni-livewire-forms)[team-nifty-gmbh/tall-datatables

A package to create datatables using alpinejs, tailwind, livewire and laravel

1217.2k1](/packages/team-nifty-gmbh-tall-datatables)

PHPackages © 2026

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