Download the PHP package awcodes/pounce without Composer
On this page you can find all versions of the php package awcodes/pounce. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package pounce
Pounce
This plugin adds a global modal for usage in Filament and is a port of Wire Elements Modal.
Please star the original repo if you like this plugin.
Installation
You can install the package via composer:
[!IMPORTANT] If you have not set up a custom theme and are using Filament Panels follow the instructions in the Filament Docs for creating a custom theme first.
After setting up your theme, add the plugin's views to your tailwind.config.js
file and run npm run dev
or npm run build
to add the plugin styles to your theme.
For Panels
If you are using Filament Panels you need to add the plugin to the panels you wish to use the plugin with. This will add the necessary livewire component to the panel's layout.
Stand-alone usage
If you are using stand-alone Filament packages you will need to manually add the plugin to any layouts where you intend to use it. This should go before the closing body
tag, and you should only have one instance per page.
You can publish the config file with:
Optionally (not recommended), you can publish the views using
This is the contents of the published config file:
Usage
Creating a modal
With the command line
For convince, the plugin offers a scaffolding command to create new modals. This will create a class file in App\Livewire
or your configured Livewire directory. It will also create a view at resources/views/livewire
.
The --form
flag will scaffold the modal with some defaults for making a modal that uses Filament's form methods.
Manually
To manually create a modal you simply need to run the Livewire make command and extend the PounceComponent
class.
Opening and Closing Modals
[!NOTE] Pounce uses all the same conventions and usage as Wire Elements Modal, the only thing to be aware of is to open a modal Pounce uses the
pounce
event and to close a modal it uses theunPounce
event.
See Wire Elements Modal on GitHub for complete usage instructions.
Modal Alignment
Modals can be aligned to the top, center, or bottom of the screen and to the start, center, or end of the screen. The default alignment is MiddleCenter
. See the alignment enum for all available options. This can also be set globally in the config file.
Modal Width
Modal widths can be set using the enum cases found in Filament's MaxWidth
enum. See the MaxWidth enum for all available options. This can also be set globally in the config file.
Slide Overs
By default, all modals are standard pop-up modals. If you wish to use a slide over modal you can set the getSlideDirection
method to one of the SlideDirection
enum cases. See the SlideDirection enum for all available options. This can also be set globally in the config file.
To open a normal modal with the slide features you will need to explicitly set the isSlideOver
method to return false
.
Blade Views
While you are free to use any blade view you wish, the plugin comes with a few pre-made views to get you started. These views have predefined padding and margins to match Filament's UI.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Adam Weston
- Wire Elements Modal
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of pounce with dependencies
filament/filament Version ^3.0
illuminate/contracts Version ^10.0
spatie/laravel-package-tools Version ^1.15.0