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

# Bridge

Drop-in compatibility with ESX, ox\_lib, QBCore and Qbox.

{% hint style="info" %}
The bridge is enabled by default. Existing scripts keep calling ESX / ox\_lib / QBCore — sInterface renders the UI.
{% endhint %}

{% stepper %}
{% step %}

#### Enable the bridge

Open `config.lua` and configure `Config.Bridge`:

```lua
Config.Bridge = {
    Enabled = true,
    ESX = true,
    ox_lib = true,
    QBCore = true,
    Qbox = true
}
```

* Set `Enabled = false` to disable every redirect.
* Set a framework key to `false` to skip that framework only.
  {% endstep %}

{% step %}

#### ESX Legacy

When `Config.Bridge.ESX` is true, sInterface wraps:

* `ESX.ShowNotification` / `ESX.ShowAdvancedNotification`
* `ESX.ShowHelpNotification` (TextUI)
* `ESX.Progressbar` / `ESX.CancelProgressbar`
* `ESX.TextUI` / `ESX.HideUI`
* `ESX.OpenContext` / `PreviewContext` / `CloseContext` / `RefreshContext`
* Events: `ESX:Notify`, `ESX:TextUI`, `ESX:HideUI`

sInterface **provides** `esx_notify`, `esx_progressbar`, `esx_textui` and `esx_context`. Stop those resources — do not `ensure` them.

{% hint style="warning" %}
Do **not** start `esx_notify`, `esx_progressbar`, `esx_textui` or `esx_context`. sInterface replaces them. If they stay started, you can get duplicate UIs.
{% endhint %}
{% endstep %}

{% step %}

#### ox\_lib

When `Config.Bridge.ox_lib` is true, UI calls are redirected:

* `lib.notify` / `lib.defaultNotify`
* `lib.progressBar` / `lib.progressCircle` / `lib.cancelProgress` / `lib.progressActive`
* `lib.showTextUI` / `lib.hideTextUI` / `lib.isTextUIOpen`
* `lib.alertDialog` / `lib.closeAlertDialog`
* `lib.inputDialog` / `lib.closeInputDialog`
* `lib.skillCheck` / `lib.cancelSkillCheck` / `lib.skillCheckActive`
* `lib.registerContext` / `lib.showContext` / `lib.hideContext`
* `lib.registerRadial` / `lib.addRadialItem` / `lib.removeRadialItem` / `lib.hideRadial`

**Not replaced:** zones, points, callbacks, cache, and every non-UI ox\_lib feature. Keep `ox_lib` started.

Existing scripts keep using `lib.notify({ ... })` — no rewrite required.
{% endstep %}

{% step %}

#### QBCore / Qbox

When `Config.Bridge.QBCore` / `Qbox` is true, sInterface captures:

* `QBCore:Notify` / `QBCore:Client:Notify`
* `qbx_core:client:notify`
* `QBCore.Functions.Notify`
* `QBCore.Functions.Progressbar`
* `QBCore.Functions.DrawText` / `HideText`

Qbox notifications that already go through ox\_lib are handled by the ox\_lib bridge (no duplicate).
{% endstep %}

{% step %}

#### Native API

You can also call sInterface directly from your own scripts. See [Exports](/docs/resources/sinterface/exports.md) for the native `exports.sInterface:*` API.
{% endstep %}
{% endstepper %}
