Works everywhere
Native core for any JS. Helper exports for React, Vue, and Svelte. Angular and Astro use the same API as recipes.
v3.1.0 · React · Vanilla · Vue · Svelte · Angular · and more
Toast notifications for any framework.
Same imperative API in React, Vue, Svelte, Angular, Astro, or a CDN script. No root provider. About Vanilla ~5.9KB · React ~6.7KB · Angular ~5.9KB · Vue ~6.5KB · Svelte ~6.8KB + ~2.7KB CSS per path.
npm install alert-notifyMode: success · position top-right · richColors on
Install once, then import the entry for your stack. Tabs below show the shortest path for each.
import { toast, Toaster } from "alert-notify/react";
export function App() {
return (
<>
<Toaster position="top-right" richColors />
<button onClick={() => toast.success("Saved")}>Save</button>
</>
);
}import { toast } from "alert-notify";
toast.config({ position: "top-right", richColors: true });
toast.success("Saved");<script src="https://unpkg.com/alert-notify@3/dist/alert-notify.global.js"></script>
<script>
AlertNotify.toast.success("Hello from CDN");
</script><script setup>
import { toast, Toaster } from "alert-notify/vue";
</script>
<template>
<Toaster position="top-right" :rich-colors="true" />
<button @click="toast.success('Saved')">Save</button>
</template><script>
import Toaster from "alert-notify/svelte";
import { toast } from "alert-notify/svelte/toast";
</script>
<Toaster position="top-right" richColors />
<button onclick={() => toast.success("Saved")}>Save</button>import { toast } from "alert-notify";
toast.config({ position: "top-right", richColors: true });
toast.success("Saved");Native core for any JS. Helper exports for React, Vue, and Svelte. Angular and Astro use the same API as recipes.
The portal auto-mounts. Optional Toaster wrappers only sync config props. Call toast.success from anywhere.
Loading to success or error on one id, Undo buttons, stacking, swipe dismiss, and pause on hover or blur.
light, dark, and system themes plus richColors and CSS variables. About Vanilla ~5.9KB · React ~6.7KB · Angular ~5.9KB · Vue ~6.5KB · Svelte ~6.8KB per path, zero runtime deps.