PHPackages                             mrjokermr/dynamic-toasts - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mrjokermr/dynamic-toasts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrjokermr/dynamic-toasts
========================

Dynamic toasts for livewire

v1.1.2(8mo ago)1222PHPPHP ^8.1

Since Sep 5Pushed 6mo agoCompare

[ Source](https://github.com/mrjokermr/dynamic-toasts)[ Packagist](https://packagist.org/packages/mrjokermr/dynamic-toasts)[ RSS](/packages/mrjokermr-dynamic-toasts/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (1)Versions (17)Used By (0)

Dynamic toasts
==============

[](#dynamic-toasts)

**Simple Livewire 3 toast messages package**

Compatible with any css framework &amp; no CDN requirements. (Uses native inline css styling &amp; svg icons.)

[![Example](https://camo.githubusercontent.com/e81e00cd4b402f3b04b148cb7a6986932df2e5367fa16e39433229ba4270d969/68747470733a2f2f696d6775722e636f6d2f3351763047726e2e706e67)](https://camo.githubusercontent.com/e81e00cd4b402f3b04b148cb7a6986932df2e5367fa16e39433229ba4270d969/68747470733a2f2f696d6775722e636f6d2f3351763047726e2e706e67)

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

[](#installation)

Install via composer:

```
  composer require mrjokermr/dynamic-toasts
```

Place the Livewire component right before the closing body tag in your layout (for example in `resources/views/layouts/app.blade.php`)

```
@livewire('dynamic-toasts')

```

Usage/Examples
--------------

[](#usageexamples)

```
use Mrjokermr\DynamicToasts\Classes\ToastMessage;
use Mrjokermr\DynamicToasts\Enums\ToastMessageType;
use Mrjokermr\DynamicToasts\Livewire\DisplayDynamicToasts;

$this->dispatch(
    DisplayDynamicToasts::NEW_TOAST_EVENT,
    ToastMessage::make(
        message: "Hello GitHub",
        type: ToastMessageType::INFO
    ),
);

//or use session->flash() when wanting to display a toast message after redirecting
session()->flash(
    DisplayDynamicToasts::FLASH_TOAST_EVENT,
    ToastMessage::make(
        message: __('toasts.scheduled', ['name' => __('shared.visit')]),
        type: ToastMessageType::POSITIVE
    )
);
```

Available types:

```
use Mrjokermr\DynamicToasts\Enums\ToastMessageType;

ToastMessageType::INFO
ToastMessageType::SUCCESS
ToastMessageType::POSITIVE
ToastMessageType::NEGATIVE
ToastMessageType::FAILURE
ToastMessageType::WARNING
```

### Customization:

[](#customization)

**Without icon:**

Add the `->hideIcon()` function.

**Example:**

```
$this->dispatch(
    DisplayDynamicToasts::NEW_TOAST_EVENT,
    ToastMessage::make(
        message: "Hello GitHub",
        type: ToastMessageType::INFO
    )->hideIcon(),
);
```

**Set expiration time:**

Add the `->setExpiresAtSeconds()` function.

**Example:**

```
$this->dispatch(
    DisplayDynamicToasts::NEW_TOAST_EVENT,
    ToastMessage::make(
        message: "Hello GitHub",
        type: ToastMessageType::INFO
    )->setExpiresAtSeconds(seconds: 12),
);
```

### Config

[](#config)

```
php artisan vendor:publish --tag=dynamic-toasts-config
```

You might change the background color and text color for each individual pop up type, or the default toast duration. **default config:**

```
return [
    'default_seconds' => 5,
    'default_value_show_icon' => true,

    'styles' => [
        'positive' => [
            'background-color' => '#00c950',
            'text-color' => '#fcfcfc',
            'class' => null,
        ],
        'success' => [
            'background-color' => '#00c950',
            'text-color' => '#fcfcfc',
            'class' => null,
        ],
        'negative' => [
            'background-color' => '#fb2c36',
            'text-color' => '#fcfcfc',
            'class' => null,
        ],
        'failure' => [
            'background-color' => '#fb2c36',
            'text-color' => '#fcfcfc',
            'class' => null,
        ],
        'warning' => [
            'background-color' => '#fe9a00',
            'text-color' => '#fcfcfc',
            'class' => null,
        ],
        'info' => [
            'background-color' => '#fe9a00',
            'text-color' => '#fcfcfc',
            'class' => null,
        ],
    ],
];
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance64

Regular maintenance activity

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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 ~3 days

Total

15

Last Release

253d ago

Major Versions

v0.5.4 → v1.02025-09-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/7845f8d4cf31aad673788f67a97179d31c8b8eb2490c431f979196ad4a46b741?d=identicon)[mrjokermr](/maintainers/mrjokermr)

---

Top Contributors

[![mrjokermr](https://avatars.githubusercontent.com/u/46922309?v=4)](https://github.com/mrjokermr "mrjokermr (22 commits)")

### Embed Badge

![Health badge](/badges/mrjokermr-dynamic-toasts/health.svg)

```
[![Health](https://phpackages.com/badges/mrjokermr-dynamic-toasts/health.svg)](https://phpackages.com/packages/mrjokermr-dynamic-toasts)
```

###  Alternatives

[livewire/flux

The official UI component library for Livewire.

9527.8M127](/packages/livewire-flux)[jantinnerezo/livewire-alert

This package provides a simple alert utilities for your livewire components.

8131.4M20](/packages/jantinnerezo-livewire-alert)[leandrocfe/filament-apex-charts

Apex Charts integration for Filament PHP.

4911.6M11](/packages/leandrocfe-filament-apex-charts)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725173.0k14](/packages/tallstackui-tallstackui)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

43311.2k](/packages/venturedrake-laravel-crm)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21259.6k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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