API

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


Events

bduk:notify

Fires a UI notification to the client.

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.

exports.bduk:build(layout)

Parameters


notify

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

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

Parameters

  • Same structure as bduk:notify event (see above)

Last updated