> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/free-resources/mango-notify/developer-guide/notification-fields.md).

# Notification Fields

Every property a notification accepts. All of them are optional.

Every export and event that takes a data table accepts the fields below. **Everything is optional** — `Notify({})` still renders a valid notification from config defaults.

## Content

| Field            | Type          | Description                                                                                                                    |
| ---------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `title`          | string        | Main heading.                                                                                                                  |
| `subtitle`       | string        | Small line under the title — e.g. an agency name.                                                                              |
| `description`    | string        | Body text.                                                                                                                     |
| `icon`           | string        | Font Awesome class (`fa-solid fa-bell`), an image URL or path, inline `<svg>...</svg>`, or a plain emoji. See [Icons](#icons). |
| `image`          | string        | Full-width image rendered under the body.                                                                                      |
| `badge`          | string        | Pill badge in the header — e.g. `Priority 2`.                                                                                  |
| `badgeColor`     | string        | Badge background colour. Defaults to the accent.                                                                               |
| `metadata`       | table         | Extra icon rows: `{ 'plain text', { icon = 'fa-solid fa-car', text = 'Sultan RS' } }`.                                         |
| `timestamp`      | bool / string | `true` renders the current `HH:MM`; a string renders as-is.                                                                    |
| `location`       | string        | Dispatch layout: the location row (map-pin icon).                                                                              |
| `distance`       | string        | Dispatch layout: distance readout, bottom-right.                                                                               |
| `amount`         | number        | Money layout: the amount. Sign is handled for you.                                                                             |
| `moneyDirection` | string        | Money layout: `'received'` or `'removed'`.                                                                                     |
| `html`           | bool          | Allow raw HTML in text fields. **Off by default** — all text is escaped.                                                       |

### Icons

Four forms are accepted, in the same `icon` field:

```lua
icon = 'fa-solid fa-triangle-exclamation'          -- Font Awesome
icon = 'nui://mystuff/html/img/badge.png'          -- image path or URL
icon = '<svg viewBox="0 0 24 24">…</svg>'          -- inline SVG
icon = '🚔'                                         -- emoji
```

{% hint style="warning" %}
**Font Awesome solid only.** The icon font is bundled for offline use and only the **solid** family ships, so `fa-brands` / `fab` and `fa-regular` / `far` render as a blank box. Every built-in type uses `fa-solid`.

Need a brand icon? Either use an emoji or an image, or add the family back — download `fa-brands-400.woff2` from Font Awesome 6.5.2 into `html/fonts/` and restore its `@font-face` block in `html/css/fontawesome.min.css`.
{% endhint %}

## Behaviour

| Field       | Type           | Description                                                                                                                                  |
| ----------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`        | string         | Stable id for `Update` / `Remove` / `IsVisible`. Auto-generated when omitted; `Notify()` returns it either way.                              |
| `type`      | string         | `default` · `success` · `error` · `warning` · `info` · `dispatch` · `money` · `custom`.                                                      |
| `duration`  | number         | Time on screen in ms. **`0` (or `false`) = persistent** until removed. Defaults to `Config.DefaultDuration`.                                 |
| `progress`  | bool           | Depleting progress bar along the bottom accent line (needs a duration).                                                                      |
| `sound`     | string / false | Built-in preset, custom file name, or `false` for silence — see [Sounds](/mango5m-docs/free-resources/mango-notify/configuration/sounds.md). |
| `volume`    | number         | 0.0 – 1.0, this notification only.                                                                                                           |
| `priority`  | number         | Higher jumps ahead in the waiting queue. Default `0`.                                                                                        |
| `dedupe`    | bool           | Refresh an identical visible notification instead of stacking a copy.                                                                        |
| `queueMode` | string         | `'queue'` or `'replace'` — overrides `Config.QueueMode` for this call.                                                                       |

## Appearance

| Field              | Type            | Description                                                                                                                                          |
| ------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `position`         | string          | Any of the nine screen anchors — overrides `Config.Position`.                                                                                        |
| `width` / `height` | number / string | Number = px, string = any CSS size (`'50vw'`). `height` is a *minimum* — content can still grow.                                                     |
| `accent`           | string          | Accent line / progress colour.                                                                                                                       |
| `theme`            | string          | Apply a registered theme to this notification only.                                                                                                  |
| `style`            | table           | Inline style overrides — same keys as themes, see [Themes & Styling](/mango5m-docs/free-resources/mango-notify/configuration/themes-and-styling.md). |
| `class`            | string          | Extra CSS class on the panel for your own styling.                                                                                                   |
| `animationIn`      | string          | `slide` · `fade` · `scale` · `bounce`.                                                                                                               |
| `animationOut`     | string          | `slide` · `fade` · `scale`.                                                                                                                          |

## Full example

```lua
exports.mango_notify:Notify({
    id          = 'bank_alarm',
    type        = 'dispatch',
    title       = 'Fleeca Bank',
    subtitle    = 'Legion Square',
    description = 'Silent alarm triggered.',
    location    = 'Legion Square Branch',
    distance    = '3.4km',
    badge       = '10-90',
    badgeColor  = '#3B82F6',
    icon        = 'fa-solid fa-building-columns',
    accent      = '#3B82F6',
    progress    = true,
    duration    = 10000,
    sound       = 'dispatch',
    position    = 'top-right',
    priority    = 5,
})
```

{% hint style="warning" %}
**Security note:** text is HTML-escaped by default, so player-provided strings are safe to display. Only set `html = true` on content you fully control.
{% endhint %}
