toastr-next

The legendary notification library revived. Zero dependencies. TypeScript. CSS animations. Dark mode. ARIA.

โœ“ Zero dependencies v3.0.0 MIT License WCAG 2.1 AA TypeScript Dark mode auto
npm install toastr-next
~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 (old)
87 KB (jQuery + toastr)
toastr-next v3
~4 KB gzipped

โœ• 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,
};