NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #3130 most downloaded on Packagist
This package provides a simple alert utilities for your livewire components.
Latest stable
v4.2.0
Last release 6 months ago
18 May 2026
Release timing varies
gaps range from 9 days to 12 months
Nearly every release is documented
notes for 36 of 39 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
39 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Three new methods give your Livewire components server-driven control over an open alert — no more close-and-reopen flicker.
Three new methods give your Livewire components server-driven control over an open alert — no more close-and-reopen flicker.
asLoading(?string $title = null) — preset for non-dismissable spinne and backdrop clicks; triggers Swal.showLoading() on open. Default title'Loading...', override with a string argument.LivewireAlert::title('Saving...')->asLoading()->show();
close() — dismiss the current alert from the server.LivewireAlert::close();
update(?array $options = null) — mutate the open alert in place via Swal.update(). Two forms:Fluent — only explicitly-set options emitted, config defaults not merged:
LivewireAlert::title('Almost done')->text('90%')->update();
Explicit payload:
LivewireAlert::update([
'title' => 'Almost done',
'text' => '90%',
]);
No-op (with console warning) when no alert is visible. Guards run before calal` no longer throws.
Pair asLoading() + wire:poll + update() to drive Bus::batch() progreany phased task — all from PHP, with the alert updating live.
Alertable interface extended with the three new methods (additive — no break).
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.2.0...v4.2.0
Three new methods give your Livewire components server-driven control over an open alert — no more close-and-reopen flicker.
asLoading(?string $title = null) — preset for non-dismissable spinne and backdrop clicks; triggers Swal.showLoading() on open. Default title'Loading...', override with a string argument.LivewireAlert::title('Saving...')->asLoading()->show();close() — dismiss the current alert from the server.LivewireAlert::close();update(?array $options = null) — mutate the open alert in place via Swal.update(). Two forms:Fluent — only explicitly-set options emitted, config defaults not merged:
LivewireAlert::title('Almost done')->text('90%')->update();Explicit payload:
LivewireAlert::update([
'title' => 'Almost done',
'text' => '90%',
]);No-op (with console warning) when no alert is visible. Guards run before calal` no longer throws.
Pair asLoading() + wire:poll + update() to drive Bus::batch() progreany phased task — all from PHP, with the alert updating live.
Alertable interface extended with the three new methods (additive — no break).
Full Changelog: v4.2.0...v4.2.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fixed Livewire 4 compatibility - Resolved MethodNotFoundException: Public method [toJSON] not found on component when using the package with Livewire
Bug Fixes
$wire.call() not being handled correctly by Livewire 4's $wire proxy. It now uses $wire[action]() which works on both Livewire 3 and 4.
(jantinnerezo/livewire-alert#181)New Methods
timerProgressBar() - Show a visual countdown progress barasToast() - Ready-to-use toast preset (top-end, timer from config, progress bar enabled)customClass(array $classes) - Apply custom CSS classes to any part of the alertreverseButtons() - Swap confirm and cancel button positionsInput Methods
Dedicated methods for collecting user input directly within an alert:
withTextInput(), withEmailInput(), withPasswordInput(), withNumberInput(), withTextareaInput()withSelectInput(), withRadioInput(), withCheckboxInput(), withFileInput()Nothing published for this version
Added Livewire 4 support
Added Livewire 4 support
Update README.md by @jantinnerezo in https://github.com/jantinnerezo/livewire-alert/pull/174
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.0.6...v4.0.7
Added allowOutsideClick method with boolean type parameter "allowed" default is true
allowOutsideClick method with boolean type parameter "allowed" default is trueallowEscapeKey method with boolean type parameter "allowed" default is truenull parameter type on timer methodFor example, if you don't want to close alert on outside click, escape key and disable auto close.
LivewireAlert::question()
->title("Are you sure do you want to approve proposal?")
->allowOutsideClick(false) // new method
->allowEscapeKey(false) // new method
->timer(null) // You can pass null now instead of only integer and that disables auto closing
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/4.0.5...v4.0.6
` php LivewireAlert::title('New html function!') ->html(" You should try it out! ") ->show(); ` Full Changelog: https://github.com/jantinnerezo/livewi
html functionLivewireAlert::title('New html function!')
->html("<p><strong>You should try it out!</strong></p>")
->show();
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.0.4...4.0.5
html functionLivewireAlert::title('New html function!')
->html("<p><strong>You should try it out!</strong></p>")
->show();Full Changelog: v4.0.4...4.0.5
Feat: add comments to the alert facade to phpstan and editors understand by @juanjoballesteros in https://github.com/jantinnerezo/livewire-alert/pull/
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.0.3...v4.0.4
Fixed: onDeny method triggers onConfirm automatically by @jantinnerezo in https://github.com/jantinnerezo/livewire-alert/pull/164
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.0.2...v4.0.3
- Fixed eval option typo Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.0.1...v4.0.2
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.0.1...v4.0.2
Evaluate SweeAlert2 callback options.
Evaluate SweeAlert2 callback options.
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v4.0.0...v4.0.1
After the successful support for Livewire 3 in v3.0.3, I am excited to unveil Livewire Alert v4.0.0—a major refactor of the package! This release intr
After the successful support for Livewire 3 in v3.0.3, I am excited to unveil Livewire Alert v4.0.0—a major refactor of the package! This release introduces a modern, fluent API, enhanced flexibility, and broader Laravel compatibility (10.x to 12.x). Designed to seamlessly integrate with Livewire 3 and SweetAlert2, v4.0.0 brings a fresh approach to user-friendly alerts in your Laravel Livewire projects.
LivewireAlert into Livewire methods for contextual alert handling (e.g., public function save(LivewireAlert $alert)).withConfirmButton(), withCancelButton(), withDenyButton() with optional text and event handling via onConfirm(), onDeny(), onDismiss() and more.asConfirm() to quickly set up a question-style alert with confirm and deny buttons.position() with support for Position enum or string values (e.g., top-end, center).This is just a highlight of the new features! Check out the README.md.
LivewireAlert trait to a more modular, Facade-driven architecture.Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v3.0.3...v4.0.0
Laravel 12.x Compatibility by @laravel-shift in https://github.com/jantinnerezo/livewire-alert/pull/159
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v3.0.2...v3.0.3
Defer loading scripts by @jigar-dhulla in https://github.com/jantinnerezo/livewire-alert/pull/137
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/v3.0.1...v3.0.2
Release Update: Livewire Alert Package v3.0.1
Release Update: Livewire Alert Package v3.0.1
I recently released the Livewire Alert v3.0 to support the v3.0 version of Livewire. Upon review, many of you discovered an oversight in the release: the package dependencies were not correctly updated to reflect the compatibility with Livewire 3.0.
I apologize for any inconvenience this may have caused. To address this:
I've updated the dependencies to ensure compatibility with Livewire 3.0. A new release with the corrected dependencies has been published. I recommend updating to this latest version to avoid any potential issues.
Bump minimist from 1.2.5 to 1.2.6 by @dependabot in https://github.com/jantinnerezo/livewire-alert/pull/80
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/2.2.6...2.2.7
Fixed #78 callbacksKeyAllowed is not defined by declaring the variable.
Fixed #78 callbacksKeyAllowed is not defined by declaring the variable.
Configurations keys with javascript callbacks #76
Thanks to @gpibarra for submitting the PRs. 👌🏽
# Added - Support for Laravel 9 #71
Fixed flash message undefined data variable
Alert onConfirmed onDismissed onDenied and onProgress events should now emit to component that called the alert so it won't emit to every component in
onConfirmed onDismissed onDenied and onProgress events should now emit to component that called the alert so it won't emit to every component in your project.Emit events to only specific component. Instead of passing the listener directly to the event, pass an array with component and listeners keys.
'onConfirmed' => [
'component' => 'livewire-component',
'listener' => 'confirmed'
];
Fixed update 2.1.9 error #52 refactor alert trait
You can now pass extra parameters to any alert events with the data key.
$this->alert('info', 'Extra paramters', [
'onConfirmed' => 'confirmed',
'showConfirmButton' => true,
'data' => []
]);
public function confirmed($params)
{
// Retrieve data
$params['data'];
}
## Bugfix - Fixed empty events #53 and #52 Credits to @falconeri
Credits to @falconeri
A way to retrieve alert input value. #50, #39 and #49
LivewireAlert traitLivewire Macroable is no longer used for directly calling alert due to it being automatically registered on Livewire components that are not using alert methods.
Instead, you can import the Jantinnerezo\LivewireAlert\LivewireAlert trait and use it in your Livewire components that are utilizing alerts.
Allow users to override alert config
Credits to @yoeunes 💪🏼
Unexpected token '?' on Safari #27
Unable to resolve dependency [Parameter #0 [ $id ]]
✅ Fixed flash null config issue #28
✅ Fixed flash null config issue #28
✅ Fixed unable to install livewire alert in laravel 8.20.1
✅ Fixed unable to install livewire alert in laravel 8.20.1
🎉 Thanks to @moneya for submitting the issue.
⚡️ Optimize blade component script code to utilize config ➕ Added more default config to livewire-alert.php
⚡️ Optimize blade component script code to utilize config ➕ Added more default config to livewire-alert.php
Run this command to your terminal. `bash php artisan vendor:publish --provider="Jantinnerezo\LivewireAlert\LivewireAlertServiceProvider" --tag="config
Run this command to your terminal.
php artisan vendor:publish --provider="Jantinnerezo\LivewireAlert\LivewireAlertServiceProvider" --tag="config"
Huge thanks to @hantrick for submitting a PR for the config support.
`php return [ 'alert' => [ 'position' => 'top-end', 'timer' => 3000, 'toast' => true, 'text' => null, 'showCancelButton' => true, 'showConfirmButton'
return [
'alert' => [
'position' => 'top-end',
'timer' => 3000,
'toast' => true,
'text' => null,
'showCancelButton' => true,
'showConfirmButton' => false,
],
'confirm' => [
'position' => 'center',
'toast' => false,
'timer' => null,
'showConfirmButton' => true,
'cancelButtonText' => 'No'
]
];
Added support for alert confirmation.
Added support for alert confirmation.
Added support for session flash messages out-of-the-box.
Added support for session flash messages out-of-the-box.
Nothing published for this version
I'm excited to announce that this release introduces support for Livewire 3 stable release!
I'm excited to announce that this release introduces support for Livewire 3 stable release!
Installation
composer update jantinnerezo/livewire-alert
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/2.2.7...v3.0@beta
Nothing published for this version
Added multiple confirmation alerts on a single livewire component
<x-livewire::confirm /> component<x-livewire::confirm /> component.In the previous version <strong> 2.0 </strong> you may add the <x-livewire::confirm /> and define the onConfirmed and onCancelled callback as props like the code below.
<x-livewire::confirm onConfirmed="confirmed" onCancelled="cancelled" />
However when you have multiple confirmation alerts in the same livewire component this is not be possible and can cause multiple calls of javascript code with Alpine.js which is required to make the confirmation works.
In the latest version which is <strong> 2.1 </strong>, the <x-livewire::confirm /> component is removed and you can directly add your callback methods to the confirm config in your livewire component class.
public function confirmed()
{
//
}
public function cancelled()
{
//
}
Register the callback methods as event listeners.
protected $listeners = [
'confirmed',
'cancelled'
];
Add the event listeners to the confirm config.
// Trigger action method
public function triggerConfirm()
{
$this->confirm('Do you love Livewire Alert?', [
'toast' => false,
'position' => 'center',
'showConfirmButton' => true,
'cancelButtonText' => Nope,
'onConfirmed' => 'confirmed', // Add the confirmed callback method here
'onCancelled' => 'cancelled' // Add the cancelled callback method here
];
}
For more information please visit the documentation page: https://livewire-alert.jantinnerezo.com/
Added livewire component macro for calling alert directly instead of using trait on each livewire components.
That's it folks!
One column per quarter.