> For the complete documentation index, see [llms.txt](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/jiffy-jr-development-docs/jiffy-ui/integrations/ox-lib.md).

# Ox Lib

There are two ways to integrate Jiffy UI with ox\_lib, depending on whether ox\_lib is installed on your server.

## Option A — ox\_lib is NOT installed

Use the built-in shim. It provides ox\_lib exports so scripts that call `exports['ox_lib']:notify(...)` route through Jiffy UI instead.

**Setup:**

{% stepper %}
{% step %}

## In `config.lua`

Set:

```lua
Config.Adapters.oxlib = true
```

{% endstep %}

{% step %}

## In `fxmanifest.lua`

Uncomment the provide line:

```lua
provide 'ox_lib'
```

{% endstep %}

{% step %}

## Restart the resource

Restart the resource.
{% endstep %}
{% endstepper %}

## Option B — ox\_lib IS installed (live redirect)

Apply a small patch to ox\_lib so its progress UI integrates cleanly with Jiffy UI's cancel button. This is the recommended path if you run ox\_lib alongside Jiffy UI.

**Setup:**

{% stepper %}
{% step %}

## In `config.lua`

Set:

```lua
Config.Adapters.oxlib_live = true
```

{% endstep %}

{% step %}

## Patch ox\_lib

Follow the patch steps in `docs/ox_lib_patch.md` (included in the resource download). The patch modifies two functions in ox\_lib's progress script to emit a cancel event that Jiffy UI listens for.
{% endstep %}

{% step %}

## Restart the resources

Restart both `ox_lib` and `jiffy-ui`.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Do not enable both `oxlib` and `oxlib_live` at the same time. Use only the one that matches your server setup.
{% endhint %}

## Which option should I use?

| Situation                               | Use                            |
| --------------------------------------- | ------------------------------ |
| ox\_lib is not installed on your server | Option A (`oxlib = true`)      |
| ox\_lib is installed                    | Option B (`oxlib_live = true`) |
