LastMenu
Universal standalone menu system for FiveM — zero dependencies, one API, real-time reactivity.
What is LastMenu?
LastMenu is a complete UI library for FiveM. It unifies all common menu types (context, radial, input form, alert, notification, progress bar, target) under a consistent builder API, without requiring ox_lib, qbx_core or any other framework.
The Svelte 5 UI is pre-compiled into ui/assets/ — no npm install required on the game server.
Why LastMenu?
| Common problem | Solution |
|---|---|
Dependency on ox_lib or a framework | Zero runtime dependencies |
| Different API per menu type | One builder pattern for everything |
| No reactivity — close/reopen to refresh | Built-in reactive polling engine |
| Locked to a framework (ESX / QBCore) | Works in any environment |
| Watcher bugs crash the whole menu | Safe Mode automatically disables faulty watchers |
| Back button returns to wrong level | Navigation stack preserves full depth |
Getting Started
Start with Installation to set up LastMenu on your server, then check the Quick Start for practical examples.
Quick Overview
The entire LastMenu API follows the same pattern: one export call + a builder function.
local UI = exports['LastMenu']
-- Context menu
UI:context(function(menu)
menu:title("My Menu")
menu:button("Say hello", {
icon = "hand",
cb = function() print("Hello!") end
})
end)
-- Notification
UI:notify(function(n)
n:message("Action successful.")
n:type("success")
end)
-- Blocking form (inside a Citizen.CreateThread)
local values = UI:input_async(function(b)
b:title("Purchase")
b:field("Quantity", { type = "number", min = 1, max = 10 })
end) Documentation Structure
| Section | Content |
|---|---|
| Installation | fxmanifest, server.cfg, first steps |
| Quick Start | Practical examples by use case |
| Context Menu | Vertical menu — all item types |
| Radial Menu | Circular quick-action wheel |
| Input Form | Multi-field modal forms |
| Modal / Alert | Confirmation dialogs |
| Notifications | Non-blocking toasts |
| Progress Bar | Progress bar with side-effects |
| Target System | ox_target / qtarget replacement |
| Reactivity | diff/patch polling engine |
| Async API | input_async and alert_async (coroutine-style) |
| Sub-menus & Stack | Navigation stack and nesting |
| Theming | CSS custom properties |
| Migration | From ox_lib, RageUI, qb-menu |
| Debugging | Built-in diagnostic tools |
| Common Pitfalls | Anti-patterns to avoid |