# API

This page documents the public exports and events provided by BDUK.

***

## Events

### bduk:notify

Fires a UI notification  to the client.

```lua
TriggerEvent("bduk:notify", {
    type = "success",
    message = "Item added!",
    header = "Done",
    icon = "fa-solid fa-check-circle",
    duration = 5000,
    match_border = true,
    match_shadow = false
})
```

#### Parameters

* `type`: `"success"`, `"error"`, `"info"`, `"warning"` — *(default: `"info"`)*
* `message`: Body text (required)
* `header`: Optional title
* `icon`: Font Awesome class (e.g. `"fa-solid fa-bell"`)
* `duration`: Time in ms (default `5000`, `0` = sticky)
* `match_border`: Whether to color the border based on type
* `match_shadow`: Whether to color the shadow based on type

***

## Exports

### build

Builds and displays a full BDUK UI layout.

```lua
exports.bduk:build(layout)
```

#### Parameters

* `layout`: The full Lua config table for your UI (see: [**Making Your First UI**](https://docs.boii.dev/fivem-free-resources/bduk/guides/making-your-first-ui))

***

### notify

Triggers a notification programmatically (same as the `bduk:notify` event).

```lua
exports.bduk:notify({
    type = "error",
    message = "Something went wrong!"
})
```

#### Parameters

* Same structure as `bduk:notify` event (see above)
