jantinnerezo/livewire-alert
This package provides a simple alert utilities for your livewire components.
v4.2.0
1.4M downloads/mo
#3419 most downloaded on Packagist
jantinnerezo/livewire-alert
What this package is like to depend on
Last release 3 months ago
18 May 2026
Release timing varies
gaps range from 9 days to 12 months
Rarely documented
notes for 9 of 39 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
39 releases · first in 2020
5 releases in the last 12 months
see the full history below
Release timeline
39 releases · Jun 2020 to May 2026Releases
latest 39-
v4.2.018 May 2026Release notes
Open source →v4.2.0 — Drive loading spinners and live alert updates straight from PHP
Three new methods give your Livewire components server-driven control over an open alert — no more close-and-reopen flicker.
✨ New
asLoading(?string $title = null)— preset for non-dismissable spinne and backdrop clicks; triggersSwal.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 viaSwal.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.
🧩 Why this matters
Pair
asLoading()+wire:poll+update()to driveBus::batch()progreany phased task — all from PHP, with the alert updating live.🛡 Contract
Alertableinterface extended with the three new methods (additive — no break).Full Changelog: v4.2.0...v4.2.0
-
v4.1.004 Apr 2026Release notes
Open source →Bug Fixes
- Fixed Livewire 4 compatibility - Resolved MethodNotFoundException: Public method [toJSON] not found on component when using the package with Livewire 4. The
root cause was$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.
(#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 positions
Input Methods
Dedicated methods for collecting user input directly within an alert:
withTextInput(),withEmailInput(),withPasswordInput(),withNumberInput(),withTextareaInput()withSelectInput(),withRadioInput(),withCheckboxInput(),withFileInput()
- Fixed Livewire 4 compatibility - Resolved MethodNotFoundException: Public method [toJSON] not found on component when using the package with Livewire 4. The
-
v4.0.924 Mar 2026Nothing published for this version
-
v4.0.828 Jan 2026 -
v4.0.730 Sep 2025Release notes
Open source →What's Changed
- Update README.md by @jantinnerezo in #174
- Add native image option support by @yardsoul in #175
New Contributors
Full Changelog: v4.0.6...v4.0.7
-
v4.0.613 Jul 2025Release notes
Open source →What's added?
- Added
allowOutsideClickmethod with boolean type parameter "allowed" default istrue - Added
allowEscapeKeymethod with boolean type parameter "allowed" default istrue - Allow
nullparameter type ontimermethod
Usage
For 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: 4.0.5...v4.0.6
- Added
-
4.0.521 Apr 2025Release notes
Open source →- Added
htmlfunction
LivewireAlert::title('New html function!') ->html("<p><strong>You should try it out!</strong></p>") ->show();
Full Changelog: v4.0.4...4.0.5
- Added
-
v4.0.420 Mar 2025Release notes
Open source →What's Changed
- Feat: add comments to the alert facade to phpstan and editors understand by @juanjoballesteros in #167
New Contributors
- @juanjoballesteros made their first contribution in #167
Full Changelog: v4.0.3...v4.0.4
-
v4.0.307 Mar 2025Release notes
Open source →What's Changed
- Fixed: onDeny method triggers onConfirm automatically by @jantinnerezo in #164
Full Changelog: v4.0.2...v4.0.3
-
v4.0.204 Mar 2025 -
v4.0.104 Mar 2025Nothing published for this version
-
v4.0.004 Mar 2025Nothing published for this version
-
v3.0.326 Feb 2025Nothing published for this version
-
v3.0.210 Mar 2024Nothing published for this version
-
v3.0.114 Oct 2023Nothing published for this version
-
2.2.715 Feb 2023Nothing published for this version
-
2.2.615 Mar 2022Nothing published for this version
-
2.2.508 Mar 2022Nothing published for this version
-
2.2.402 Feb 2022Nothing published for this version
-
2.2.321 Nov 2021Nothing published for this version
-
2.2.220 Nov 2021Nothing published for this version
-
2.2.109 Nov 2021Nothing published for this version
-
2.2.009 Nov 2021Nothing published for this version
-
2.1.908 Nov 2021Nothing published for this version
-
2.1.827 Oct 2021Nothing published for this version
-
2.1.727 Jul 2021Nothing published for this version
-
2.1.606 May 2021Nothing published for this version
-
2.1.509 Mar 2021Nothing published for this version
-
2.1.405 Jan 2021Nothing published for this version
-
2.1.304 Jan 2021Nothing published for this version
-
2.1.227 Dec 2020Nothing published for this version
-
2.1.127 Dec 2020Nothing published for this version
-
2.0.214 Nov 2020Nothing published for this version
-
2.0.111 Nov 2020Nothing published for this version
-
1.2.009 Sep 2020Nothing published for this version
-
v3.021 Jul 2023Nothing published for this version
-
v1.014 Jun 2020Nothing published for this version
-
2.126 Dec 2020Nothing published for this version
-
2.002 Nov 2020Nothing published for this version