github devrabiul/laravel-toaster-magic v2.3
v2.3 Release Notes

6 hours ago

๐Ÿž Laravel Toaster Magic โ€” v2.3.0 Release Notes

Release date: 2026-06-18
Type: Minor release โ€” fully backward compatible

v2.3.0 is a "Motion & Avatars" release. It brings toasts to life with smooth, physics-aware stacking and configurable entrance/exit animations, and adds avatar/notification-style toasts for "new message" and "new follower" experiences. The package's scope is unchanged, and there are no breaking changes โ€” the new default animation preserves the exact look and feel of v2.2, so existing apps upgrade without touching any code.


โœจ Highlights

  • ๐Ÿ–ผ๏ธ Avatar / notification-style toasts โ€” render a user image in place of the type icon.
  • ๐ŸŽž๏ธ 5 entrance/exit animations โ€” default, slide, fade, pop, bounce.
  • ๐Ÿช„ Smooth stack reflow (FLIP) โ€” remaining toasts glide into place instead of jumping when one is added or dismissed.
  • ๐Ÿงท Stable, position-aware stacking โ€” newest toast appears at the anchored corner; the rest stay put and slide cleanly.
  • ๐Ÿ› Fixed stack "teleport" โ€” no more jumps when toasts enter and exit at the same time.
  • โ™ฟ Respects prefers-reduced-motion โ€” animations gracefully degrade for users who ask for less motion.

๐Ÿš€ What's New

Avatar / notification-style toasts

Pass an avatar image URL in the options array to show an image instead of the type icon โ€” perfect for chat, social, and activity notifications. The URL is sanitized before it's rendered.

ToastMagic::info('New message', 'Hey, are you free to chat?', [
    'avatar' => $user->avatar_url,
]);

Also available from JavaScript (8th argument) and through Livewire event options:

// toastMagic.{type}(heading, description, showCloseBtn, customBtnText, customBtnLink, timeOut, showDuration, avatar)
toastMagic.info('New follower', 'Sarah started following you.', false, '', '', null, null, '/img/sarah.jpg');

Entrance & exit animations

A new animation config option controls how toasts move on and off screen:

// config/laravel-toaster-magic.php
'options' => [
    'animation' => 'slide', // default, slide, fade, pop, bounce
],
Value Effect
default Slide in from the toast's position (unchanged from v2.2)
slide Same as default โ€” explicit slide
fade Fade in/out with no movement
pop Scale up from slightly smaller, with a soft overshoot
bounce Slide in with a springy overshoot

Smooth, stable stack reflow

When a toast is added or dismissed, the remaining toasts now glide smoothly into their new positions using the FLIP technique, rather than snapping. Stacking is position-aware: the newest toast always appears closest to the configured corner (on top for toast-top-*, at the bottom for toast-bottom-*), and the existing toasts animate to their new spots instead of being shoved.

This is purely visual polish โ€” no API changes, and it honors prefers-reduced-motion.


๐Ÿ› Fixes

  • Stack teleport during overlapping animations. When new toasts slid in while older ones were still dismissing (e.g. rapid triggers or page reloads), the stack could jump by a full toast height. A stale animation-cleanup race and a double-counted offset in the reflow logic have been fixed โ€” the stack now glides smoothly even when entrances and exits overlap.
  • Inconsistent Livewire stacking. The Livewire runtime used hard-coded position checks that handled some positions (e.g. toast-bottom-center) differently from the standard build. Both runtimes now share one consistent, position-aware rule.

๐Ÿงฉ Compatibility

Requirement Supported
PHP 8.0 โ€“ 8.5
Laravel 8 โ€“ 13
Livewire v3 & v4

No new requirements. The avatar and animation features are opt-in and degrade cleanly when unused.


โฌ†๏ธ Upgrade Guide

composer update devrabiul/laravel-toaster-magic

No code changes required. The new default animation matches v2.2's behavior exactly.

Because v2.3 ships updated CSS and JavaScript, make sure the new assets are served. They auto-refresh on the next page load, or you can re-publish explicitly:

php artisan vendor:publish --tag=toast-magic-assets --force

To try the new features, add them to your config and/or calls:

// config/laravel-toaster-magic.php
'options' => [
    'animation' => 'pop',
],
ToastMagic::success('Profile updated', 'Your account information has been saved.', [
    'avatar' => auth()->user()->avatar_url,
]);

๐Ÿ™ Thanks

Thanks to everyone using and reporting issues on Laravel Toaster Magic. If it helps you in production, consider planting a tree. ๐ŸŒฑ

Full changelog: see CHANGELOG.md.

Don't miss a new laravel-toaster-magic release

NewReleases is sending notifications on new releases.