A comprehensive notification system with multiple types and auto-dismiss functionality. Perfect for modern web applications that need to display various types of notifications to users.
- Multiple Types: Success, Error, Warning, Info, and Custom notifications
- Auto Dismiss: Automatic removal with customizable timing
- Manual Control: Manual dismiss with close button
- Stacking: Multiple notifications stack beautifully
- Responsive: Works perfectly on all devices
- Customizable: Easy to customize colors, positions, and animations
- Accessible: Built with ARIA labels and keyboard navigation
index.html
- Main HTML structurestyle.css
- All styling and animationsscript.js
- JavaScript functionality
// Show different types of notifications
showNotification('Success!', 'success');
showNotification('Error occurred!', 'error');
showNotification('Warning message!', 'warning');
showNotification('Info message!', 'info');
// Custom notification with options
showNotification('Custom message', 'custom', {
duration: 5000,
position: 'top-right',
autoDismiss: true
});
- Success: Green notification for successful actions
- Error: Red notification for errors and failures
- Warning: Yellow notification for warnings
- Info: Blue notification for informational messages
- Custom: Customizable notification with your own styling
const config = {
duration: 3000, // Auto dismiss time (ms)
position: 'top-right', // Position on screen
autoDismiss: true, // Enable/disable auto dismiss
maxNotifications: 5, // Maximum notifications at once
animation: 'slide' // Animation type
};
- Chrome ✅
- Firefox ✅
- Safari ✅
- Edge ✅
- IE11+ ✅
Feel free to submit issues and enhancement requests!
This project is open source and available under the MIT License.
HarmonCode - harmoncode.com
⭐ If you find this useful, please give it a star!