Author: | izisaurio |
---|---|
Views Total: | 522 views |
Official Page: | Go to website |
Last Update: | January 26, 2025 |
License: | MIT |
Preview:

Description:
A compact and sleek JavaScript library for building custom confirmation dialogs that enhance user experience. Built-in support for 5 languages (English, French, Spanish, German, Portuguese) and easy expansion for global reach.
How to use it:
1. Download and import the confirmDialog.js script.
<script src="confirmDialog.js"></script>
2. Create a new confirm dialog instance.
const dialog = new ConfirmDialog({ message: 'Do you want to confirm this action?', okText: 'Ok', cancelText: 'Cancel' });
3. Display a confirm dialog on the page. It will return Promises to handle user confirmation or cancellation actions.
dialog.show('Are You Sure?').then((result) => { console.log(result.ok); });
4. More options to customize the confirm dialog.
const dialog = new ConfirmDialog({ // custom CSS classes textClass: '', okClass: '', useCancel: true, cancelClass: '', modalClass: '', // enable themes success: false, warning: false, error: false, });
Changelog:
v1.1.1 (01/26/2025)
- Update confirmation dialog styles and functionality;