Skip to content
Project

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/core 2.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 (and toastOptions.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-sonner and qwik-sonner/headless: Position, Theme, Direction, SwipeDirection, ToastIcons, ToastTypes, Offset and PromiseData.

Fixes

  • A <Toaster> or useSonner() 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: 0 can 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() and toast.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

  • important and Action.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/description values render as text instead of sanitized HTML; the DOMPurify dependency is gone. Pass JSX for rich content.
  • Icons (icons, per-toast icon, loadingIcon) take JSX (JSXOutput) instead of a Component.
  • Defaults aligned with sonner 2: viewport offset 32px → 24px (new mobileOffset, 16px) and swipe threshold 20px → 45px. Markup and stylesheet follow sonner's data-sonner-* contract.
  • important no longer switches a toast to aria-live="assertive"; all toasts are announced through the toaster's polite live region (sonner 2). theme="system" stops reading/writing localStorage.theme.

Features

  • Swipe to dismiss in any direction with drag dampening, configurable through swipeDirections.
  • Multiple toasters: give a <Toaster> an id and target it with toasterId.
  • topLayer prop renders toasts above native <dialog> modals and fullscreen elements via the Popover API.
  • position, theme, richColors, dir and invert accept a Signal to change at runtime.
  • useSonner() hook, plus toast.getToasts() and toast.getHistory().
  • toast.promise() gains unwrap(), extended results ({ message, ...options }), JSX results and automatic error toasts for failed Responses and Error values.
  • New options: per-toast richColors and testId, per-side offset objects, mobileOffset, icons.close, customAriaLabel and toastOptions.closeButtonAriaLabel.
  • New exported types: ToastClassnames, ToastToDismiss and Action.

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 — use icons.loading.
Qwik 1

1.0.3latest

Fixes

  • closeButton works as expected.
Qwik 1

1.0.2

Fixes

  • Corrected the type declarations of the headless entry.
Qwik 1

1.0.1

Fixes

  • Fixed the qwik-sonner/headless path in exports.
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

0.4.1

No release notes for this version.

Qwik 1

0.4.0

No release notes for this version.

Qwik 1

0.3.4

Features

  • theme can change at runtime through a signal.
Qwik 1
Qwik 1

0.3.2

Features

  • Headless entry point: qwik-sonner/headless ships the core without styles.
Qwik 1

0.3.1

Fixes

  • Headless types are exported.
Qwik 1

0.3.0

Features

  • Updated to Qwik 1.5.1.
Qwik 1
Qwik 1

0.2.1

Fixes

  • Removed NodeJS namespace types from the public API.
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

  • ToasterProps is exported.

Fixes

  • position can change dynamically.
  • Default styles are applied to the Toaster.

Docs

  • Documentation website.
Qwik 1

0.0.2

Fixes

  • Toaster type declarations.
Qwik 1

0.0.1

Initial release — a Qwik port of sonner.