Icon
The widget adds an "Icon" to the form; however, unlike the other options (Icon Button & Icon Input), it doesn't offer a text display. It is also clickable and functions as a button.
Icon Properties
Icon Property | Description |
---|---|
Icon Type | Top/Right/Bottom/Left |
Icon Color | Use the color picker to change the icon's color |
Icon Size | Changes the size of the icon |
Additional Property | Description |
---|---|
Custom Class | Enter the "class name" of the icon list that you wish to use from the react library. |
Icon Attributes | Enter the "attribute" name of the individual icon. |
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.Icon("iconId").setVisibility(true)
// Setting the visibility to "false" makes the element invisible
a8forms.Icon("iconId").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.Icon("iconId").setVisibilityCondition("1 === 1")
Event Handlers
Event handlers allow you to set triggers for various actions based on the fired events. They are as follows:
onClick
onClick
- Sets the actions to be triggered when the component is clicked.