PHPackages                             nawasara/toaster - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. nawasara/toaster

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

nawasara/toaster
================

Lightweight, Alpine-based toast notification component for Laravel and Livewire applications.

v0.1.0(1mo ago)044MITBladePHP ^8.1

Since Apr 28Pushed 1mo agoCompare

[ Source](https://github.com/nawasara/toaster)[ Packagist](https://packagist.org/packages/nawasara/toaster)[ RSS](/packages/nawasara-toaster/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Nawasara Toaster
================

[](#nawasara-toaster)

Lightweight, Alpine-based toast notification component for Laravel and Livewire applications. Drop one component into your layout and trigger toasts from JavaScript, Livewire, or session flash.

Features
--------

[](#features)

- **Four toast types** — success, error, warning, info
- **Configurable position** — nine corner/edge anchors
- **Progress bar** — optional countdown indicator
- **Dark-mode aware** — respects the host application's theme
- **Mobile responsive**
- **Triggers from anywhere** — JavaScript (`window.Toast`), Livewire dispatch, or Laravel session flash
- **Auto-init from flash** — shows the toast on next page load when redirected with a flash payload

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

[](#installation)

```
composer require nawasara/toaster
```

Auto-discovered. Drop the toaster + script components into your layout:

```

{{-- … your content … --}}

```

Usage
-----

[](#usage)

### From JavaScript

[](#from-javascript)

```
window.Toast.success('Saved successfully');
window.Toast.error('Something went wrong');
window.Toast.warning('Heads up');
window.Toast.info('FYI');
```

### From Laravel session flash

[](#from-laravel-session-flash)

```
session()->flash('toast', [
    'type' => 'success',
    'message' => 'Saved successfully',
]);

return redirect()->back();
```

The toaster auto-loads the flash payload via `window.Laravel.toast` on the next page render.

### From Livewire

[](#from-livewire)

Use the `HasToaster` trait if you prefer session-flash style (works after a redirect):

```
use Livewire\Component;
use Nawasara\Toaster\Concerns\HasToaster;

class MyComponent extends Component
{
    use HasToaster;

    public function save()
    {
        // …
        $this->alert('success', 'Saved successfully');
    }
}
```

For real-time toasts inside the same Livewire request (no page reload), use `Nawasara\Ui\Livewire\Concerns\HasBrowserToast` from `nawasara/ui` — it dispatches a browser `toast` event the toaster listens to.

Author
------

[](#author)

**Pringgo J. Saputro** &lt;&gt;

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance93

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

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

Unknown

Total

1

Last Release

42d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16914951?v=4)[Pringgo J. Saputro](/maintainers/pringgojs)[@pringgojs](https://github.com/pringgojs)

![](https://www.gravatar.com/avatar/edcf770bde3babcc9fa554e305e361b8614c1e505470e75842de75ea3e502548?d=identicon)[nawasara](/maintainers/nawasara)

---

Top Contributors

[![pringgojs](https://avatars.githubusercontent.com/u/16914951?v=4)](https://github.com/pringgojs "pringgojs (7 commits)")

---

Tags

laraveluinotificationlivewirealpinetoastNawasara

### Embed Badge

![Health badge](/badges/nawasara-toaster/health.svg)

```
[![Health](https://phpackages.com/badges/nawasara-toaster/health.svg)](https://phpackages.com/packages/nawasara-toaster)
```

PHPackages © 2026

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