🚀 Live Demo
👉 Try the Live Demo

✨ Features
- 🔥 Easy to Use — Simple, intuitive API with support for both static and fluent syntax.
- 🌍 RTL Support — Full compatibility with right-to-left languages.
- 🌙 Dark Mode — Built-in dark mode support via a single HTML attribute.
- 🎨 9+ Themes — iOS, Neon, Glassmorphism, Material, Minimal, Neumorphism, Neumorphic, Compact, and Default.
- 📏 Configurable Spacing & Typography — Global padding, gaps and font sizes that work with any theme.
- 🎞️ Entrance/Exit Animations — Choose how toasts enter and leave:
slide, fade, pop, or bounce.
- 🪄 Smooth Stack Reflow — Remaining toasts glide into place (FLIP) when one is added or dismissed.
- 🖼️ Avatar Toasts — Render an image in place of the type icon for notification-style toasts.
- 🎬 Animated Icon Presets — 517 multi-colour animated icons across 11 opt-in packs, layered on top of the existing types. Load only the packs you need. See PRESETS.md.
- ⚡ Livewire Ready — Livewire v3 & v4 via a thin event bridge over the same runtime the standard build uses.
- 🔒 Safe by Default — Toast text is escaped, URLs are protocol-checked, and HTML is opt-in per toast. See Security.
- ♿ Accessible — Live-region announcements, a labelled close button, Escape to dismiss, pause on focus, and full
prefers-reduced-motion support.
- ✅ Zero Dependencies — No jQuery, Bootstrap, or Tailwind required.
✅ Requirements
| Supported | Covered by CI |
|---|
| PHP | 8.0 – 8.5 | 8.1 – 8.5 |
| Laravel | 8 – 13 | 10 – 13 |
| Livewire | v3, v4 (optional) | — |
Laravel 8 and 9 are supported and expected to work — the package targets PHP 8.0 and uses only long-stable Illuminate APIs — but they are not in the CI matrix. Their Testbench majors pin PHPUnit 9 while Pest 2+ requires PHPUnit 10, so covering them would mean maintaining a second test-tooling major for two end-of-life framework versions. If you hit a problem on Laravel 8 or 9, please open an issue.
📦 Installation
Install the package via Composer:
composer require devrabiul/laravel-toaster-magic
Publish the config file (optional):
php artisan vendor:publish --tag=toast-magic-config
Assets are copied into public/packages/devrabiul/laravel-toaster-magic automatically on the first request after an install or upgrade — you do not normally need to publish them.
If you install from a branch (dev-main) or a path repository, Composer has no version to compare against, so publish them explicitly after each update:
php artisan vendor:publish --tag=toast-magic-assets --force
⚙️ Basic Setup
Add the stylesheet inside your <head> tag and the scripts just before the closing </body> tag:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
{!! ToastMagic::styles() !!}
</head>
<body>
<!-- Your Content -->
{!! ToastMagic::scripts() !!}
</body>
</html>
🧑💻 Usage
1. Controller Usage