Download the PHP package cloudstudio/laravel-livewire-modal without Composer

On this page you can find all versions of the php package cloudstudio/laravel-livewire-modal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-livewire-modal

Laravel Livewire Modal

Latest Version on Packagist Total Downloads

This package is inspired by wire-elements/modal, forked and rebuilt from scratch to provide full support for Livewire v3 and Tailwind 4. It provides a powerful Livewire component that gives you a modal system that supports multiple child modals while maintaining state.

Features

Installation

You can install the package via composer:

After installing the package, you need to include the modal component in your blade layout file:

Tailwind Configuration

To properly configure Tailwind 4 with this package, add these lines to your app.css file:

Then run:

This ensures Tailwind can properly scan and generate the necessary styles for the modal components.

Basic Usage

Creating a Modal Component

Create a Livewire component that extends the LivewireModal class:

Opening a Modal

To open a modal from a Livewire component or a Blade view:

Handling Arguments

You can pass arguments to your modal when opening it:

Modal Events

You can dispatch events when closing a modal:

Customizing Modal Behavior

Changing Modal Width

You can change the width of the modal by overriding the modalMaxWidth method:

Display as Flyout

To display the modal as a flyout:

Flyout Position

To change the position of the flyout. Available positions are right, left, and bottom. Default is right:

Disable Closing on Escape Key

To prevent the modal from closing when the escape key is pressed:

Disable Closing on Outside Click

To prevent the modal from closing when clicking outside:

Controlling Escape Key Behavior

By default, pressing escape closes all modals. To change this behavior:

Triggering Close Events

To dispatch an event when the modal is closed:

Component State Management

To destroy the component state when a modal is closed:

Advanced Usage

Preventing Modal Close Based on State

You can prevent the modal from closing based on its state:

Skipping Previous Modals

For nested modal workflows where you want to skip returning to certain previous modals:

Configuration

Publish the configuration file:

This will create a livewire-modal.php config file with the following options:

Security

Remember to validate all data passed to your Livewire components. Since Livewire stores this information on the client-side, it can be manipulated. Use Laravel's Gate facade and other authorization mechanisms to secure your application.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-livewire-modal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
livewire/livewire Version ^3.2.3
illuminate/contracts Version ^10.0||^11.0||^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cloudstudio/laravel-livewire-modal contains the following files

Loading the files please wait ....