New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

mrshanebarron/modal

Modal dialog component for Laravel - supports Livewire and Vue
13

Larablocks Analysis

mrshanebarron/modal works with Laravel 10, 11 and 12 (latest release v1.0.3, Dec 16, 2025).

Recommendation checks

Use with care

Use with care: meets 1 of 4 checks.

  • Latest release doesn't support Laravel 13, the current version
  • Released in the last 12 months (Dec 16, 2025)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Dec 16, 2025.
  • 4 releases in the last 12 months.
  • First released: Dec 14, 2025.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 4, 2026.

Install
composer require mrshanebarron/modal
Latest Version:v1.0.3
PHP:^8.1
Laravel:10 · 11 · 12
License:MIT
Last Updated:Dec 21, 2025
Links: GitHub  ·  Packagist
Maintainer: mrshanebarron

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

composer require mrshanebarron/modal

Livewire Usage

Basic Usage

<button wire:click="$set('showModal', true)">Open Modal</button>

<livewire:sb-modal wire:model="showModal" title="My Modal">
    <p>Modal content goes here.</p>
</livewire:sb-modal>
<livewire:sb-modal wire:model="showModal" title="Confirm Action">
    <p>Are you sure you want to proceed?</p>

    <x-slot name="footer">
        <button wire:click="$set('showModal', false)">Cancel</button>
        <button wire:click="confirm">Confirm</button>
    </x-slot>
</livewire:sb-modal>

Different Sizes

<livewire:sb-modal wire:model="showSmall" size="sm" title="Small Modal">
    Small modal content.
</livewire:sb-modal>

<livewire:sb-modal wire:model="showLarge" size="xl" title="Large Modal">
    Large modal content.
</livewire:sb-modal>

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

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

Basic Usage

<template>
  <button @click="showModal = true">Open Modal</button>

  <SbModal v-model="showModal" title="My Modal">
    <p>Modal content goes here.</p>
  </SbModal>
</template>

<script setup>
import { ref } from 'vue';
const showModal = ref(false);
</script>
<template>
  <SbModal v-model="showModal">
    <template #header>
      <div class="flex items-center gap-2">
        <span class="text-red-500">Warning</span>
        Custom Header
      </div>
    </template>

    <p>Are you sure you want to delete this item?</p>

    <template #footer>
      <SbButton variant="secondary" @click="showModal = false">
        Cancel
      </SbButton>
      <SbButton variant="danger" @click="deleteItem">
        Delete
      </SbButton>
    </template>
  </SbModal>
</template>

Sizes

<template>
  <SbModal v-model="show" size="sm" title="Small">...</SbModal>
  <SbModal v-model="show" size="md" title="Medium">...</SbModal>
  <SbModal v-model="show" size="lg" title="Large">...</SbModal>
  <SbModal v-model="show" size="xl" title="Extra Large">...</SbModal>
  <SbModal v-model="show" size="2xl" title="2XL">...</SbModal>
  <SbModal v-model="show" size="full" title="Full Width">...</SbModal>
</template>

Prevent Closing

<template>
  <!-- Don't close on escape or overlay click -->
  <SbModal
    v-model="showModal"
    title="Important Form"
    :close-on-escape="false"
    :close-on-overlay="false"
  >
    <p>Fill out this form before closing.</p>
  </SbModal>
</template>

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

Related Packages

edulazaro/wiremodal

Framework-agnostic modal/dialog system for Laravel, Livewire and Alpine. Pure CS...

132 1
andisiahaan/livewire-dialog

A powerful Livewire dialog system with stack management, multiple dialog types,...

2 0
ijpatricio/mingle

Use Vue and React in Laravel Livewire Applications.

145,090 445
mrshanebarron/breadcrumbs

Breadcrumbs navigation component for Laravel - supports Livewire and Vue

18 0
mrshanebarron/button

Customizable button component for Laravel - supports Livewire and Vue

16 0

Version History

Version Released PHP Laravel License
v1.0.3 ^8.1 ^10.0|^11.0|^12.0 MIT
v1.0.2 ^8.1 ^10.0|^11.0|^12.0 MIT
v1.0.1 ^8.1 ^10.0|^11.0|^12.0 MIT
v1.0.0 ^8.1 ^10.0|^11.0|^12.0 MIT