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)
The dialog heading. Also accepted as
heading.An icon shown in the header.
A muted sub-line under the title.
The form fields, in order. Also accepted as
rows. Each field is shaped below.Whether the player can dismiss the form (clicking the backdrop or Cancel). When
false, they must submit.Field shape
One of
text, number, password, select, checkbox, slider, textarea.The field label.
Helper text shown under the field.
Placeholder for text-like and select fields.
Marks the field with an accent asterisk.
For
select fields — a list of { value, label } choices.For
slider fields — the minimum value.For
slider fields — the maximum value.For
slider fields — the increment.Returns
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)
The dialog heading.
The body text.
The confirm button text.
The cancel button text.
default or danger. danger styles the badge and confirm button in the destructive color.Returns
true if the player confirmed, false if they cancelled or dismissed.