Sweetalert2
A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
Import Package
<!-- Sweet Alert package-->
import Swal from "sweetalert2";
Add Package
yarn add sweetalert2 --save
Remove Package
yarn remove sweetalert2 or you can remove package by removing specific package from package.json .
Examples
| Title | Example |
|---|---|
| A Basic Message |
|
| A Title with a Text Under |
|
| A Success message! |
|
| A Modal with a title, an error icon, a text, and a footer |
|
| A Modal window with a long content inside |
|
| A Warning message, with a function attached to the "Confirm"-button... |
|
| By passing a parameter, you can execute something else for "Cancel". |
|
| A message with custom Image Header. |
|
| A message with auto close timer. |
|
| Custom HTML description and buttons. |
|
| A dialog with three buttons. |
|
| A custom positioned dialog. |
|
| A message with custom width, padding and background. |
|
| Ajax request example. |
|