Download the PHP package asmitta-01/toast-bundle without Composer
On this page you can find all versions of the php package asmitta-01/toast-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asmitta-01/toast-bundle
More information about asmitta-01/toast-bundle
Files in asmitta-01/toast-bundle
Package toast-bundle
Short Description UX Toast display for your Symfony project.
License MIT
Homepage https://github.com/Asmitta-01/toast-bundle
Informations about the package toast-bundle
ToastBundle
A Symfony bundle for displaying toast notifications from flash messages, with no Bootstrap CSS or JavaScript dependency.
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Open a command console, enter your project directory and execute:
The bundle is compatible with Symfony 6, 7 and 8.
If your application exposes bundle assets through the public directory, install them after requiring the package:
Configuration
If your application doesn't use Symfony Flex, enable the bundle in config/bundles.php:
Create a configuration file at config/packages/asmitta_toast.yaml, see docs/config.md.
Usage
1. Add flash messages in your controller
2. Render toasts in your template
By default, the bundle automatically loads its CSS and JavaScript assets when rendering toasts.
If you use the with_icon or colored_icon templates, include Bootstrap Icons in your page:
3. Optional: disable automatic asset loading
If you prefer to manage assets manually (for example with your own pipeline), disable auto loading:
Then include the assets yourself:
Toast Types
The bundle supports these flash message types:
success→ Green toastwarning→ Yellow toasterrorordanger→ Red toastinfo(default) → Light Blue toast
Features
- Automatic mapping of flash message types to toast variants
- Configurable auto-hide timer (default: 5 seconds)
- Flexible positioning (7 positions available, see ToastPosition Enum)
- Limit maximum toasts per type
- Optional progress bar showing remaining time
- Dismissible toasts with close button
- Responsive design
- Twig template-based rendering
- Full configuration support
- No Bootstrap CSS or JavaScript dependency
- Symfony 6, 7 and 8 compatibility
- Automatic CSS/JS loading by default
Breaking Changes In 0.4.0
- The root toast class changed from
toasttoasmitta-toast - Bootstrap toast classes and utility classes were replaced by
asmitta-prefixed classes - Bootstrap JavaScript is no longer used or required for rendering toasts
All versions of toast-bundle with dependencies
symfony/asset Version ^6.4 || ^7.0 || ^8.0
symfony/config Version ^6.0 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.0 || ^7.0 || ^8.0
symfony/event-dispatcher Version ^6.0 || ^7.0 || ^8.0
symfony/framework-bundle Version ^6.0 || ^7.0 || ^8.0
symfony/http-foundation Version ^6.0 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.0 || ^7.0 || ^8.0
symfony/options-resolver Version ^6.0 || ^7.0 || ^8.0
symfony/security-core Version ^6.0 || ^7.0 || ^8.0
symfony/translation Version ^6.0 || ^7.0 || ^8.0
symfony/validator Version ^6.0 || ^7.0 || ^8.0
symfony/yaml Version ^6.0 || ^7.0 || ^8.0