vMenu Docs

How menus are drawn

MenuAPI draws every menu with NUI, a web page FiveM shows on top of the game. The menu is styled to match the game's own menus. NUI is also what makes themes…

MenuAPI draws every menu with NUI, a web page FiveM shows on top of the game. The menu is styled to match the game's own menus. NUI is also what makes themes and custom banners possible.

Coming from an older MenuAPI?

Drawing with the game's own drawing functions is gone. MenuController.RenderMode still compiles but does nothing. See the Migration Guide (v4).


The page

The index.html from Setup has three rules:

  • The background must stay transparent. The page covers the whole screen.
  • <div id="menuapi"> must exist with exactly that id. The menu is built inside it.
  • Keep the script order. menuapi.min.js depends on the other three, so it goes last.

You can add your own things to the page as long as these hold.

The menuapi folder

The menuapi folder next to MenuAPI.dll holds the styles, scripts, fonts and images. It's replaced on every update, so don't edit it. The unminified sources are in the repository.

The manifest

ui_page 'index.html'

files {
    'MenuAPI.dll',
    'index.html',
    'menuapi/**/*',
}

When something is wrong

What you seeCause
The screen turns black or one solid colourThe page has a background colour. It must be transparent.
No menu at allui_page is missing, index.html is not in files, or there is no <div id="menuapi">
The menu has no stylingmenuapi/**/* is missing from files, or an href path is wrong
The fonts look wrongSame as above, the fonts are in menuapi/fonts
No glow on the banner with ShowHeaderGlare onThe script order is wrong, or glare.min.js is missing

On this page