Skip to main content

TextInput

For letting the user input text.

Types

TextInputProps

interface TextInputProps {
...BaseProps--

All Base properties are accepted.

Disabledboolean?--

Whether the text input is disabled.

CharacterLimitnumber?--

The maximum number of characters allowed in the text input.

ColorColor3?--

The color of the text input's border when focused.

PlaceholderTextstring?--

The placeholder text displayed when the input is empty.

Textstring?--

The current text in the text input.

ClearTextOnFocusboolean?--

Whether the text should be cleared when the input gains focus.

TextWrappedboolean?--

Whether the text should wrap within the input.

TextEditableboolean?--

Whether the text input is editable.

MultiLineboolean?--

Whether the text input supports multiple lines.

TextSizenumber?--

The size of the text.

TextColor3Color3?--

The color of the text.

FontFaceFont?--

The font face of the text.

PlaceholderColor3Color3?--

The color of the placeholder text.

TextXAlignmentEnum.TextXAlignment?--

The horizontal alignment of the text.

TextYAlignmentEnum.TextYAlignment?--

The vertical alignment of the text.

TextTransparencynumber?--

The transparency of the text.

TextProcessor(string) → string?--

A function to process the text input, and return new text.

Focusingboolean?--

Whether the text input is currently focused.

Hoveringboolean?--

Whether the mouse is hovering over the text input.

OnFocus() → ()?--

A callback function triggered when the text input gains focus.

OnFocusEnd() → ()?--

A callback function triggered when the text input loses focus.

}
Show raw api
{
    "functions": [],
    "properties": [],
    "types": [
        {
            "name": "TextInputProps",
            "desc": "",
            "fields": [
                {
                    "name": "...",
                    "lua_type": "BaseProps",
                    "desc": "All Base properties are accepted."
                },
                {
                    "name": "Disabled",
                    "lua_type": "boolean?",
                    "desc": "Whether the text input is disabled."
                },
                {
                    "name": "CharacterLimit",
                    "lua_type": "number?",
                    "desc": "The maximum number of characters allowed in the text input."
                },
                {
                    "name": "Color",
                    "lua_type": "Color3?",
                    "desc": "The color of the text input's border when focused."
                },
                {
                    "name": "PlaceholderText",
                    "lua_type": "string?",
                    "desc": "The placeholder text displayed when the input is empty."
                },
                {
                    "name": "Text",
                    "lua_type": "string?",
                    "desc": "The current text in the text input."
                },
                {
                    "name": "ClearTextOnFocus",
                    "lua_type": "boolean?",
                    "desc": "Whether the text should be cleared when the input gains focus."
                },
                {
                    "name": "TextWrapped",
                    "lua_type": "boolean?",
                    "desc": "Whether the text should wrap within the input."
                },
                {
                    "name": "TextEditable",
                    "lua_type": "boolean?",
                    "desc": "Whether the text input is editable."
                },
                {
                    "name": "MultiLine",
                    "lua_type": "boolean?",
                    "desc": "Whether the text input supports multiple lines."
                },
                {
                    "name": "TextSize",
                    "lua_type": "number?",
                    "desc": "The size of the text."
                },
                {
                    "name": "TextColor3",
                    "lua_type": "Color3?",
                    "desc": "The color of the text."
                },
                {
                    "name": "FontFace",
                    "lua_type": "Font?",
                    "desc": "The font face of the text."
                },
                {
                    "name": "PlaceholderColor3",
                    "lua_type": "Color3?",
                    "desc": "The color of the placeholder text."
                },
                {
                    "name": "TextXAlignment",
                    "lua_type": "Enum.TextXAlignment?",
                    "desc": "The horizontal alignment of the text."
                },
                {
                    "name": "TextYAlignment",
                    "lua_type": "Enum.TextYAlignment?",
                    "desc": "The vertical alignment of the text."
                },
                {
                    "name": "TextTransparency",
                    "lua_type": "number?",
                    "desc": "The transparency of the text."
                },
                {
                    "name": "TextProcessor",
                    "lua_type": "(string) -> string?",
                    "desc": "A function to process the text input, and return new text."
                },
                {
                    "name": "Focusing",
                    "lua_type": "boolean?",
                    "desc": "Whether the text input is currently focused."
                },
                {
                    "name": "Hovering",
                    "lua_type": "boolean?",
                    "desc": "Whether the mouse is hovering over the text input."
                },
                {
                    "name": "OnFocus",
                    "lua_type": "() -> ()?",
                    "desc": "A callback function triggered when the text input gains focus."
                },
                {
                    "name": "OnFocusEnd",
                    "lua_type": "() -> ()?",
                    "desc": "A callback function triggered when the text input loses focus."
                }
            ],
            "source": {
                "line": 34,
                "path": "src/Components/TextInput.luau"
            }
        }
    ],
    "name": "TextInput",
    "desc": "For letting the user input text.",
    "source": {
        "line": 6,
        "path": "src/Components/TextInput.luau"
    }
}