Download the PHP package azgasim/filament-unsaved-changes-modal without Composer

On this page you can find all versions of the php package azgasim/filament-unsaved-changes-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 filament-unsaved-changes-modal

Filament Unsaved Changes Modal

Packagist Version Packagist Downloads Tests Code style

In the Filament panel, leaving a dirty form shows a Filament modal instead of the browser’s blocking confirmation dialog.

Reloading or closing the tab still uses the native browser prompt (which cannot be customized).

Works with Filament SPA (livewire:navigate) and normal full-page navigation (same-origin link clicks in the panel body). Uses the same dirty-state rules as Filament’s unsavedChangesAlerts(); this package only swaps the confirmation UI.

Compatibility

Plugin Filament PHP
1.x ^5.3.5 ^8.2

Requires Filament 5.3.5+ due to a known XSS vulnerability (CVE-2026-33080) in earlier versions.

Installation

Usage

You need both unsavedChangesAlerts() and this plugin on the same panel.

You can also register the plugin inside ->plugins([...]) with your other plugins.

Customization

Modal appearance

Defaults live on [FilamentUnsavedChangesModalPlugin](src/FilamentUnsavedChangesModalPlugin.php): DEFAULT_MODAL_WIDTH, DEFAULT_MODAL_ICON_COLOR, DEFAULT_STAY_BUTTON_COLOR, DEFAULT_LEAVE_BUTTON_COLOR, and an icon default of OutlinedExclamationTriangle when you do not call modalIcon().

Method Values
modalWidth() xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl, 6xl, 7xl, full, min, max, fit, prose, screen-sm, screen-md, screen-lg, screen-xl, screen-2xl, screen — same string values as Filament’s Width enum (Filament\Support\Enums\Width).
modalIcon() Heroicon::OutlinedExclamationTriangle or 'OutlinedExclamationTriangle' (not o-exclamation-triangle)
modalIconColor(), stayButtonColor(), leaveButtonColor() primary, success, danger, warning, info, gray, … (your panel color keys)

There is no published config file; configure the plugin with the methods above.

Translations

Heading, description, and the Stay / Leave labels are only customizable via translations (no plugin methods for copy). Publish and edit unsaved-changes-modal.php under your locale — keys live in navigation.*; see English (package also ships de).

Views

Only if you want to change the Blade markup, copy the package views into your app:

If you change the modal’s DOM id in a published view, keep it in sync with [MODAL_DOM_ID](src/FilamentUnsavedChangesModalPlugin.php) and the script hook view (the script opens and closes the modal by that id).

Skipping the prompt for a link

Add data-skip-unsaved-changes-modal on the <a> or on any ancestor element (the listener uses closest(...)).

Testing

Changelog

CHANGELOG.md

Contributing

CONTRIBUTING.md

Security

SECURITY.md

Credits

License

MIT


All versions of filament-unsaved-changes-modal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.3.5
spatie/laravel-package-tools Version ^1.15.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 azgasim/filament-unsaved-changes-modal contains the following files

Loading the files please wait ...