โญ Star on GitHub

๐Ÿš€ Robust Toast Notifications

Production-ready notification system with bulletproof error handling, validation, and user experience features that actually work in real applications.

๐Ÿ›ก๏ธ
Bulletproof Validation
๐ŸŽฏ
Duplicate Prevention
๐Ÿงน
Auto Cleanup
โšก
Error Reporting

๐ŸŽฎ Interactive Demo

Try the buttons below. Notice how duplicate messages are prevented and invalid inputs are handled gracefully!

๐Ÿ’ก Pro Tip: Open your browser's console (F12) to see the error reporting system in action!

๐Ÿค” Why Another Toast Library?

Most toast libraries break in production. Here's what makes this one different:

๐Ÿ›ก๏ธ
Bulletproof Input Validation

Invalid parameters don't crash your app. They get logged, reported, and handled gracefully with sensible fallbacks.

๐ŸŽฏ
Smart Duplicate Prevention

Automatically prevents identical messages from spamming users. Based on message content, not timing.

๐Ÿงน
Zero Memory Leaks

Automatically cleans up DOM elements, event listeners, and empty containers. No manual cleanup required.

๐Ÿ“Š
Built-in Error Reporting

Comprehensive logging with context and metadata. Ready for production monitoring tools like Sentry.

๐Ÿ“ฆ Quick Start

1. Install
npm install bootstrap
# Clone or download the files
2. Import
import notificationService from './src/notificationService.js';

// Simple usage
notificationService.success('โœ… Data saved!');
notificationService.error('โŒ Something went wrong');
notificationService.warning('โš ๏ธ Check your input');

// Advanced usage
notificationService.showToast('Custom message', 'info', 3000);
3. That's it!

The system handles validation, duplicates, cleanup, and error reporting automatically.

๐Ÿ“Š vs Other Libraries

Feature This Library Basic Bootstrap Toastr.js
Input Validation โœ… Bulletproof โŒ None โš ๏ธ Basic
Duplicate Prevention โœ… Smart โŒ None โŒ None
Memory Management โœ… Automatic โš ๏ธ Manual โš ๏ธ Manual
Error Reporting โœ… Built-in โŒ None โŒ None
Production Ready โœ… Yes โŒ Fragile โš ๏ธ Sometimes