Input
This function displays a customizable input dialog to the player. It is a wrapper that automatically switches between your custom React interface (Interface.ShowInput) based on your Config.InputDialog setting.
Syntax
Lib47.ShowInput(heading, rows, options)Parameters
Argument
Type
Description
heading
String
The title text displayed at the top of the dialog.
rows
Table
An array of tables, where each table represents an input field.
options
Table
(Optional) A table containing global configuration for the dialog window.
Return Value
Success: Returns a
table(array) containing the input values in the order of the rows.Cancel: Returns
nilif the user cancels the dialog (presses Escape or the Cancel button).
Row Properties
Each entry in the rows table can contain the following properties.
Common Properties (All Types)
Property
Type
Default
Description
type
String
'input'
The type of input field (see list below).
label
String
-
The text label displayed above the input.
description
String
-
Small helper text displayed below the input.
icon
String
-
FontAwesome icon class (e.g., 'fa-user').
required
Boolean
false
If true, the user cannot submit without filling this field.
disabled
Boolean
false
If true, the field is visible but not editable.
default
Mixed
-
The initial value of the field.
placeholder
String
-
Placeholder text inside the input field.
Input Types
Type
Specific Properties
Description
'input'
minLength, maxLength, password
Standard text input.
'textarea'
min (rows), max (rows), autosize
Multi-line text area.
'number'
min, max, step, precision
Numeric input.
'slider'
min, max, step
A visual range slider.
'select'
options, clearable, searchable
Single-choice dropdown.
'multi-select'
options, maxSelectedValues
Multiple-choice dropdown/chips.
'checkbox'
-
A boolean toggle switch.
'date'
format, returnString
Date picker.
'time'
-
Time picker.
'date-range'
format, returnString
Start and End date picker.
'color'
-
RGB Hex color picker.
Note: For
selectandmulti-select, theoptionsproperty must be an array of objects structured as{ value = "val", label = "Label" }.
Dialog Options
The third argument, options, controls the window's appearance and behavior.
Option
Type
Default
Description
allowCancel
Boolean
true
Whether the generic "Cancel" button is shown.
size
String
'md'
Window width: 'xs', 'sm', 'md', 'lg', 'xl'.
borders
Table/Array
-
Add accent borders. Example: {'left', 'right'}.
colors
Table
-
Custom coloring for this specific dialog instance.
Colors Structure
Examples
1. Basic Information Form
A simple form to get a player's name and age.
2. Advanced Selection & Formatting
Using dropdowns, date ranges, and sliders with specific styling.
3. Custom Themed Dialog
Override the default colors for a specific menu (e.g., a dark/red illegal shop).
Last updated