Label
The label field is ideally used in spaces where you must return a text/statement for the users - such as when a loan process is completed and you would like to display the approval status or the sanctioned amount on the UI. Also, a label allows you to display your static and dynamic text.
Label Properties
Property | Description |
---|---|
Text | This is the text that will be displayed on the UI. |
Align (Left / Center / Right) | Sets the alignment of the text to either the Left, Center, or Right of the screen, respectively. |
Dynamic Text
To generate this dynamic text with the label component, you can use the "code" shown below.
code
Loan Application ID: ${applicationId}
// Where "applicationId" is the bind of the component from where the dynamic text is sourced.
Note: Place the above code in your label component's "text" field.
API Methods
setVisibility
Sets the Visibility flag for this component.
- Method
- Usage
setVisibility(visible: boolean): void
// Setting the visibility to "true" makes the element visible
a8forms.Text("textId").setVisibility(true)
// Setting the visibility to "false" makes the element invisible
a8forms.Text("textId").setVisibility(false)
setVisibilityCondition
Sets the visibility condition for this component.
- Method
- Usage
setVisibilityCondition(condition: string): void
// Sets a condition for changing the element's visibility status.
a8forms.Text("textId").setVisibilityCondition("1 === 1")