A Beautiful and Small JavaScript Notification Prompt Plugin | promptJS


Prompt.js is a lightweight, configurable JavaScript notification library for creating beautiful, cross-platform, toast-like notification popups using regular JavaScript.

How to make use of it:

1. Insert the Prompt.js and Prompt.css into the HTML web page.

<link rel="stylesheet" href="src/prompt.css" />
<script src="src/prompt.js"></script>

2. Create a brand new occasion of the Prompt.js and we’re able to go.

var p = loadPrompt();

3. Create primary alert popups with pre-built sorts. Note that these alert popups will auto dismiss after 2 seconds.

p.success('Success Message');
p.warn('Warning Message');
p.error('Error Message');
p.inform('Information Message');

4. Create a Sticky alert popup that may all the time be seen till it’s clicked/tapped.

var sticky = p.inform('Click Me To Remove', true);
  m.remove() // remove

5. Switch between notification types and replace alert message programmatically.

var advanced = p.error('Switch After 2 Seconds',true);

6. Clear all activated alert popups.


7. Config the alert popup.

  classList: {}
  displayTime: 1690
  errorModel: DOM
  informModel: DOM
  shake: true
  successModel: DOM
  warnModel: DOM

Practical Alert Popup Library, prompt JS Plugin/Github

See Demo And Download

Official Website(SolomonLeon): Click Here

This superior jQuery/javascript plugin is developed by SolomonLeon. For extra Advanced Usages, please go to the official website.