Download the PHP package inventas/momentum-modal without Composer

On this page you can find all versions of the php package inventas/momentum-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 momentum-modal

Momentum Modal

Momentum Modal is a headless Vue 3 modal system for Laravel applications that use Inertia 3. This Inventas fork contains the Laravel package and its matching Vue client.

The Vue client keeps the original modal, Modal, and useModal API. It uses the native Inertia 3 request interceptor. It does not change Axios defaults and does not require Axios.

Requirements

Installation

Add the Inventas repository and install the Laravel package.

Use the co-located Vue package. This keeps the existing momentum-modal imports in the application.

Run npm install after Composer installs the package. Do not install the old public momentum-modal package from the npm registry. That package uses the Inertia 1 and 2 Axios transport and does not support Inertia 3.

Client setup

Register the plugin with the same component resolver that Inertia uses.

Add the headless Modal host to a persistent layout.

The host owns the modal request interceptor, page watcher, and browser history listener. It removes these resources when the host unmounts. This makes the package safe for SSR and Vite hot module replacement.

TypeScript page props

The package exports its public types. Add modal to the application's existing Inertia shared page props declaration. If the application already defines sharedPageProps, add the field to that same type instead of adding a second declaration.

Do not add a local declaration for the momentum-modal module. The package includes its own declarations.

Server usage

Modal pages have normal routes. The base route supplies the background page when a modal URL is loaded directly.

Each modal response must call baseRoute() or baseURL(). The package reports a clear exception when the base URL is missing.

The legacy Inertia::dialog() and Inertia::render(...)->stackable() aliases remain available for applications that used the original package API.

Modal component API

Use useModal() in the resolved modal page component.

close() removes modal request context and starts the leave transition. redirect() removes the retained modal component and visits its return URL after that transition.

Development

Run the Laravel checks from the repository root.

Run all Vue client checks from vue/.

Credits

The package is based on the original work by Boris Lepikhin and the Momentum contributors. Inventas maintains this Inertia 3 fork.

License

Momentum Modal is open-source software licensed under the MIT license.


All versions of momentum-modal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0|^13.0
inertiajs/inertia-laravel Version ^3.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 inventas/momentum-modal contains the following files

Loading the files please wait ...