Skip to main content
Use this API to show an action sheet menu that slides up from the bottom.

Parameters

PropertyTypeRequiredDescription
titleStringNoAction sheet title
itemsArrayYesArray of option strings
cancelButtonTextStringNoCancel button text
successFunctionNoCallback with selected index
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
indexNumberIndex of selected item (-1 if cancelled)

Code Example

my.showActionSheet({
  title: 'Choose action',
  items: ['Edit', 'Share', 'Delete'],
  cancelButtonText: 'Cancel',
  success: (res) => {
    if (res.index !== -1) {
      console.log('Selected:', res.index);
    }
  }
});

my.confirm

Show confirmation dialog

my.alert

Show alert dialog