class UITextField
A view class that represents a text field control.
class UITextField extends UIElement;
Notes
- Renders as a single-line (default) or multi-line input field.
- Use the UI.TextField() function to create text fields using a builder.
Constructor
new UITextField()
Creates a new text field view instance.
Type members
type UITextField.InputType static
An identifier for a text field input type.type UITextField.EnterKeyHintType static
An identifier for a virtual keyboard ‘enter’ button type.class TextFieldBuilder static
A builder class for creating UITextField instances.
Static members
function textFieldBuilder() static
Creates a view builder for a text input field element.function textAreaBuilder() static
Creates a view builder for a multi-line text area element.
Instance members
value
The current input value.placeholder
The placeholder text displayed when the field is empty.multiline
True if multiline input mode should be enabled.type
The input field type.enterKeyHint
The text to display on the virtual keyboard’s ‘enter’ key.disableSpellCheck
True if spell and/or grammar checks should be disabled, where supported.trim
True if the text field should automatically trim whitespace from the input value.selectOnFocus
True if all text should be selected whenever the field gains input focus.disabled
True if user input should be disabled on this control.readOnly
True if the text field should appear read-only.textFieldVariant
A set of flags that determine the text field’s (internal) visual style.
Inherited members
name
The identifier for this UI element.hidden
True if the element should be hidden from view.style
The style overrides to apply to this element.setStyle()
Applies additional style overrides to this element.position
The position options for this element.accessibleRole
The WAI-ARIA role for this element, if applicable.accessibleLabel
The WAI-ARIA label text for this element, if applicable.requestFocus()
Requests input focus on this element.requestFocusNext()
Requests input focus for the next sibling element.requestFocusPrevious()
Requests input focus for the previous sibling element.getRenderer() protected
Returns the renderer observer for this element, if any.isFocused()
Returns true if this element currently has input focus.render()
Triggers asynchronous rendering for this element and all contained elements, if any.findViewContent()
Implementation of View.findViewContent(); returns an empty array unless overridden.lastRenderOutput
The last rendered output, if any; set by the UI element renderer.emit()
Emits an event, immediately calling all event handlers.emitChange()
Emits a change event.listen()
Adds a handler for all events emitted by this object.listenOnce()
Returns a promise for a single event with the provided name.listenAsync()
Adds a handler for all events emitted by this object, and returns an async iterable.observe()
Observes a property, a bound property from an attached parent, or an observable object.observeAsync()
Observes one or more targets asynchronously, batching or debouncing/throttling updates.attach() protected
Attaches the specified observable object to this object.isUnlinked()
Returns true if the object has been unlinked.unlink()
Unlinks this observable object.beforeUnlink() protected
A method that’s called immediately before unlinking an object, can be overridden.
