PHPackages                             asmitta-01/toast-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. asmitta-01/toast-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

asmitta-01/toast-bundle
=======================

UX Toast display for your Symfony project.

v0.3.1(2mo ago)03MITPHPPHP &gt;=8.1CI passing

Since Oct 6Pushed 2mo agoCompare

[ Source](https://github.com/Asmitta-01/toast-bundle)[ Packagist](https://packagist.org/packages/asmitta-01/toast-bundle)[ Docs](https://github.com/Asmitta-01/toast-bundle)[ RSS](/packages/asmitta-01-toast-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (23)Versions (5)Used By (0)

ToastBundle
===========

[](#toastbundle)

[![Static Analysis](https://github.com/Asmitta-01/toast-bundle/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/Asmitta-01/toast-bundle/actions/workflows/static-analysis.yml)

A Symfony bundle for displaying [Bootstrap toasts](https://getbootstrap.com/docs/5.3/components/toasts/) from flash messages.

Installation
------------

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Open a command console, enter your project directory and execute:

```
composer require asmitta-01/toast-bundle
```

Configuration
-------------

[](#configuration)

if your application dont't use Symfony Flex, enable the bundle in `config/bundles.php`:

```
return [
    // ...
    Asmitta\ToastBundle\AsmittaToastBundle::class => ['all' => true],
];
```

Create a configuration file at `config/packages/asmitta_toast.yaml`, read [docs](./docs/config.md).

Usage
-----

[](#usage)

### 1. Add flash messages in your controller

[](#1-add-flash-messages-in-your-controller)

```
use Asmitta\ToastBundle\Enum\ToastType;

public function someAction(Request $request): Response
{
    $this->addFlash('success', 'Operation completed successfully!'); // 'success' or ToastType::SUCCESS->value
    $this->addFlash('warning', 'Please check your input.');
    $this->addFlash('error', 'Something went wrong.');
    $this->addFlash('info', 'Here is some information.');

    return $this->render('your_template.html.twig');
}
```

### 2. Include Bootstrap CSS and JS in your template

[](#2-include-bootstrap-css-and-js-in-your-template)

```

```

If you're going to show the progress bar in your toasts, also include this css file:

```

```

### 3. Add the toast function to your template

[](#3-add-the-toast-function-to-your-template)

```
{{ render_toasts() }}
```

Toast Types
-----------

[](#toast-types)

The bundle supports these flash message types:

- `success` → Green toast
- `warning` → Yellow toast
- `error` or `danger` → Red toast
- `info` (default) → Light Blue toast

Features
--------

[](#features)

- Automatic mapping of flash message types to Bootstrap toast variants
- Configurable auto-hide timer (default: 5 seconds)
- Flexible positioning (7 positions available, see [ToastPosition Enum](./src/Enum/ToastPosition.php))
- 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

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance89

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Total

4

Last Release

84d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/034624b53b3d54b78cc2eb8f35a349e237d8a24c660dd7393dcee136cb2fbf6b?d=identicon)[Asmitta-01](/maintainers/Asmitta-01)

---

Top Contributors

[![Asmitta-01](https://avatars.githubusercontent.com/u/69441849?v=4)](https://github.com/Asmitta-01 "Asmitta-01 (12 commits)")

---

Tags

bootstrapbundlesymfonysymfony7templatetoasttwigsymfonybootstraptoastux

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/asmitta-01-toast-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/asmitta-01-toast-bundle/health.svg)](https://phpackages.com/packages/asmitta-01-toast-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
