# Notifications

### Add

You can use them via:

```lua
local serial = exports['ZSX_UIV2']:Notification(header, text, icon, duration)
```

{% hint style="info" %}
You don't have to fulfill all the parameters. The only one that is needed is **text**.
{% endhint %}

{% hint style="info" %}
You can also set duration to **-1** to make it permament but you need to manually remove it!
{% endhint %}

<table><thead><tr><th width="239">Arg</th><th width="411">Information</th><th width="100" data-type="checkbox">Optional</th></tr></thead><tbody><tr><td>header</td><td><mark style="color:green;">String</mark><br>Header of the notification</td><td>true</td></tr><tr><td>text</td><td><mark style="color:green;">String</mark><br>Text of the notification</td><td>false</td></tr><tr><td>icon</td><td><mark style="color:green;">String</mark><br>Icon of the notification, <a href="https://fontawesome.com/v5/search">list</a></td><td>true</td></tr><tr><td>duration</td><td><mark style="color:blue;">Number</mark><br>Duration of the notification</td><td>true</td></tr></tbody></table>

### Remove

In order to remove the notification you need it's serial which is returned from [Add ](#add)export.

```lua
exports['ZSX_UIV2']:Notification_Remove(serial)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zsx-development.gitbook.io/docs/resources/user-interface-v2/exports/interfaces/notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
