~4 KB
minified + gzipped
0
dependencies
4
animation styles
8
positions
0
toasts fired here
๐ Quick fire Try it
๐ Playground Configure
โจ Animation showcase 4 styles
๐ Before & after The revival
โ toastr v2 (2015)
- โ Requires jQuery (~87 KB overhead)
- โ JS-driven animations (layout thrash)
- โ No dark mode
- โ No TypeScript types
- โ Inaccessible (screen readers blind)
- โ No ESM / tree-shaking
- โ Gulp + LESS (abandoned toolchain)
- โ No Promise API
- โ No keyboard support
- โ PNG sprite icons (extra HTTP request)
โ toastr-next v3 (2026)
- โ Zero dependencies โ pure vanilla JS
- โ CSS @keyframes โ buttery smooth
- โ Auto dark mode via prefers-color-scheme
- โ Full TypeScript types + JSDoc
- โ ARIA live regions, roles, keyboard nav
- โ ESM + CJS + IIFE bundles
- โ Vite build + Vitest tests
- โ Promise API (await toast.onDismissed)
- โ Escape key + focus management
- โ CSS pseudo-element icons (no images)
๐ป Code samples Drop-in API
Basic usage
Promise API
Migration
// Install npm install toastr-next // Import (ESM) import toastr from 'toastr-next'; import 'toastr-next/dist/toastr.css'; // Same API as before โ no jQuery! toastr.success('Saved!'); toastr.error('Failed', 'Oops'); toastr.info('New update'); toastr.warning('Low disk space', 'Warning'); // Global options toastr.options = { positionClass: 'toast-bottom-right', animation: 'bounce', progressBar: true, closeButton: true, };