container-header

Alert dialogs

container-breadcrumb
Settings
Fixed sidebar
Fixed footer
Fixed top navbar
Collapse sidebar
Boxed
Background
Default
Dark
Light
Themes
Default
White Light
Blue Navy
Blue Sky
Lime Lemon
Star Dust
Green Tea
Orange Round
Yellow Sun
Deep Purple
Yummy Chocolate
Dark Night
Soft Green
Wheel Red

The alert system uses the same style than all the other components in the template. It uses SweetAlert, a beautiful replacement for JavaScript's 'Alert'.

SweetAlert was created by Tristan Edwards 漏
More information at http://t4t5.github.io/sweetalert/

Alert Default

Default alert example. By default alerts takes the Theme color schema.

Source example:
swal("Here's a message!")

Click on 'Try me!' button to see this example:

Alert Bootstrap Colors

Bootstrap colors styled alerts

CSS Classes:.swal-default, .swal-primary, .swal-info, .swal-success, .swal-warning, .swal-dangeror .swal-inverse

Source example:
swal({                                      title: "Bootstrap colors!",                                      text: "Success bootstrap color style for SweetAlert!",                                      confirmButtonText: "Cool!",                                      customClass: "swal-success"                                    });

Click on 'Try me!' button to see this example:

Alert Theme colors

Theme color alerts. By default alerts take the Theme color.

Source example:
swal({                                      title: "Theme colors!",                                      text: "Theme colors styled alerts for SweetAlert!",                                      confirmButtonText: "Cool!"                                    });

Change theme and click on 'Try me!' button to see how alert changes:

Alert Timer

A message with auto close timer

Source example:
swal({                                      title: "Auto close alert!",                                      text: "I will close in 2 seconds.",                                      timer: 2000,                                      showConfirmButton: false                                    });

Click on 'Try me!' button to see this example:

Alert Warning Confirm

A warning message, with a function attached to the "Confirm"-button...

Source example:
swal({                                      title: "Are you sure?",                                      text: "You will not be able to recover this imaginary file!",                                      type: "warning",                                      showCancelButton: true,                                      confirmButtonColor: "#DD6B55 !important",                                      confirmButtonText: "Yes, delete it!",                                      closeOnConfirm: false                                    },                                    function(){                                      swal("Deleted!", "Your imaginary file has been deleted.", "success");                                    });

Click on 'Try me!' button to see this example:

Alert Input

A replacement for the "prompt" function

Source example:
swal({                                      title: "An input!",                                      text: "Write something interesting:",                                      type: "input",                                      showCancelButton: true,                                      closeOnConfirm: false,                                      animation: "slide-from-top",                                      inputPlaceholder: "Write something"                                    },                                    function(inputValue){                                      if(inputValue ===false) returnfalse;                                                                            if(inputValue ==="") {                                        swal.showInputError("You need to write something!");                                        returnfalse                                      }                                                                            swal("Nice!", "You wrote: "+ inputValue, "success");                                    });

Click on 'Try me!' button to see this example:

Alert Transparent

Transparent alert.

CSS Classes:.swal-transparent

Source example:
swal({                                      title: "Transparent alert!",                                      text: "Transparent alert style for SweetAlert!",                                      confirmButtonText: "Cool!",                                      customClass: "swal-transparent"                                    });

Click on 'Try me!' button to see this example:

Alert Bootstrap Full Colors

Bootstrap colors styled alerts full color.

CSS Classes:.swal-full

Source example:
swal({                                      title: "Bootstrap full colors!",                                      text: "Success bootstrap full color style for SweetAlert!",                                      confirmButtonText: "Cool!",                                      customClass: "swal-success swal-full"                                    });

Click on 'Try me!' button to see this example:

Alert Theme full colors

Alert full color with Theme color.

CSS Classes:.swal-full

Source example:
swal({                                      title: "Theme full colors!",                                      text: "Theme full colors styled alerts for SweetAlert!",                                      confirmButtonText: "Cool!"                                      customClass: "swal-full"                                    });

Change theme and click 'Try me!' button to see how alert changes:

Alert Success Message

A success message alert.

Source example:
swal("Good job!",                                     "You clicked the button!", "success")

Click on 'Try me!' button to see this example:

Alert Warning Cancel

Warning message by passing a parameter, you can execute something else for "Cancel".

Source example:
swal({                                      title: "Are you sure?",                                      text: "You will not be able to recover this imaginary file!",                                      type: "warning",                                      showCancelButton: true,                                      confirmButtonColor: "#DD6B55 !important",                                      confirmButtonText: "Yes, delete it!",                                      cancelButtonText: "No, cancel plx!",                                      closeOnConfirm: false,                                      closeOnCancel: false                                    },                                    function(isConfirm){                                      if(isConfirm) {                                        swal("Deleted!", "Your imaginary file has been deleted.", "success");                                      } else{                                        swal("Cancelled", "Your imaginary file is safe :)", "error");                                      }                                    });

Click on 'Try me!' button to see this example:

Alert HTML Message

An HTML message

Source example:
swal({                                      title: "HTML <small>Title</small>!",                                      text: "A custom <span style="color:#F8BB86">html<span> message.",                                      html: true                                    });

Click on 'Try me!' button to see this example: