N.create.ui() lets you easily create, show, hide, and manage CEF-based UIs in your RAGE:MP project.
It provides automatic cursor control, blur, input blocking, sound, callbacks, and safe destruction or hiding modes.
This is the core of all in-game menus, HUDs, and panels in NurJS.
const ui = N.create.ui({...});
ui.show(); // Show UI
ui.hide(); // Hide UI
ui.destroy(); // Alias for hide()
ui.isVisible(); // Returns true/false
ui.getBrowser(); // Returns the mp.browsers instance
// Get UI by name
const shop = N.get.ui("ShopMenu");
if (shop) shop.hide();
// Toggle UI visibility
N.ui.toggle("ShopMenu");
// List all active UIs
const list = N.ui.list();
mp.gui.chat.push("🧭 Active UIs: " + list.join(", "));
// Close all UIs safely
N.ui.safeCloseAll();