You are reading docs for v1.3.1, click here for the latest version.
AlertDialog

This is an overview of the most common usage of AlertDialog. For more information about the available properties, methods, or events, head over to the complete API documentation for AlertDialog.

The alert() method shows a message and an OK button. Use it to show information and notifications that do not require an action from the user.

The method is part of the dialogs module.


Basic use

The alert() method is available globally. You can call it anywhere in your app.

alert('Your message')
  .then(() => {
    console.log("Alert dialog closed.");
  });

Configure dialog options

alert({
  title: "Your title",
  message: "Your message",
  okButtonText: "Your OK button text"
}).then(() => {
  console.log("Alert dialog closed");
});
Contributors