Minimal Alert & Confirmation Modals in JavaScript – PopupJs.js

Category: Javascript , Notification | May 4, 2025
Authortharun-kumar-r
Last UpdateMay 4, 2025
LicenseMIT
Views106 views
Minimal Alert & Confirmation Modals in JavaScript – PopupJs.js

PopupJs.js is a lightweight JavaScript library for creating customizable alert and confirm modals in your web applications.

It supports various alert types, including success, error, warning, and confirmation. Each popup has appropriate styling and icons to convey the message intent intuitively.

How to use it:

1. Download and add the PopupJs.js library to your webpage.

<script src="PopupJs.js"></script>

2. The library provides four main functions to create different types of popups:

// Display a success message
showSuccess('Success message');
// Show an error notification
showError('Error Message');
// Present an information alert
showInfo('Info Message!');
// Request user confirmation
showConfirm('Are you sure ?', () => { 
  alert('Confirmed') 
});

Changelog:

05/04/2025

  • Bugfixes

You Might Be Interested In:


Leave a Reply