Skip to main content

Quick Start

exports.lation_ui:registerMenu({
    id = 'my_menu',
    title = 'My Menu',
    options = {
        {
            title = 'Option 1',
            description = 'This is a menu option',
            icon = 'fas fa-circle',
            onSelect = function()
                print('Option 1 selected')
            end
        },
        {
            title = 'Option 2',
            description = 'Another menu option',
            icon = 'fas fa-star',
            onSelect = function()
                print('Option 2 selected')
            end
        }
    }
})

exports.lation_ui:showMenu('my_menu')

Functions

Register a new menu with the specified configuration.
exports.lation_ui:registerMenu(menuData)
Parameters:
Display a previously registered menu.
exports.lation_ui:showMenu(menuId)
Parameters:
  • menuId (string) - Unique identifier of the menu to display
Hide the currently displayed menu.
exports.lation_ui:hideMenu()
Get the ID of the currently open menu.
local menuId = exports.lation_ui:getOpenMenu()
Returns:
  • menuId (string | nil) - The ID of the currently open menu, or nil if no menu is open

Configuration

Registration Options

id
string
required
Unique menu identifier
title
string
Menu title (supports markdown)
subtitle
string
Menu subtitle (supports markdown)
menu
string
Parent menu ID (for back navigation)
canClose
boolean
default:"true"
Whether menu can be closed with ESC
position
string
default:"top-right"
Menu position. Available options: 'top-left', 'top-right', 'offcenter-left', 'offcenter-right'
Submenus will inherit parent menu positioning
onExit
function
Function called when menu is closed with ESC
options
table
required
Array of menu options (see Option Properties)

Option Properties

title
string
required
Option display text (supports markdown)
icon
string
FontAwesome icon class or image URLSupported image formats: .png, .webp, .jpg, .jpeg, .gif, .svg
iconColor
string
default:"#71717A"
Icon color (hex or CSS color name)
iconAnimation
string
Icon animation typeAvailable options: 'spin', 'spinPulse', 'spinReverse', 'pulse', 'beat', 'fade', 'beatFade', 'bounce', 'shake'
description
string
Option description (supports markdown)
keybind
string
Keybind display text
disabled
boolean
default:"false"
Whether option is disabled
readOnly
boolean
default:"false"
Whether option is read-only (no click)
menu
string
Submenu ID to open
arrow
boolean
default:"false"
Show arrow indicator
Automatically set to true for submenus
progress
number
Progress bar value (0-100)
progressColor
string
default:"#3B82F6"
Progress bar color (hex or CSS color name)
Can also use colorScheme as an alias
image
string
URL to an image displayed in the hover metadata
metadata
table
Additional information displayed on hover (see Metadata)
onSelect
function
Callback function executed when option is selected
event
string
Client event to trigger when option is selected
serverEvent
string
Server event to trigger when option is selected
args
any
Arguments passed to events

Metadata

The metadata property displays additional information in a hover card. It supports three formats:
Recommended approach - Provides the most control over formatting and supports progress bars.
metadata = {
    { label = "Health", value = "85%" },
    { label = "Armor", value = "100%" },
    { label = "Experience", value = "1,250 XP", progress = 75, progressColor = "#3B82F6" },
    { label = "Level Progress", value = "3/4", progress = 75, progressColor = "#10B981" }
}
Metadata Item Properties:
label
string
required
The label text
value
any
required
The value to display
progress
number
Progress bar value (0-100)
progressColor
string
Progress bar color (hex or CSS color name)
Can also use colorScheme as an alias

Preview

Menu Preview
Menu Preview