VaelisDocs
v1.0.0
Components · v1.0.0

TextInput

Vaelis 1.0.0 TextInput component reference: fields, script API, behavior and examples.

View as Markdownllms.txt
ScopeThis page documents the TextInput component in Vaelis 1.0.0. Runtime fields are serialized scene data; the Script API section lists only members intentionally exposed to game scripts.
Where to find it in the editorTop UI → Message Input, or Inspector → Add Component → Text Input.

#What it does

Interactive text input control driven by the runtime UI system.

Component setup & editor toolsTextInput creates an editable text-entry control and is typically created from GameObject → UI or the Inspector Add Component picker.

#How to add and use TextInput

Editor path: Select the target entity in the Hierarchy (left side) → look at the Inspector (right side) → click Add Component at the bottom of the Inspector → search for TextInput → click the component row. The Add Component picker is a centered modal with a search box; it only lists components not already attached.

For components with a dedicated editor tool, the tool is opened or activated from the location described below. Do not assume that adding the component alone activates its editor; some systems require a separate window, panel, or viewport tool.

#Component setup & editor tools

  • GameObject → UI → Message Input creates a TextInput entity. You can also select an entity → Inspector → Add Component → Text Input.

#What you should see after adding it

The component appears as its own section in the Inspector. Its serialized settings are listed in the Component data table below. If a field is conditional, it appears only when the relevant mode/type is selected. If a field is a runtime state field (for example grounded or resolved velocity), treat it as read-only diagnostic state unless the API reference explicitly documents it as writable.

#How to read the settings

For every setting below, the documentation distinguishes type, default, meaning, and tuning direction where behavior is known. When a value represents a direction, use the engine's coordinate convention documented in Coordinate system; do not substitute Unity/Godot conventions.

#Component data

FieldTypePurposeDefault
valuestringCurrent text.
placeholderstringPlaceholder text.Type a message...
maxLengthnumberMaximum characters.200
fontSizenumberFont size.18
fontFamilystringFont family.Arial
textColorhex stringText color.#111111
placeholderColorhex stringPlaceholder color.#999999
backgroundColorhex stringBackground.#ffffff
borderColorhex stringBorder.#888888
borderWidthnumberBorder width.2
cornerRadiusnumberCorner radius.8
widthnumberControl width.260
heightnumberControl height.40
paddingnumberHorizontal/vertical padding.10
clearOnSubmitbooleanClear after submit.true
focusedbooleanWritten by the engine each frame; not an authored setting. (engine-managed runtime state)false
justSubmittedbooleanWritten by the engine each frame; not an authored setting. (engine-managed runtime state)false

#Tuning behavior

These are the practical direction-of-change rules for the most important controls on this component.

SettingWhat changing it does
maxLengthHard cap on typed characters.
width / heightChanges the visual input box size.
borderWidthHigher = thicker border.
paddingHigher moves the text farther from the box edge.

#Script API

MemberKindDescription
valuePropertyText value.
placeholderPropertyPlaceholder.
maxLengthPropertyCharacter cap.
fontSizePropertyFont size.
fontFamilyPropertyFont family.
textColorPropertyText color.
placeholderColorPropertyPlaceholder color.
backgroundColorPropertyBackground color.
borderColorPropertyBorder color.
borderWidthPropertyBorder width.
cornerRadiusPropertyCorner radius.
widthPropertyControl width.
heightPropertyControl height.
paddingPropertyPadding.
clearOnSubmitPropertyWhether submit clears the text.
focusedPropertyRead-only focus state.
justSubmittedPropertyRead-only one-frame submit pulse.
clear()MethodClear the current input.

#Examples

js
if (this.textInput.justSubmitted) {
  sendMessage("Chat", "message", this.textInput.value);
  this.textInput.clear();
}
Need the full workflow?Components: complete workflow covers adding, configuring, testing, combining, and removing components.