Bridge.Input— a modal form with one or more fields (text, number, select, slider, checkbox, …). Returns the entered values, ornilif cancelled.Bridge.Confirm— a yes/no dialog with an optional danger styling. Returns a boolean.
Availability
Client only.Input
Signature
Bridge.Input.Open(opts)
string
default:"Input"
The dialog heading. Also accepted as
heading.string
An icon shown in the header.
string
A muted sub-line under the title.
table[]
required
The form fields, in order. Also accepted as
rows. Each field is shaped below.boolean
default:"true"
Whether the player can dismiss the form (clicking the backdrop or Cancel). When
false, they must submit.Field shape
string
required
One of
text, number, password, select, checkbox, slider, textarea.string
required
The field label.
string
Helper text shown under the field.
string
Placeholder for text-like and select fields.
boolean
Marks the field with an accent asterisk.
table[]
For
select fields — a list of { value, label } choices.number
default:"0"
For
slider fields — the minimum value.number
default:"100"
For
slider fields — the maximum value.number
default:"1"
For
slider fields — the increment.Returns
table | nil
A list-style table of the entered values in field order (
values[1], values[2], …). nil if the player cancelled.Examples
Confirm
A focused yes/no dialog. Returnstrue only if the player confirms.
Signature
Bridge.Confirm.Open(opts)
string
default:"Are you sure?"
The dialog heading.
string
default:"Choose an action to continue."
The body text.
string
default:"Confirm"
The confirm button text.
string
default:"Cancel"
The cancel button text.
string
default:"default"
default or danger. danger styles the badge and confirm button in the destructive color.Returns
boolean
true if the player confirmed, false if they cancelled or dismissed.