Skip to content

TextBox ​

An editable text field. Maps to Roblox TextBox.

luau
PeanutUI.TextBox {
    placeholderText = "Type here...",
}

Properties ​

In addition to the shared widget properties and all TextLabel properties:

PropertyTypeDescription
clearTextOnFocusbooleanClear text when focused.
multiLinebooleanAllow multiple lines.
placeholderTextstringPlaceholder text.
placeholderColorColor3Placeholder color.
cursorPositionnumberCursor position.
selectionStartnumberSelection start index.

Events ​

TextBox uses the shared widget events with no additions.