PHPackages                             jacklove315/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. jacklove315/modal

ActiveLibrary

jacklove315/modal
=================

v1.0.10(2y ago)356.4kMITPHP

Since Sep 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jacklove315/modal)[ Packagist](https://packagist.org/packages/jacklove315/modal)[ RSS](/packages/jacklove315-modal/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)DependenciesVersions (12)Used By (0)

Modal
=====

[](#modal)

[![Total Downloads](https://camo.githubusercontent.com/1e53bed67108aa478db77c52169e2ab9207ffc0b112f3450dd4d431b032f50a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a61636b6c6f76653331352f6d6f64616c)](https://packagist.org/packages/jacklove315/modal)[![Latest Stable Version](https://camo.githubusercontent.com/e1ca17bcbc3e776ae063c57a0d53ed8c9223b3972cc8e4305041854ac061105d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61636b6c6f76653331352f6d6f64616c)](https://packagist.org/packages/jacklove315/modal)[![License](https://camo.githubusercontent.com/27db8c8575c267839e7f02956ed049e936c05b3678a2cb984bfc892d3b953941/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a61636b6c6f76653331352f6d6f64616c)](https://packagist.org/packages/jacklove315/modal)

Introduction
------------

[](#introduction)

Modal is a basic livewire modal package for livewire/filament apps. The package is based off wire-elements-modal.

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

[](#installation)

```
composer require jacklove315/modal
```

Publishing config
-----------------

[](#publishing-config)

If you need to change modal default functionality, you can do so by publishing the config and making the necessary changes

```
php artisan vendor:publish
```

Then in the console prompt select:

```
 › ● Provider: Jacklove315\Modal\ServiceProvider
```

The config is published to `config/jl-modal.php`

```
/*
|--------------------------------------------------------------------------
| Modal Component Defaults
|--------------------------------------------------------------------------
|
| Configure the default properties for a modal component.
|
| Supported modal_size;
| 'sm', 'md', 'lg'
*/
return [
    'component_defaults' => [
        'close_modal_on_click_away' => true,
        'close_modal_on_escape'     => false,
        'modal_size'                => 'md'
    ]
];
```

Usage
-----

[](#usage)

### Include the package in your application

[](#include-the-package-in-your-application)

In your app root file such as `app.blade.php` you can register the component so that its globally available across your app

```
@livewire('jl-modal')
```

### Register a livewire component as a modal

[](#register-a-livewire-component-as-a-modal)

You need to extend `ModalComponent` in any livewire component you wish to make a modal.

```
