> For the complete documentation index, see [llms.txt](https://docs.appmachine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmachine.com/developers/javascript/sdk/notification.md).

# Notification

## Show Alert[​](https://docs.appmachine.com/libraries/javascript/sdk/api/notification#show-alert) <a href="#show-alert" id="show-alert"></a>

Show a native alert message over the UI in the application. Returns the clicked button, by default the only button is `OK`.

```javascript
async function showDeleteMessage() {
    const buttonClicked = await showAlert('Are you sure you want to delete this?', 'This can\'t be undone', ['yes', 'no']);

    console.log(buttonClicked); // logs: 'yes'
}
```

#### Arguments[​](https://docs.appmachine.com/libraries/javascript/sdk/api/notification#arguments) <a href="#arguments" id="arguments"></a>

| name      | type              | Required | default  |
| --------- | ----------------- | -------- | -------- |
| `title`   | *`String`*        | ✅        | -        |
| `message` | *`String`*        | -        | -        |
| `buttons` | *`Array<String>`* | -        | `['ok']` |

#### Errors[​](https://docs.appmachine.com/libraries/javascript/sdk/api/notification#errors) <a href="#errors" id="errors"></a>

Here is a list of errors that can be thrown when calling this function in addition to [generic errors](/developers/javascript/sdk/core.md#generic-errors):
