Changelog
Every version of qwik-sonner, newest first. Versions, dist-tags and dates come straight from npm; the notes are the GitHub releases.
breakingnewfixdeprecated
Qwik 2
2.0.0-beta.3beta
Moves to Qwik 2.0.0-rc.4 and Vite 8.
Breaking changes
- Needs
@qwik.dev/core2.0.0-rc.4 or later, and so Vite 8.
Fixes
- Two toasts fired back to back, before the first had rendered, no longer stall the Toaster on the dev server (fixed by Qwik 2.0.0-rc.4).
Qwik 2
2.0.0-beta.2
Fixes from an audit of 2.0.0-beta.1, and parity with sonner 2.0.8. Still needs @qwik.dev/core 2.0.0-beta.37 or later.
Breaking changes
toast.dismiss()dismisses only the toasts still on screen and marks them dismissed, so a Toaster mounted later doesn't show them again.toast.dismiss("")no longer dismisses every toast (sonner 2.0.8).classes.default(andtoastOptions.classes.default) applies only to toasts without a type (sonner 2.0.8).toast.getHistory()keeps at most 100 toasts, dropping the oldest dismissed ones first, and no longer lists the same toast twice (sonner 2.0.8).
Features
- More exported types, from both
qwik-sonnerandqwik-sonner/headless:Position,Theme,Direction,SwipeDirection,ToastIcons,ToastTypes,OffsetandPromiseData.
Fixes
- A
<Toaster>oruseSonner()first rendered on the client (behind a condition, or after a<Link>navigation) receives toasts, and stops listening when it unmounts. - Toasts fired before the Toaster subscribes, e.g. on a click right after the page loads, are no longer lost.
topLayer: each Toaster opens its popover only for its own toasts, and its next toast brings it back above a modal opened after it.- With several Toasters, collapsing the stack and returning focus depend only on the Toaster's own toasts.
theme="system"follows changes to the OS color scheme, and stops listening when the prop changes or the Toaster unmounts.- A toast with
id: 0can be updated and dismissed. - A swipe still dismisses a toast that re-renders mid-drag, and only a swipe towards an allowed direction dismisses it (sonner 2.0.8).
toast(),toast.message()andtoast.custom()reset the type of the toast they update, so a loading toast can become a plain one. Re-creating a dismissed id starts a fresh toast (sonner 2.0.8).- A loading toast shows its custom
icon, the built-in icons are hidden from assistive technology, and the toast content fills the remaining width (sonner 2.0.8). - The npm package no longer ships Qwik build manifests (
q-manifest.json,bundle-graph.json).
Deprecated
importantandAction.actionButtonStyle: they have no effect, as in sonner 2, and stay only for compatibility.
Qwik 2
2.0.0-beta.1
A ground-up port to Qwik 2 (@qwik.dev/core) with feature parity with sonner 2.0.7. Zero runtime dependencies.
Breaking changes
- Requires Qwik 2:
@qwik.dev/core(>= 2.0.0-beta.37) is now a peer dependency. Qwik 1 (@builder.io/qwik) is no longer supported — stay on 1.x for Qwik 1 apps. - ESM-only package. The CommonJS builds (
*.qwik.cjs) were removed. - String
title/descriptionvalues render as text instead of sanitized HTML; the DOMPurify dependency is gone. Pass JSX for rich content. - Icons (
icons, per-toasticon,loadingIcon) take JSX (JSXOutput) instead of aComponent. - Defaults aligned with sonner 2: viewport
offset32px → 24px (newmobileOffset, 16px) and swipe threshold 20px → 45px. Markup and stylesheet follow sonner'sdata-sonner-*contract. importantno longer switches a toast toaria-live="assertive"; all toasts are announced through the toaster's polite live region (sonner 2).theme="system"stops reading/writinglocalStorage.theme.
Features
- Swipe to dismiss in any direction with drag dampening, configurable through
swipeDirections. - Multiple toasters: give a
<Toaster>anidand target it withtoasterId. topLayerprop renders toasts above native<dialog>modals and fullscreen elements via the Popover API.position,theme,richColors,dirandinvertaccept aSignalto change at runtime.useSonner()hook, plustoast.getToasts()andtoast.getHistory().toast.promise()gainsunwrap(), extended results ({ message, ...options }), JSX results and automatic error toasts for failedResponses andErrorvalues.- New options: per-toast
richColorsandtestId, per-sideoffsetobjects,mobileOffset,icons.close,customAriaLabelandtoastOptions.closeButtonAriaLabel. - New exported types:
ToastClassnames,ToastToDismissandAction.
Fixes
- The first toast animates its enter transition.
- Swiped toasts keep sliding off-screen instead of snapping back before fading.
- Pointer capture is set synchronously, so a swipe no longer sticks to the cursor.
- The Toaster subscribes on
qinit, so toasts render in Safari/WebKit and when the Toaster sits below the fold.
Deprecated
pauseWhenPageIsHidden— timers now always pause while the page is hidden.loadingIcon— useicons.loading.
Qwik 1
Qwik 1
Qwik 1
Qwik 1
1.0.0
The stable line for Qwik 1.
Features
- New build and publish pipeline, gated on the e2e suite.
Fixes
- Toasts use the correct CSS class names.
Qwik 1
Qwik 1
Qwik 1
Qwik 1
Qwik 1
0.3.2
Features
- Headless entry point:
qwik-sonner/headlessships the core without styles.
Qwik 1
Qwik 1
Qwik 1
Qwik 1
Qwik 1
0.2.0
Features
- Pass attributes and event handlers through to the toast list.
Fixes
- Resumability: the Toaster no longer eagerly loads its code.
Qwik 1
0.1.0
Features
ToasterPropsis exported.
Fixes
positioncan change dynamically.- Default styles are applied to the Toaster.
Docs
- Documentation website.
Qwik 1
Qwik 1