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(6mo ago)013MITVuePHP ^8.1

Since Dec 14Pushed 6mo agoCompare

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

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

33

—

LowBetter than 72% of packages

Maintenance67

Regular maintenance activity

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

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

199d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193358540?v=4)[Mr Shane Barron](/maintainers/mrshanebarron)[@mrshanebarron](https://github.com/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

[livewire/flux

The official UI component library for Livewire.

9527.8M128](/packages/livewire-flux)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[tomshaw/electricgrid

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

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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