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)
The menu heading.
A muted second line under the title.
An icon shown in the header.
Whether the player can dismiss the menu without selecting.
The rows. Each option is shaped below.
Called when the menu closes (after a select, or on dismiss).
Option fields
button, toggle, stepper, or separator.The row text.
A muted sub-line.
A leading icon.
Greys the row out and blocks selection.
For
toggle rows — the initial on/off state.For
stepper rows — the list of values to cycle through.For
stepper rows — the starting index into values.Shows a submenu arrow on the right (you handle opening the next menu in
onSelect).Called when a
button row is chosen. The menu then closes.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)
The heading.
The items (also accepted under
items).Called when the context menu closes.
Item fields
The item text (also accepted as
label).A muted sub-line.
A leading icon.
Greys the item out and blocks selection.
Called when the item is chosen. The menu then closes.
