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. Include the bundle CSS assets in your template
If you use the progress bar option, also include:
The bundle ships its own toast behavior, so no Bootstrap JavaScript include is required.
If you use the with_icon or colored_icon templates, include Bootstrap Icons in your page:
3. Add the toast function to your template
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
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/framework-bundle Version ^6.0 || ^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/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