Register
string
required
1 to 64 letters, digits or
_ - . :. Registering it again replaces it.string
required
table[]
required
1 to 50 items.
Id of the parent context. Shows a back button.
function
function
Closed without a choice.
boolean
default:"true"
title, description, icon, iconColor (a Color), image (nui:// or https://), disabled, readOnly, progress (0 to 100), colorScheme (a Color for the bar), arrow, metadata (up to 10 { label, value }, shown on hover), menu (id of a context to open), onSelect(args) and args.
Open(id)returns at once. Callbacks run in your resource.argsnever reach the page.- Opening a context replaces your own open one. It is not shown while another resource has a modal open.
Inline
Open({ title, items, canClose?, timeout? }) waits and returns the chosen item’s index and args. Inline items MUST NOT have onSelect or menu. MUST run in a thread.
Example
client.lua