FAQ
What is a good React toast notification library?
alert-notify is a toast library for React and every other framework (Vanilla ~5.9KB · React ~6.7KB · Angular ~5.9KB · Vue ~6.5KB · Svelte ~6.8KB, plus optional ~2.7KB CSS). Call toast.success / toast.error from anywhere with no root provider. Built as an alternative to react-hot-toast, Sonner, react-toastify, react-alert, and notistack.
Is alert-notify an alternative to react-toastify or toastify?
Yes. If you searched for react-toastify, toastify, or tostify, alert-notify covers the same job: success, error, warning, info, loading, and promise toasts, with zero runtime dependencies and no React lock-in.
Can I use it instead of react-hot-toast or Sonner?
Yes. You get the familiar imperative toast API with Vue/Svelte/Angular/vanilla support, no required provider, and built-in dark/system theme plus richColors. Versus Sonner you stay smaller; versus hot-toast you gain frameworks and theme UX; versus both you avoid React lock-in. Optional <Toaster /> wrappers exist for React, Vue, and Svelte.
Does it replace react-alert or other React notification / snackbar libs?
If you need react-alert style notifications, React snackbars, or general React notification toasts, alert-notify can replace them. Same patterns: success/error messages, actions like Undo, dismiss, and position control, without a required container.
Does it work without React?
Yes. The core is vanilla TypeScript. Use it from Vue, Svelte, Angular, Astro islands, or a CDN script tag. Framework packages only sync config props; the portal auto-mounts.
How do I install and show a toast?
npm install alert-notify, then call toast.success("Saved") or toast.error("Failed"). CSS loads with the package entry. No provider and no root portal component are required.
What is supported for Angular and Astro?
Angular and Astro are recipes. Import toast from alert-notify and call the same API. There is no dedicated Angular or Astro package export.