AlertifyJS – pretty JavaScript notifications

A solution for creating pretty JavaScript notifications – AlertifyJS. Develop nice browser dialogs and notifications.

AlertifyJS – framework for pretty JavaScript notifications

This open source solution brings many advantages. It’s feature-rich – packed with awesome features!

AlertifyJS is also extensible – extend existing dialogs, or create your own – it’s simple. We can also adjust themes.

The solution is responsive – whether you use a desktop, laptop, tablet or mobile device.

Different language or a right-to-left layout covered (I18n and RTL Support).

AlertifyJS framework
AlertifyJS framework

AlertifyJS not only provides a replacement for default browser dialogs, it makes it super easy to create your own!

Sample code:

if(!alertify.myAlert) {
  //define a new dialog
  alertify.dialog('myAlert',function(){
    return {
      main:function(message) {
        this.message = message;
      },
      setup:function() {
          return { 
            buttons:[{text: "cool!", key:27/*Esc*/}],
            focus: { element:0 }
          };
      },
      prepare:function() {
        this.setContent(this.message);
      }
  }});
}

// run
alertify.myAlert("Browser dialogs made easy!");

Another example – prompt dialog:

alertify.prompt("This is a prompt dialog.", "Default value",
  function(evt, value ) {
    alertify.success('Ok: ' + value);
  },
  function() {
    alertify.error('Cancel');
  });

License: MIT

Project homepage:

http://alertifyjs.com

Get pretty JavaScript notifications from GitHub:

https://github.com/MohammadYounes/AlertifyJS

See also:

CSS modal dialogs tutorial

Bootbox.js – easy Bootstrap modal dialogs

Enjoy!

Share:Share on Facebook1Share on Google+0Tweet about this on TwitterShare on LinkedIn1Pin on Pinterest1