> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# alert()

> Shows an alert to the user

<img className="dark:hidden" width="720" height="440" noZoom src="https://mintcdn.com/attio/4Fh2EPa8-SlLTNAV/images/alert.png?fit=max&auto=format&n=4Fh2EPa8-SlLTNAV&q=85&s=5cc9094573670f69cd42a11d0d962497" data-path="images/alert.png" />

<img className="hidden dark:block" width="720" height="440" noZoom src="https://mintcdn.com/attio/4Fh2EPa8-SlLTNAV/images/alert-dark.png?fit=max&auto=format&n=4Fh2EPa8-SlLTNAV&q=85&s=f58a7423c3aeccd0b9f5a241ad9beb36" data-path="images/alert-dark.png" />

```js theme={"system"}
import {alert} from "attio/client"
```

Analogous to the
[`window.alert()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/alert)
function in web browser JavaScript. The popup is
[modal](https://en.wikipedia.org/wiki/Modal_window).

<Tip>It is useful when you forcefully let the user know that something has happened.</Tip>

## API

```ts TypeScript theme={"system"}
async function alert(options: Options): Promise<void>
```

## Options

### `title : string`

The title of the alert pop-up.

### `text : string`

The text of the alert pop-up.

### `okLabel? : string`

The label for the "OK" button.

Defaults to `"OK"`.
