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

# Configuration

### General Configuration

The main configuration options are:

* `Config.Position`
* `Config.DefaultDuration`
* `Config.MaxVisible`
* `Config.AnimationDuration`
* `Config.SoundEnabled`
* `Config.SoundVolume`
* `Config.Debug`
* `Config.Types`

#### Position

Controls where notifications appear on the screen.

Available positions:

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

Example:

```
Config.Position = 'top-left'
```

#### Default Duration

Controls how long notifications remain visible when no custom duration is provided.

The value is in milliseconds.

```
Config.DefaultDuration = 5000
```

`5000` equals 5 seconds.

Individual notifications can specify their own duration when needed.

#### Maximum Visible Notifications

Controls how many notifications can be displayed at the same time.

```
Config.MaxVisible = 4
```

If the maximum is reached, additional notifications are automatically placed into a queue.

Queued notifications do not begin their duration timer until they become visible.

#### Animation Duration

Controls the speed of the notification entrance and exit animations.

```
Config.AnimationDuration = 280
```

The value is in milliseconds.

### Sounds

Bonsai Notify supports custom sounds for each notification type.

Sound files are stored in:

```
bonsai_notify/html/sounds/
```

Supported formats:

* `.ogg`
* `.mp3`
* `.wav`

#### Enable or Disable Sounds

Sounds can be enabled or disabled globally:

```
Config.SoundEnabled = true
```

#### Sound Volume

The global notification volume can be configured with:

```
Config.SoundVolume = 0.30
```

Individual notification types can also have their own volume configuration.

### Notification Types

Bonsai Notify includes seven notification types by default:

* `success`
* `error`
* `warning`
* `info`
* `money`
* `default`

Each notification type can define its own:

* Label
* Accent color
* Icon
* Sound
* Sound volume

The included types can be modified directly from `Config.Types`.

### Custom Notification Types

Additional notification types can be added through `Config.Types`.

For example:

```
Config.Types
    mechanic = {
        label = 'Mechanic',    
        color = '#f59e0b',    
        icon = 'warning',    
        sound = 'mechanic.ogg'}
    },
```

The sound file should be placed inside:

```
html/sounds/
```

#### Custom Icons

Bonsai Notify uses the Lucide icon library, giving you access to a large collection of icons.

Browse the available icons here:

[Lucide Icon Library](https://lucide.dev/icons/?utm_source=chatgpt.com)

Simply find the icon you want and use its name in your notification configuration:

```
icon = 'wrench'
```

For example:

```
Config.Types['mechanic'] = {    label = 'Mechanic',    color = '#f59e0b',    icon = 'wrench',    sound = 'mechanic.wav'}
```

### Debug Mode

Debug mode enables the built-in test commands.

```
Config.Debug = true
```

Available commands:

* `/notifysuccess`
* `/notifyerror`
* `/notifywarning`
* `/notifyinfo`
* `/notifymoney`
* `/notifydefault`
* `/notifytest`

`/notifytest` displays all built-in notification types and is useful for checking positioning, stacking, sounds and appearance.

For a production server, we recommend:

```
Config.Debug = false
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://bonsai-docs.gitbook.io/bonsai-docs/bonsai-notify/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
