Changelog
From the package CHANGELOG.md. Latest is 3.1.0 (per-toast options, framework icons, icon/progress colors). See Migration for upgrade tables from 1.x / 2.x.
Added
- Per-toast
richColors, position, and onOpen (overrides toaster defaults when set). toast.isActive(id) to check whether a toast is still open.- React, Vue, and Svelte toast helpers accept framework nodes as
icon. - React: import
toast from alert-notify/react - Vue: import
toast from alert-notify/vue - Svelte: import
toast / custom from alert-notify/svelte/toast - Svelte
custom({ component, props }) for mounting components into a toast body.
Changed
- Typed helpers accept
string | undefined messages (toast.error(maybeMessage) works without casts). - Default toast font size is
16px. - Icons use explicit CSS
stroke variables per type instead of currentColor. - Progress bar uses a lighter tint of the toast type accent (success / error / warning / info).
- Icons are vertically centered; the close button stays top-right.
- Per-toast positions render in separate toaster stacks.
- Docs, README, examples playground, and framework guides cover the new options.
Fixed
- Global
* { color: … } rules no longer restyle built-in toast icons.
Breaking
- Toast calls are message-first. The first argument is the body; optional
title is the heading. onDismiss / onAutoClose are replaced by onClose(toast, reason) with "Manual" | "Auto".- HTML on standard toasts is removed. Use
toast.custom() (or framework custom helpers) for markup. - Prefer
autoClose: false for sticky toasts instead of duration: Infinity. - Default toaster
theme is "light" (was "system").
Changed
- Styles load with the package entry. Explicit
import "alert-notify/style.css" still works. - Docs and site cover migration from 1.x / 2.x, framework guides, and the message-first API.
- Consumer-facing JSDoc on the public typed API for editor IntelliSense.
- README trimmed for npm: framework-agnostic positioning, short quick starts, entry points table, deep API/framework detail linked to the docs site.
package.json description leads with framework-agnostic positioning (not React-first).
Migration
// 2.x
toast.success("Profile updated", { description: "Your profile was saved." });
// 3.0
toast.success("Your profile was saved.", { title: "Profile updated" });
See Migration for the full upgrade table.
Fixed
- Bug fixes and packaging polish on the 2.x API.
Changed
- README and site discoverability updates (FAQ, alternatives).
Added
- Imperative
toast API with success, error, warning, info, loading, and message. - Optional React, Vue, and Svelte
<Toaster /> wrappers. - Dark / system theme and
richColors. - Stacking, progress, and swipe dismiss.
Changed
- Rewrite of the 1.x
showAlert / container model into a modern toaster.
Fixed
- Stabilized the classic
AlertNotifyContainer flow.
Fixed
- Packaging and alert handling polish on the 1.x line.
Added
- First 1.x stable with
showAlert helpers. - SUCCESS / ERROR style alerts and container mounting.
Added
- Initial public release on npm.