# Notify

<figure><img src="/files/IfPgxEVy0HbjFYXQ7oY9" alt=""><figcaption></figcaption></figure>

Shows floating notifications on the screen to alert the player.\
Use these for messages like success, errors, info, warnings, etc.\
\
These were added mainly to provide a built in way for notifying from within the UI, however you can use the notifications externally if you wish.

***

## Usage

You **trigger notifications** using component `notify` sections, directly though `exports.bduk:notify(opts)`, or by firing the client event `bduk:notify`

***

## Structure

```lua
{
    type = "success",
    message = "Item added to inventory!",
    header = "Success",
    icon = "fa-solid fa-check-circle",
    duration = 5000,
    match_border = true,
    match_shadow = true
}
```

***

## Notification Options

* **`type`**: `"info"`, `"success"`, `"warning"`, or `"error"` — changes the color.
* **`header`** *(optional)*: Bold title at the top.
* **`message`**: Main text body.
* **`icon`** *(optional)*: Font Awesome icon class (e.g. `"fa-solid fa-check"`).
* **`duration`** *(optional)*: How long it stays on screen (in ms). `0` = sticky.
* **`match_border`** *(optional)*: Color the border to match the type.
* **`match_shadow`** *(optional)*: Color the shadow to match the type.

***

## Position & Direction

You can configure where and how notifications appear using within the main builder config:

<pre class="language-lua"><code class="lang-lua"><strong>notify = {
</strong>    position = "top-right",      -- top-left, top-center, bottom-right, etc.
    fill_direction = "down"      -- "down" (default) or "up"
}
</code></pre>

If you don't specify this, it defaults to `"right-center"` filling **downward**.

***

#### Notes

* Notifications are **always floating** — they don’t go in layout slots.
* Supports multiple styles and customizable timing.
* Can stack multiple at once.


---

# 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://docs.boii.dev/fivem-free-resources/bduk/components/notify.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.
