Installation
Requirements
ox_lib: Required for providing library API compatibility.
Install steps
- Download the resource from your Cfx Keymaster.
- Drop the folder into your server’s
resourcesdirectory:Make sure the folder is named exactlyresources/[custom]/nxs_uinxs_ui(or match the name you use in your exports). - Start the resource in your
server.cfgafterox_lib:ensure ox_lib ensure nxs_ui - Restart your server or start the resource.
Override System (ox_lib compatibility)
nxs_ui is designed to be a modern drop-in replacement or extension for ox_lib UI components. It allows you to upgrade your server’s UI (notifications, menus, progress bars, etc.) to Nexus-styled UI without rewriting all your scripts.
1. Script-level Overrides
To have a resource automatically use the Nexus UI replacements instead of standard ox_lib interfaces, add @nxs_ui/init.lua right after @ox_lib/init.lua in that resource’s fxmanifest.lua:
shared_scripts {
'@ox_lib/init.lua',
'@nxs_ui/init.lua' -- Add this line!
}This injects overrides directly into the global lib table for that resource. Any calls to functions like lib.notify, lib.showContext, lib.progressBar, or lib.inputDialog will automatically route through nxs_ui!
2. Network Event Interception
For server-side notifications, nxs_ui automatically intercepts the standard network event ox_lib:notify and routes it to nexus-ui:notify so that standard server notifications display using the custom Nexus UI theme.
Disabling Components
If you prefer to keep the default ox_lib style for specific components (for example, keeping the default ox_lib radial menu while using Nexus UI for notifications and progress bars), you can selectively disable any component.
To disable components, define the nexus:disabledComponents Convar as a JSON object in your server.cfg:
setr nexus:disabledComponents '{"radial": true, "registerMenu": true}'Component Map Keys
You can disable specific groups of functions by setting their corresponding component keys to true:
| Component Key | Overridden Functions / Exports |
|---|---|
notify | lib.notify / exports.nxs_ui:notify / exports.nxs_ui:defaultNotify |
showTextUI / hideTextUI | lib.showTextUI / lib.hideTextUI |
progressBar | lib.progressBar / lib.progressCircle / lib.cancelProgress |
radial | lib.registerRadial / lib.addRadialItem / lib.removeRadialItem / lib.clearRadialItems |
skillCheck | lib.skillCheck / lib.cancelSkillCheck |
inputDialog | lib.inputDialog / lib.closeInputDialog |
registerContext | lib.registerContext / lib.showContext / lib.hideContext |
alertDialog | lib.alertDialog / lib.closeAlertDialog |
registerMenu | lib.registerMenu / lib.showMenu / lib.hideMenu |