> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: showAlert(title: string, message: string, actions: Actions) # Method package: wixMobile # Method menu location: wixMobile --> AppFramework --> showAlert # Method Link: https://dev.wix.com/docs/velo/apis/wix-mobile/app-framework/show-alert.md # Method Description: Creates and opens an alert modal on a mobile app. ![developer preview tag](https://user-images.githubusercontent.com/89579857/213133550-2b4fa3e8-e8fc-4513-a733-00abcc70925c.png) When an app user selects an action button in the alert modal, the `showAlert()` function returns a promise that resolves to the alert's result. You can customize the alert modal's title and message, and choose which actions an app user can take when the modal appears. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Create and open an alert modal ```javascript import { appFramework } from 'wix-mobile'; /* Sample title value: 'Save changes?' * * Sample message value: 'Your message has not been saved' * * Sample actions value: * { * positive: { * "label": "Save Now", * "key": "save" * }, * negative: { * "label": "Discard", * "key": "discard", * "destructive": true * }, * neutral: { * "label": "Remind Me Later", * "key": "remind" * } * } */ appFramework.showAlert(title, message, actions) .then((alertResult) => { const actionKey = alertResult.key; if (actionKey === 'remind') { console.log('REMIND ME LATER') } if (actionKey === 'discard') { console.log('DISCARD') } }) .catch((error) => { console.error(error); // Handle the error }); /* Promise resolves to: * { * "key" : "remind" * } */ ``` ---