You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Text Input component allows users to enter a single line of text. It can be used as a standalone component or in Form fields. In this document, we'll go through all the configuration options for the Text Input component.
Properties
<div style={{ width:"100px"}}> Property
<div style={{ width:"250px"}}> Description
<div style={{width: "200px"}}> Expected Value
Label
Text to display as the label for the field.
String (e.g., Enter Your Name).
Placeholder
A hint displayed to guide the user on what to enter.
String (e.g., John Doe).
Default Value
The default value that the component will hold when the app is loaded.
String (e.g., Default Text).
Events
Event
Description
On change
Triggers whenever the user types something in the text input.
On enter pressed
Triggers whenever the user presses the enter key on the keyboard after entering text in the Text Input component.
On focus
Triggers whenever the user clicks inside the text input field.
On blur
Triggers whenever the user clicks outside the text input field.
:::info
Check Action Reference docs to get detailed information about all the Actions.
:::
Component Specific Actions (CSA)
Following actions of component can be controlled using the component specific actions(CSA):
<div style={{ width:"100px"}}> Action
<div style={{ width:"135px"}}> Description
<div style={{width: "200px"}}> How To Access
setText()
Sets the value of the input field.
Employ a RunJS query (for e.g., await components.textinput1.setText('this is input text')) or trigger it using an event.
clear()
Clears the entered text in the input field.
Employ a RunJS query (for e.g., await components.textinput1.clear()) or trigger it using an event.
setFocus()
Sets the focus of the cursor on the input field.
Employ a RunJS query (for e.g., await components.textinput1.setFocus()) or trigger it using an event.
setBlur()
Removes the focus of the cursor from the input field.
Employ a RunJS query (for e.g., await components.textinput1.setBlur()) or trigger it using an event.
setVisibility()
Sets the visibility of the component.
Employ a RunJS query (for e.g., await components.textinput1.setVisibility(false)) or trigger it using an event.
setLoading()
Sets the loading state of the component.
Employ a RunJS query (for e.g., await components.textinput1.setLoading(true)) or trigger it using an event.
setDisable()
Disables the component.
Employ a RunJS query (for e.g., await components.textinput1.setDisable(true)) or trigger it using an event.
Exposed Variables
Variable
Description
How To Access
<div style={{ width:"100px"}}> value
Holds the value entered by the user in the component.
Accessible dynamically with JS (for e.g., {{components.textinput1.value}}).
<div style={{ width:"100px"}}> label
Holds the value of the component's label.
Accessible dynamically with JS (for e.g., {{components.textinput1.label}}).
<div style={{ width:"100px"}}> isValid
Indicates if the input meets validation criteria.
Accessible dynamically with JS (for e.g., {{components.textinput1.isValid}}).
<div style={{ width:"100px"}}> isMandatory
Indicates if the field is required.
Accessible dynamically with JS (for e.g., {{components.textinput1.isMandatory}}).
<div style={{ width:"100px"}}> isLoading
Indicates if the component is loading.
Accessible dynamically with JS (for e.g., {{components.textinput1.isLoading}}).
<div style={{ width:"100px"}}> isVisible
Indicates if the component is visible.
Accessible dynamically with JS (for e.g., {{components.textinput1.isVisible}}).
<div style={{ width:"100px"}}> isDisabled
Indicates if the component is disabled.
Accessible dynamically with JS (for e.g., {{components.textinput1.isDisabled}}).
Validation
<div style={{ width:"100px"}}> Validation Option
<div style={{ width:"200px"}}> Description
<div style={{width: "200px"}}> Expected Value
Make this field mandatory
Displays a 'Field cannot be empty' message if no value is entered.
Enable/disable the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.
Select the color or click on fx and input code that programmatically returns a Hex color code.
Alignment
Sets the position of the label and input field.
Click on the toggle options or click on fx to input code that programmatically returns an alignment value - side or top.
Width
Sets the width of the input field.
Keep the Auto width option for standard width or deselect it to modify the width using the slider or through code entry in fx that returns a numeric value.