DialogJS
Javascript dialog alternative using promise.
Installation
Using NPM:
npm install dialogjs --save
Then, add dialog.min.css
and dialog.min.js
from dist
directory to your project html file.
Usage
After required files are inserted, you can access Dialog
object from your script.
Alert
Display alert dialog box, can be used for displaying important information that requires user's attention.
Dialog;
Confirm
Display confirmation dialog box with Yes or No options.
Dialog;
Prompt
Display prompt dialog box with an input. Input types can be defined via option type
. Currently, possible values for input types are: text
(default) and password
.
Default Text Input
Dialogprompt'Dialog Title''Message to be displayed';
Password Input
Dialogprompt'Dialog Title''Message to be displayed' type: 'password' ;
License & Attributions
This project is published under MIT license. This project was originally forked from coderaiser/smalltalk. Thanks to coderaiser for the great work of Smalltalk.