np_menu
A menu system for every UI a server needs: list and grid menus, a radial wheel, world-anchored context menus, input and confirm dialogs and toasts. One data model drives all of them, and quick, radial and shop menus come built in. The staff menu now ships with np_admin.
- Version
- 0.1.0
- Frameworks
- qbx, qb, ESX, standalone
- Dependencies
- None. ox_lib optional
- Database
- Not needed
- Item types
- 16
- Built-in menus
- Quick, radial, context, tuning, clothing, settings
- Permissions
- np_admin nodes (optional). No ACE
- Languages
- English, German
- Build
- Node 18+ once, for the NUI
- Server
- A recent FiveM artifact (Lua 5.4)

In-game captures from a local ESX server at 1920×1080. The Benny's shop is taken from the NUI in the browser.
What's in it
Menus and their callbacks stay in Lua. The web only gets a copy without functions, and anything that touches money, items or admin powers runs on the server.
Walk mode
- Menus open without NUI focus, so players keep walking or driving.
- Focus is taken only while typing or when the cursor is toggled (Caps Lock).
- Prefer the classic way?
Config.FocusMode = 'nui', or players switch it themselves.
Rows
- 16 item types, from buttons and sliders to colour pickers, inputs and keybind capture.
- Row states: disabled with a reason, loading, cooldown, badge and pinned.
- Per row permissions by np_admin node, framework group or job. Locked rows can stay visible with the reason.
Navigation
- Type to filter, optionally across submenus, with breadcrumbs in the results.
- A back stack that remembers the selected row per level.
- Hold Y to pin a row. Pinned rows of a grid menu land in its dock.
Shops
- A preview card next to the menu: stats with deltas, a palette or an image.
- A cart footer with a total and a buy action.
- Preview images only load from hosts you allow in
Config.ImageHosts.
Server actions
registerActionchecks rate limits, payload size, np_admin permission nodes, groups and jobs before your handler runs.- One call in flight per player and action. Errors come back as toasts.
- The client never decides money, items or admin effects.
Look and settings
- One server brand colour themes the tiles, accents or glass. Semantic colours never change.
- Frosted glass by default, or Liquid Glass. A red-edged staff skin, which np_admin's quick menu uses.
- Players pick position, density, scale, material, sounds, language and focus mode in
/menusettings.
A closer look
Menu kinds
The same rows and callbacks work in every layout.
| Kind | What it is |
|---|---|
| List | The main menu: header tile, search, position counter, description and key hints. Right, left or centre |
| Grid | Phone home-screen pages with a dock, used by the F1 quick menu |
| Radial wheel | Hold to open, aim, release to select. Contexts for vehicle, on foot, player, ped, object or your own, with submenu rings |
| Context menu | A compact list anchored to an entity or a position, with a leader line. Closes by distance or when the entity is gone |
| Third eye | Hold G, the entity under the crosshair gets an outline, release to open its context menu. Other resources add options |
| Input dialog | A form with text, number, money, password, select, checkbox, colour and textarea fields, validated again in Lua |
| Confirm | Yes / no with variants, an optional auto-cancel timeout and hold-to-confirm |
| Toasts | Info, success, warning and error, from the client or the server |
16 item types
Every row also takes a label, sublabel, description, icon, tint, permissions and callbacks.
| Type | What the player gets |
|---|---|
button | Runs on Enter. Optional right label and key cap |
action | Confirm, danger or warning style. Hold to confirm, or a confirm dialog first |
info | A read-only value |
number | Stepper with min, max, step and a bigger step on Shift |
list | Left / right through options, with position dots |
slider | Like number, plus the mouse wheel |
color | A picker with a palette and a hex field |
input | Text, number, password or money, edited inline |
| Type | What the player gets |
|---|---|
keybind | "Press a key" capture |
checkbox | Multi-select |
radio | One of a group |
switch | On / off toggle |
submenu | Opens a registered menu, or one built on demand |
link | Opens another UI and closes the menu |
section | A small capitals heading |
separator | A divider line |
Built-in menus
Usable as they are, and examples of the API at the same time. Each one is a switch in Config.Builtin; a disabled menu registers nothing. Keys are defaults players can rebind.
| Menu | Opens with | What's in it |
|---|---|---|
| Quick menu | F1, /quickmenu | Grid with ID card, wallet, inventory, clothing toggles, 37 emotes in five categories, walk styles, vehicle controls, job and duty, bills, settings and an Admin tile that opens np_admin's quick menu for its staff |
| Radial | hold Left Alt | Vehicle: lock, engine, doors, windows, seats, trunk, lights, give keys. On foot: emotes, walk style, clothing, hands up, point. Player: give money, show ID, carry, escort |
| Context menu | hold G, release | Vehicle: lock, trunk, check plate, repair with a kit item, impound for set jobs. Player: give money, show ID, carry, escort |
| Tuning shop | E in a shop zone | Benny's, four LS Customs and Beeker's Garage. Performance, cosmetics, wheels, respray, lights and neon, previewed live with camera presets and a stats card |
| Clothing store | E in a shop zone | Eight stores. Every component and prop previewed on your ped, camera presets and up to 10 saved outfits |
| Settings | /menusettings | Position, density, material, scale, sounds, language, focus mode and a reset |
Shops recompute every price on the server from Config.Shops.prices and charge the framework account. After a purchase the server fires np_menu:shops:tuningBought or np_menu:shops:clothingBought, so your garage or appearance resource can save the result.
The dev / admin menu (formerly F10) moved to np_admin, where it is the F9 quick menu. It still renders in np_menu's staff skin, and /devmenu opens it while np_admin runs.
ox_lib compatibility layer
np_menu runs alongside ox_lib and doesn't need it. Turn on Config.OxCompat and np_menu adds exports with the ox_lib signatures, so existing menus render in the Nimbus look without a rewrite. Nothing in ox_lib itself is overridden.
| ox_lib | In np_menu |
|---|---|
registerMenu, showMenu, hideMenu | List menu. Values become a list row, checked a checkbox. ox callbacks get ox arguments |
registerContext, showContext | A list menu with the parent chain, so Backspace goes back |
inputDialog | Returns an array like ox |
alertDialog | Returns 'confirm' or 'cancel' |
addRadialItem, removeRadialItem | Added to the global radial context |
-- shared/config.lua
Config.OxCompat = true
-- ox_lib-style code, pointed at np_menu
exports.np_menu:registerContext({ id = 'garage', title = 'Garage', options = {
{ title = 'Take out', icon = 'car', onSelect = function() print('take out') end },
} })
exports.np_menu:showContext('garage')Set it up
Compatibility
Everything is detected when the resource starts. Nothing is required: without a framework np_menu runs standalone.
| Kind | Supported |
|---|---|
| Framework | qbx_core, qb-core, es_extended, or standalone |
| Vehicle keys | qbx_vehiclekeys, qb-vehiclekeys for the built-in lock and "Give keys" |
| Inventory | ox_inventory or the framework inventory for the repair kit. The quick menu's Inventory tile fires an event or command you set |
| ox_lib | Not needed. Optional compatibility layer |
| Resolution | Designed for 1080p, scales with the screen height. Players add their own scale (75 to 150 %) |
| Standalone | With qbx / qb / ESX | |
|---|---|---|
| All menu kinds, dialogs, toasts | ✓ | ✓ |
| Groups on rows and actions | Through np_admin nodes (np_menu.group.<name>) | ✓ jobs and groups |
| Wallet, give money | – | ✓ |
| Tuning and clothing purchases | – | ✓ |
Installation
No database, no SQL, no streamed assets. Node 18+ is needed once to build the NUI.
- Put the resource in
resources/asnp_menu. Keep the name, the NUI callbacks use it. - Build the NUI once:
cd web && npm ci && npm run build - Start it after your framework, and before the resources that register menus:
ensure qbx_core # or qb-core / es_extended (optional) ensure np_admin # optional: permissions, live settings, the staff menu ensure np_menu ensure my_resource - Permissions are np_admin nodes, no
add_acelines. Rows and actions withpermfollow the groups you set in np_admin. Without np_admin, server actions allow the console, the identifiers innp_admin_fallbackand on ESX the groups innp_admin_fallback_groups:set np_admin_fallback "license:abc123,discord:123456789" - Test it: F1 for the quick menu, hold Left Alt for the radial and hold G while looking at a vehicle.
For your own scripts
Register a menu with exports or the OOP wrapper (shared_script '@np_menu/import.lua'). Menus, radial items and context options are removed when the resource that added them stops.
exports.np_menu:register({
id = 'my_menu', title = 'Garage', icon = 'warehouse', tint = 'blue',
items = {
{ type = 'button', label = 'Take out vehicle', icon = 'car',
onSelect = function() print('take out') end },
{ type = 'action', variant = 'danger', hold = 1200, label = 'Scrap',
icon = 'trash', server = 'my_garage:scrap', args = { plate = 'ABC123' } },
},
})
exports.np_menu:open('my_menu')
exports.np_menu:addRadial('vehicle', { label = 'Cruise control', icon = 'gauge',
onSelect = function(item, info) toggleCruise(info.vehicle) end })Questions
Do I need a framework?
No. Every menu kind, the dialogs and toasts work standalone, and groups map to np_admin nodes (np_menu.group.<name>). The wallet, "Give money" and the shop purchases need qbx, qb or ESX, because standalone has no money.
Does it replace ox_lib?
It runs alongside it and doesn't depend on it. With Config.OxCompat = true np_menu offers exports with the ox_lib menu, context, input, alert and radial signatures. Your lib.* calls keep going to ox_lib until you point them at exports.np_menu.
Can players move while a menu is open?
Yes, that is the default walk mode. Focus is taken only while typing or with the cursor toggled. Dialogs and the radial wheel always take focus.
I already have a target script and an admin menu.
Switch off any built-in menu in Config.Builtin: quick, radial, context, shops and settings. A disabled menu's files return early and register nothing. The admin menu isn't part of np_menu any more: it ships with np_admin.
How are shop purchases protected?
The client only sends the list of changes. The server checks you're at the shop, recomputes the price from Config.Shops.prices and charges the configured account.
Which languages are included?
English and German. Players switch in the settings menu. Other languages are a file in shared/locales/ with the same keys.
Does it need a database?
No. Player settings, pins and saved outfits are stored in client KVP.
Works well with

Build it once, ensure it, done.
Installation, every item type and every export are in the docs.