Skip to main content
Use this API to show a modal alert dialog with a message and an action button.

Parameters

PropertyTypeRequiredDescription
titleStringNoAlert title
contentStringNoAlert message content
buttonTextStringNoButton label (default: “OK”)
successFunctionNoCallback on success
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Code Example

my.alert({
  title: 'Notice',
  content: 'Your order has been placed successfully',
  buttonText: 'Got it',
  success: () => {
    console.log('Alert dismissed');
  }
});

my.confirm

Show confirmation dialog

my.showToast

Show toast message