All products

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.

v0.1.0qbx · qb · ESX · standaloneNo dependencies
Price TBAStore link follows at release
Installation guideDocumentation
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)
A list menu: search, info rows, a weather list, a time slider, colour, text input, keybind, switches, submenus with counts and a hold-to-confirm delete
A list menu: search, info rows, a weather list, a time slider, colour, text input, keybind, switches, submenus with counts and a hold-to-confirm delete

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

  • registerAction checks 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.

KindWhat it is
ListThe main menu: header tile, search, position counter, description and key hints. Right, left or centre
GridPhone home-screen pages with a dock, used by the F1 quick menu
Radial wheelHold to open, aim, release to select. Contexts for vehicle, on foot, player, ped, object or your own, with submenu rings
Context menuA compact list anchored to an entity or a position, with a leader line. Closes by distance or when the entity is gone
Third eyeHold G, the entity under the crosshair gets an outline, release to open its context menu. Other resources add options
Input dialogA form with text, number, money, password, select, checkbox, colour and textarea fields, validated again in Lua
ConfirmYes / no with variants, an optional auto-cancel timeout and hold-to-confirm
ToastsInfo, 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.

TypeWhat the player gets
buttonRuns on Enter. Optional right label and key cap
actionConfirm, danger or warning style. Hold to confirm, or a confirm dialog first
infoA read-only value
numberStepper with min, max, step and a bigger step on Shift
listLeft / right through options, with position dots
sliderLike number, plus the mouse wheel
colorA picker with a palette and a hex field
inputText, number, password or money, edited inline
TypeWhat the player gets
keybind"Press a key" capture
checkboxMulti-select
radioOne of a group
switchOn / off toggle
submenuOpens a registered menu, or one built on demand
linkOpens another UI and closes the menu
sectionA small capitals heading
separatorA 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.

MenuOpens withWhat's in it
Quick menuF1, /quickmenuGrid 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
Radialhold Left AltVehicle: 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 menuhold G, releaseVehicle: lock, trunk, check plate, repair with a kit item, impound for set jobs. Player: give money, show ID, carry, escort
Tuning shopE in a shop zoneBenny'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 storeE in a shop zoneEight stores. Every component and prop previewed on your ped, camera presets and up to 10 saved outfits
Settings/menusettingsPosition, 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_libIn np_menu
registerMenu, showMenu, hideMenuList menu. Values become a list row, checked a checkbox. ox callbacks get ox arguments
registerContext, showContextA list menu with the parent chain, so Backspace goes back
inputDialogReturns an array like ox
alertDialogReturns 'confirm' or 'cancel'
addRadialItem, removeRadialItemAdded 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.

KindSupported
Frameworkqbx_core, qb-core, es_extended, or standalone
Vehicle keysqbx_vehiclekeys, qb-vehiclekeys for the built-in lock and "Give keys"
Inventoryox_inventory or the framework inventory for the repair kit. The quick menu's Inventory tile fires an event or command you set
ox_libNot needed. Optional compatibility layer
ResolutionDesigned for 1080p, scales with the screen height. Players add their own scale (75 to 150 %)
StandaloneWith qbx / qb / ESX
All menu kinds, dialogs, toasts✓✓
Groups on rows and actionsThrough 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.

  1. Put the resource in resources/ as np_menu. Keep the name, the NUI callbacks use it.
  2. Build the NUI once:
    cd web && npm ci && npm run build
  3. 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
  4. Permissions are np_admin nodes, no add_ace lines. Rows and actions with perm follow the groups you set in np_admin. Without np_admin, server actions allow the console, the identifiers in np_admin_fallback and on ESX the groups in np_admin_fallback_groups:
    set np_admin_fallback "license:abc123,discord:123456789"
  5. 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.

Install np_menu