π 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-magicNo 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 --forceTo 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.