
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/03/2025
- Bugfixes
The post Minimal Alert & Confirmation Modals in JavaScript – PopupJs.js appeared first on CSS Script.
Discover more from RSS Feeds Cloud
Subscribe to get the latest posts sent to your email.
