Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Livewire Modal

Livewire Modal Laravel Package

elegantly/livewire-modal

Elegantly/livewire-modal is a simple, elegant modal package for Laravel Livewire. Build reusable modal components, trigger them from Livewire actions, and add dialogs to existing views with minimal setup. Clean Blade integration makes building and customizing dialogs quick and easy.

View on GitHub
Deep Wiki
Context7

Elegantly/Livewire-Modal is a Laravel Livewire package that makes building dynamic modals effortless. Instead of juggling Blade partials and JavaScript, you define modals as dedicated Livewire components and open them directly from your views using a simple trait and helper method. The package handles rendering, visibility state, and communication between the parent component and the modal for you.

  • Define modals as reusable Livewire components
  • Open modals from any view with a single $this->emit/helper call
  • Pass data into modals and return results to the parent
  • Supports stacked modals and programmatic close
  • Ships with Tailwind-friendly markup and easy customization
Frequently asked questions about Livewire Modal
How do I install elegantly/livewire-modal in Laravel?
Install it with Composer using composer require elegantly/livewire-modal, then follow the repository README for any asset publishing or configuration steps. It is a standard Laravel package with a service provider and Blade component, so integration is light. Confirm the exact publish commands in the README before rolling it out.
Which Laravel and Livewire versions are supported?
The package targets server-rendered Laravel applications using Livewire 3.x, Blade layouts, Tailwind CSS, and Alpine.js. The repository and composer.json are the authoritative source for the exact Laravel, Livewire, Alpine, and Tailwind compatibility matrix. Pin versions and test Livewire minor upgrades explicitly, since event handling and DOM morphing can change between releases.
Does it support stacked and nested modals?
Stacked modals and slideovers are core features of the package. For nested Livewire components inside a modal, validate independent state, validation, z-index, and scroll-lock behavior in a spike before relying on it. Confirm the supported nesting depth in the README.
Do I need to write JavaScript to use this modal package?
No. You build modals directly in Livewire through the package's simple API, so you do not need to write custom JavaScript for opening, closing, or passing data. The client-side behavior is handled by the package, likely with Alpine.js, which should already be part of a typical Livewire stack.
How do I open a modal and pass data to it?
You open, close, and pass data to modal components through the package's API, typically from a Livewire component method or event, with data passed as arguments. The exact method and event names should be taken from the README. Because modal content participates in the Livewire lifecycle, passing an Eloquent model or an ID both work conceptually, but confirm which pattern the package documents.
Does it work for forms with validation, file uploads, and redirects?
Because modal content participates in the Livewire component lifecycle, standard Livewire validation and server-side authorization should work inside a modal. Test validation error display, file uploads, redirects, and browser back-button behavior in your own spike, since these are the areas most likely to need adaptation. The package docs do not currently spell out these flows.
Is the modal accessible, with focus trap and Escape key support?
Accessibility is the area to verify most carefully. Small modal packages commonly miss focus trapping, focus restoration, aria-modal, Escape handling, and scroll-lock release. Test keyboard and screen-reader workflows yourself, and treat any conformance claim as unproven until you have automated or manual evidence.
Can I restyle it with Tailwind CSS without forking?
Yes, but expect to align it with your design system. The practical work is Tailwind class overrides and ensuring package classes are safelisted so purging does not strip them. Wrapping it in an internal component such as x-app-modal keeps styling conventions and event names owned by your team.
Is elegantly/livewire-modal production ready and actively maintained?
Treat it as unproven for now: it has roughly 48 stars, zero public dependents, and a single maintainer, so there are no public production references. The MIT license lets you fork if maintenance stops, but forking shifts the burden to your team. Verify CI status, test coverage, release provenance, and the security policy in the repository before adopting.
What are alternatives to this package, and does it work with Inertia or Vue?
Alternatives include building your own Blade and Alpine modal component, using native HTML dialog patterns, or using the modal features of a framework such as Filament if you already use it. The package is a poor fit for Inertia, React, or Vue SPAs and API-only services because it depends on the Livewire runtime. For Livewire-centric monoliths, it is a reasonable convenience layer if a spike validates your top use cases.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console