SweetAlerts2 - Nice JavaScript Alerts Library
SweetAlerts2 - Nice JavaScript Alerts Library
Advertisement

A zero dependencies beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript’s popup boxes

Installation

You can install SweetAlerts2 via npm

or by you can grab it via jsdeliver CDN

Usage

1. Initialize the plugin by referencing the necessary files:

You can also include the stylesheet separately if desired:

Or

It’s possible to import JS and CSS separately, e.g. if you need to customize styles:

2. Call the sweetAlert2-function after the page has loaded

You can go to the official library site to see Alerts Examples, by clicking on this link.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.