npm / svelte-sonner
svelte-sonner
What changed in svelte-sonner 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.
1 new APIs and options1 behavior and defaults16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsvelte-sonner 118 changes
New APIs and options 1
Add an
idto a toaster and target it withtoast(..., { toasterId }); an<Toaster />id now identifies the toaster instead of being applied to its<ol>element.
Behavior and default changes 1
The
gapprop is now used in toast offset calculations.
Fixes and other changes 16
Toasts that inherit an infinite duration from Toaster or toastOptions no longer auto-close.
Fixes Firefox firing mouseleave when the mouse does not move.
Custom icons no longer render twice in promise toasts.
Styles use a native Svelte 5
:globalblock instead of svelte-preprocess<style global>, fixing crashes with the latest Vite Svelte and Tailwind plugins.A negative
heightIndexno longer briefly produces wrong offsets.Icons are hidden from assistive technology.
Fixed a crash when many toasts were created and dismissed quickly.
Fast flicks below the swipe distance threshold can now dismiss toasts.
Fast flicks can no longer dismiss a toast in a direction excluded by
swipeDirections.Toast content now takes the full toast width.
A toast recreated right after dismissal is no longer removed by a pending removal or the old auto-close timer.
Height entries keep the right order when several toasts mount at once.
Reusing a dismissed toast's id creates a fresh toast instead of inheriting its old props.
Toasts created before the
<Toaster />mounts are no longer lost.toast.custom()now keeps an explicit id of0.The
toastOptions.closeButtonsetting is now honored.