Download the PHP package mrshanebarron/modal without Composer
On this page you can find all versions of the php package mrshanebarron/modal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package 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
Livewire Usage
Basic Usage
With Footer Actions
Different Sizes
Livewire Props
| Prop | Type | Default | Description |
|---|---|---|---|
wire:model |
boolean | required | Controls 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 overlay |
Vue 3 Usage
Setup
Basic Usage
With Header and Footer Slots
Sizes
Prevent Closing
Vue Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
| Event | Description |
|---|---|
update:modelValue |
Emitted when visibility changes |
close |
Emitted when modal closes |
Slots
| Slot | Description |
|---|---|
| default | Modal body content |
header |
Custom header content |
footer |
Footer content (buttons, etc.) |
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
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
- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x
License
MIT License
All versions of modal with dependencies
PHP Build Version
Package Version
The package mrshanebarron/modal contains the following files
Loading the files please wait ...