PHPackages                             zloadmin/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. zloadmin/livewire-bootstrap-modal

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

zloadmin/livewire-bootstrap-modal
=================================

Dynamic Laravel Livewire Bootstrap modals.

11PHP

Since Apr 13Pushed 3y ago1 watchersCompare

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

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

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

[](#requirements)

- Bootstrap 5 must be installed via webpack first

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

[](#installation)

Require the package:

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

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

```

```

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

```
require('@popperjs/core');
require('bootstrap');
require('../../vendor/aliqasemzadeh/livewire-bootstrap-modal/resources/js/modals');
```

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)

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

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/194b91254dde8eb167b5edccc4e860dc8de9e59db8e5cecec7250ddd38651825?d=identicon)[zloadmin](/maintainers/zloadmin)

---

Top Contributors

[![zloadmin](https://avatars.githubusercontent.com/u/6871864?v=4)](https://github.com/zloadmin "zloadmin (3 commits)")

### Embed Badge

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

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

###  Alternatives

[laracademy/generators

This package will generate a Laravel Model based on your database table itself, filling in the required fields automatically.

355346.4k4](/packages/laracademy-generators)[beyondcode/laravel-vouchers

Allow users to redeem vouchers that are bound to models..

70763.4k2](/packages/beyondcode-laravel-vouchers)[firegento/magesetup2

MageSetup provides the necessary configuration (system config, tax, agreements, etc. for a national market.

123328.5k1](/packages/firegento-magesetup2)[sixlive/nova-text-copy-field

Laravel Nova text field with click to copy support

70708.2k2](/packages/sixlive-nova-text-copy-field)[happyr/message-serializer

Serialize classes the good way.

80491.3k](/packages/happyr-message-serializer)[percymamedy/laravel-dev-booter

Boost your Laravel app by registering Prod services only on Prod.

35320.7k1](/packages/percymamedy-laravel-dev-booter)

PHPackages © 2026

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