Skip to content

A beautiful, responsive, highly customizable and accessible replacement for JavaScript's popup boxes. Zero dependencies.Alerts ,dialogs

Notifications You must be signed in to change notification settings

asgaraliyev/asgar-alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsgarAlert (v1) for JS


Install

<script defer src="/asgar-alert.js"></script>

Examples

The most basic message:

asgar("Hello world!");

A message signaling an error:

asgar("Something went wrong!", "error");

Handling the result of AsgarAlert modal:

asgar({
  title: "Are you sure?",
  message: "Want to log out?",
  details: "You will not able to recover this action",
  left: "Cancel",
  right: "Yes,Iam sure",
})
  .then(() => {
    console.log("right button clicked");
  })
  .catch(() => {
    console.log("left button clicked");
  });

View more examples

Browser compatibility

IE11* Edge Chrome Firefox Safari Opera Android Browser* UC Browser*

About

A beautiful, responsive, highly customizable and accessible replacement for JavaScript's popup boxes. Zero dependencies.Alerts ,dialogs

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published