npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

changealert

v1.0.2

Published

A lightweight, customizable JavaScript alert and notification library.

Readme

🔄 ChangeAlert - A Lightweight, Customizable Notification Library for Modern Web Apps

License: MIT


Overview

ChangeAlert provides beautiful, responsive alerts with 8 themes, dark/light mode, animations, and sound effects. Easily customizable with simple API calls. Perfect for form validations, system alerts, and user notifications. Works across all devices and browsers.

📦 Installation

Via CDN (Easiest)

<!-- In your HTML <head> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rajkumarnimod/changealert/dist/changealert.min.css">

<!-- Just before </body> -->
<script src="https://cdn.jsdelivr.net/gh/rajkumarnimod/changealert/dist/changealert.min.js"></script>

Via NPM (Recommended for Modern Projects)

npm install changealert
  • Then import it in your JavaScript:

For Webpack/Vite/ESM:

import 'changealert/dist/changealert.min.css';
import ChangeAlert from 'changealert';

For CommonJS:

require('changealert/dist/changealert.min.css');
const ChangeAlert = require('changealert');

🛠️ How It Works

ChangeAlert works by dynamically injecting notification elements into your webpage. When triggered, it creates alert divs with your message, applies selected themes/animations, and positions them on screen. The library manages multiple alerts through a queue system, automatically handling show/hide transitions. Features like progress bars, sounds, and callbacks are processed through an optimized event system. It uses pure JavaScript with zero dependencies, ensuring fast performance across all browsers.


✅ Key Features

  • 8 Color Themes (Success, Error, Info, etc.)
  • Light/Dark/Auto Modes
  • 9 Entrance Animations
  • 6 Screen Positions
  • Sound Effects for Alerts
  • HTML or Plain Text Support
  • Auto Close Timer + Progress Bars
  • Custom Action Buttons
  • Fully Responsive (Mobile-Friendly)
  • RTL Text Support
  • Callbacks (onShow, onClick, onClose, onTimeout)
  • Works in Vanilla JS, React, Vue, Angular

🛠️ Usage Examples

Simple Alert

ChangeAlert.success("File uploaded successfully!");

Custom Alert with Options

ChangeAlert.error("Login failed!", {
  timeout: 5000,
  position: "top-center",
  animationIn: "bounce"
});

🔧 Options Reference

ChangeAlert.info("Custom message", {
  position: "top-right",     // Alert position on the screen: 'top-left', 'top-center', etc.
  timeout: 4000,             // Auto-close delay in milliseconds (0 = manual close only)
  theme: "info",             // Alert type: 'success', 'error', 'info', 'warning'
  themeMode: "auto",         // Color mode: 'auto', 'light', or 'dark'
  icon: null,                // Custom icon as HTML, SVG, or image URL
  closeButton: true,         // Show or hide the close (X) button
  pauseOnHover: true,        // Pause the timeout countdown when hovered
  draggable: false,          // Make alert draggable (if supported)
  progressBar: true,         // Display a visual countdown progress bar
  sound: false,              // Play sound when alert appears
  html: false,               // Enable raw HTML content inside alert
  animationIn: "fadeIn",     // Entry animation
  animationOut: "fadeOut",   // Exit animation
  buttons: [                 // Action buttons with custom text and callback
    { text: "Retry", action: retryFunction }
  ],
  onShow: () => console.log("Alert appeared"),     // Triggered when alert is shown
  onClick: (e) => saveChanges(),                   // Triggered when alert is clicked
  onClose: () => console.log("Alert closed"),      // Triggered when alert is manually closed
  onTimeout: () => autoSave()                      // Triggered when alert closes due to timeout
});

Animation Types

// Available animations:
fadeIn, fadeOut, zoomIn, slideInRight, slideInLeft,
bounce, flip, pulse, spin

// Usage:

ChangeAlert.info("Watch this animation", {
  animationIn: "flip",
  animationOut: "zoomOut"
});

⚙️ Framework Integration

✅ HTML

  • Use via and as shown in CDN setup.

✅ React

import 'changealert/dist/changealert.min.css';
import ChangeAlert from 'changealert';

ChangeAlert.success("Hello from React!");

✅ Vue

import 'changealert/dist/changealert.min.css';
import ChangeAlert from 'changealert';

ChangeAlert.warning("Vue alert works!");

✅ Angular

import 'changealert/dist/changealert.min.css';
declare const ChangeAlert: any;

ChangeAlert.error("Angular alert triggered!");

🔔 Callbacks & Events

Use callbacks to hook into alert lifecycle.

ChangeAlert.warning("Unsaved changes!", {
  onShow: () => console.log("Alert appeared"),
  onClick: () => saveChanges(),      // Triggered when alert is clicked
  onClose: () => console.log("Alert closed"),
  onTimeout: () => autoSave()        // When alert disappears automatically
});

📱 Mobile Responsiveness

Automatically adjusts for small screens:

  • Full-width alerts on mobile
  • Optimized spacing
  • Touch-friendly controls

🌐 Browser Support

ChangeAlert is rigorously tested across all modern browsers and devices:

| Browser | Version | Mobile Support | Notes | |---------|---------|----------------|-------| | Chrome | 49+ | ✅ Android 5+ | Full functionality | | Firefox | 45+ | ✅ All devices | Best performance | | Safari | 9+ | ✅ iOS 9+ | Reduced animations | | Edge | 15+ | ✅ Windows Mobile | Full support |

Key Notes:

  • 🚀 Modern Browsers: All features work perfectly
  • 🐢 Legacy Browsers: Graceful degradation (no animations)
  • 📱 Mobile: Touch-optimized and responsive
  • 🔌 No Polyfills Needed: Works out-of-the-box

(Tested via BrowserStack on 100+ device/browser combinations)


🌐 Documentation

👉 Documentation: https://changealert.netlify.app/


📚 Documentation & Links


🏷️ Keywords

ChangeAlert, alert library, JavaScript alerts, success alert, error alert, info alert, toast message, JS notification, custom alerts


Author

Created with ❤️ by Rajkumar Nimod.

Connect with me on LinkedIn 📫 [email protected]


📄 License

MIT License – Free for personal and commercial use.


🌟 Support the Project

If you find ChangeAlert useful:

  • ⭐ Star the repo
  • 🗣 Share with fellow developers
  • 📢 Mention it in blogs, videos, or tutorials