Bridge.Menu— a side-anchored, navigable list that can hold buttons, toggles, and steppers. A toggle/stepper change keeps the menu open; selecting a button closes it.Bridge.Context— a simpler list of actions, each a title + description that closes on select.
onSelect / onChange callbacks and they fire when the player interacts.
Bridge.Menu is keyboard-driven and keeps the player moving. It navigates with the arrow keys (up/down to move, left/right to step, Enter to choose, Backspace/Escape to close) and opens with SetNuiFocusKeepInput, so the player can still walk around while the menu is open — the ox_lib registerMenu feel. Bridge.Context is mouse-driven and takes the cursor (the player stands still while it’s open).Availability
Client only.Menu
Signature
Bridge.Menu.Open(def)
string
The menu heading.
string
A muted second line under the title.
string
An icon shown in the header.
boolean
default:"true"
Whether the player can dismiss the menu without selecting.
table[]
required
The rows. Each option is shaped below.
function
Called when the menu closes (after a select, or on dismiss).
Option fields
string
default:"button"
button, toggle, stepper, or separator.string
The row text.
string
A muted sub-line.
string
A leading icon.
boolean
Greys the row out and blocks selection.
boolean
For
toggle rows — the initial on/off state.string[]
For
stepper rows — the list of values to cycle through.number
default:"0"
For
stepper rows — the starting index into values.boolean
Shows a submenu arrow on the right (you handle opening the next menu in
onSelect).function
Called when a
button row is chosen. The menu then closes.function
Called with the new value when a
toggle (boolean) or stepper (selected value) changes. The menu stays open.Examples
onChange keeps the menu open so the player can flip several toggles/steppers in one session. Only a button onSelect (or a dismiss) ends the menu.Context
A flatter list — each item is a clickable action that closes the menu on select.Signature
Bridge.Context.Open(def)
string
The heading.
table[]
required
The items (also accepted under
items).function
Called when the context menu closes.
Item fields
string
required
The item text (also accepted as
label).string
A muted sub-line.
string
A leading icon.
boolean
Greys the item out and blocks selection.
function
Called when the item is chosen. The menu then closes.
