> For the complete documentation index, see [llms.txt](https://max-workx.gitbook.io/maxworkx-private-fivem-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://max-workx.gitbook.io/maxworkx-private-fivem-docs/library/overextended/client-sided/ui/notifications.md).

# Notifications

#### lib.notify <a href="#libnotify" id="libnotify"></a>

Custom notifications with a lot of styling options.

{% code title="CLIENT" %}

```lua
lib.notify(data)
```

{% endcode %}

{% code title="SERVER" %}

```lua
TriggerClientEvent('ox_lib:notify', source, data)
```

{% endcode %}

* id?: `string`
  * When set the current notification will be unique and only shown once on screen when spammed.
* title?: `string`
  * Must provide if there is no description
* description?: `string`
  * Must provide if there is no title
  * Markdown support
* duration?: `number`
* position?: `'top'` or `'top-right'` or `'top-left'` or `'bottom'` or `'bottom-right'` or `'bottom-left'` or `'center-right'` or `'center-left'`
  * Default: `'top-right'`
* type?: `'inform'` or `'error'` or `'success'`or `'warning'`
  * Default: `'inform'`
* style?: `table` (`object`)
  * React CSS styling format
* icon?: `string`
  * Font Awesome 6 icon name
* iconColor: `string`

#### Usage Example <a href="#usage-example" id="usage-example"></a>

**Standard**

```lua
lib.notify({
    title = 'Notification title',
    description = 'Notification description',
    type = 'success'
})
```

<div align="left"><figure><img src="https://i.imgur.com/HFeBTLg.png" alt=""><figcaption></figcaption></figure></div>

**Custom**

```lua
lib.notify({
    id = 'some_identifier',
    title = 'Notification title',
    description = 'Notification description',
    position = 'top',
    style = {
        backgroundColor = '#141517',
        color = '#C1C2C5',
        ['.description'] = {
          color = '#909296'
        }
    },
    icon = 'ban',
    iconColor = '#C53030'
})
```

<div align="left"><figure><img src="https://i.imgur.com/WpqiW5f.png" alt=""><figcaption></figcaption></figure></div>
