FAB
FAB (Floating Action Button) is a circular button placed at the lower right-corner of the app's interface. It "floats" above the main content of the application hence the name. FABs can be used to represent a primary action of the app, such as creating a new item or initiating a new task. Also, it comes with an icon to help you represent its purpose clearly to the users.
FAB Properties
Property | Description |
---|---|
Bottom Offset | Sets the FAB widget's distance from the bottom of the app. |
Right Offset | Sets the FAB widget's distance from the right margin of the app. |
Icon Size | Changes the size of FAB icon. |
Icon Type | Choose from a list of available icons. The choices are as follows. (Plus, Top, Right, Bottom, Left, Download, Edit, Delete, Alert, Success) |
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.FAB("fabId").setVisibility(true)
// Setting the visibility to "false" makes the element invisible
a8forms.FAB("fabId").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.FAB("fabId").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.