> For the complete documentation index, see [llms.txt](https://sbscripts.gitbook.io/sb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sbscripts.gitbook.io/sb-scripts/sb-notify/configuration.md).

# Configuration

Configure notification placement, behavior, and types.

Configure SB Notify in `config.lua`.

### Main configuration

```lua
Config.Position         = 'top-right'  -- Screen position
Config.MaxNotifications = 6            -- Visible notification limit
Config.DefaultLength    = 5000         -- Fallback duration in milliseconds
Config.ClickToDismiss   = true         -- Allow early dismissal
Config.SoundEnabled     = true         -- Play notification sounds
```

| Key                       | Description                                |
| ------------------------- | ------------------------------------------ |
| `Config.Position`         | Screen position for notifications.         |
| `Config.MaxNotifications` | Maximum number of visible notifications.   |
| `Config.DefaultLength`    | Fallback display duration in milliseconds. |
| `Config.ClickToDismiss`   | Lets players dismiss notifications early.  |
| `Config.SoundEnabled`     | Enables notification sounds.               |

### Positions

Set `Config.Position` to one of these values:

```
top-left        top-center        top-right
center-left                       center-right
bottom-left     bottom-center     bottom-right
```

### Notification types

Each `Config.Types` entry defines a notification style.

| Field            | Type     | Description                                                  |
| ---------------- | -------- | ------------------------------------------------------------ |
| `highlightColor` | `string` | Any CSS color, including hex, `rgb()`, `rgba()`, or `hsl()`. |
| `icon`           | `string` | A [Font Awesome 6 class](https://fontawesome.com/icons).     |
| `label`          | `string` | Short uppercase badge above the message.                     |

Built-in types are `success`, `info`, `warning`, `error`, `police`, `ems`, `cash`, `phone`, and `neutral`.

#### Add a custom type

```lua
Config.Types['mechanic'] = {
    highlightColor = '#e67e22',
    icon           = 'fa-solid fa-wrench',
    label          = 'MECHANIC',
}
```
