> For the complete documentation index, see [llms.txt](https://laot7490.gitbook.io/ltbridge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://laot7490.gitbook.io/ltbridge/ui-and-interaction/alert/alert-data.md).

# Alert Data

`LT.Alert.Send(data)` shows a confirmation dialog and returns `'confirm'`, `'cancel'`, or `nil`.

| Field      | Type    | Required | Description                            |
| ---------- | ------- | -------- | -------------------------------------- |
| `header`   | string  | Yes      | Dialog title                           |
| `content`  | string  | Yes      | Main message body                      |
| `centered` | boolean | No       | Center the dialog on screen            |
| `size`     | string  | No       | `'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'` |
| `cancel`   | boolean | No       | Show a cancel button                   |
| `labels`   | table   | No       | `{ cancel = 'No', confirm = 'Yes' }`   |

## Example

```lua
local result = LT.Alert.Send({
    header = 'Delete Item',
    content = 'Are you sure you want to delete this item?',
    centered = true,
    size = 'md',
    cancel = true,
    labels = { cancel = 'Cancel', confirm = 'Delete' },
})

if result == 'confirm' then
    -- player confirmed
elseif result == 'cancel' then
    -- player cancelled
end
```

Back to [Alert](/ltbridge/ui-and-interaction/alert.md)
