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

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

mrshanebarron/modal
===================

Modal dialog component for Laravel - supports Livewire and Vue

v1.0.3(4mo ago)013MITVuePHP ^8.1

Since Dec 14Pushed 4mo agoCompare

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

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

Modal
=====

[](#modal)

A flexible, accessible modal dialog component for Laravel applications. Features smooth animations, multiple sizes, and customizable behavior. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/modal
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```
Open Modal

    Modal content goes here.

```

### With Footer Actions

[](#with-footer-actions)

```

    Are you sure you want to proceed?

        Cancel
        Confirm

```

### Different Sizes

[](#different-sizes)

```

    Small modal content.

    Large modal content.

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`wire:model`booleanrequiredControls modal visibility`title`string`null`Modal header title`size`string`'md'`Size: `sm`, `md`, `lg`, `xl`, `2xl`, `full``close-on-escape`boolean`true`Close when Escape pressed`close-on-overlay`boolean`true`Close when clicking overlayVue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbModal } from './vendor/sb-modal';
app.component('SbModal', SbModal);
```

### Basic Usage

[](#basic-usage-1)

```

  Open Modal

    Modal content goes here.

import { ref } from 'vue';
const showModal = ref(false);

```

### With Header and Footer Slots

[](#with-header-and-footer-slots)

```

        Warning
        Custom Header

    Are you sure you want to delete this item?

        Cancel

        Delete

```

### Sizes

[](#sizes)

```

  ...
  ...
  ...
  ...
  ...
  ...

```

### Prevent Closing

[](#prevent-closing)

```

    Fill out this form before closing.

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`modelValue`Boolean`false`Controls visibility (v-model)`title`String`null`Header title text`size`String`'md'`Modal width: `sm`, `md`, `lg`, `xl`, `2xl`, `full``closeOnEscape`Boolean`true`Close on Escape key`closeOnOverlay`Boolean`true`Close on backdrop click### Events

[](#events)

EventDescription`update:modelValue`Emitted when visibility changes`close`Emitted when modal closes### Slots

[](#slots)

SlotDescriptiondefaultModal body content`header`Custom header content`footer`Footer content (buttons, etc.)Features
--------

[](#features)

- **Teleport**: Modal renders at document body level
- **Body Scroll Lock**: Prevents background scrolling when open
- **Focus Management**: Focuses modal on open
- **Animations**: Smooth fade transitions
- **Accessibility**: Proper ARIA attributes and keyboard handling

Styling
-------

[](#styling)

Default styling uses Tailwind CSS:

- White background with rounded corners
- Gray border separators for header/footer
- Semi-transparent black overlay
- Centered positioning with padding

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x

License
-------

[](#license)

MIT License

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance74

Regular maintenance activity

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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 ~0 days

Total

4

Last Release

146d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

---

Tags

laravellivewiremodalpopupvuedialog

### Embed Badge

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

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

###  Alternatives

[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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