FAB (Floating Action Button)

This post is referring to Vahana 2 (beta version). To check the document for production, please go to vDesigner-v1.0

The floating action button is used to access the most common functionalities or actions on the screen. It appears as a circular shape icon by default.


When to useWhen not to use
Use the FAB if it is suitable to present the primary functions of the current screen. Only include most primary functions in the FAB. Use two different FAB(s) if they denote distinct primary functions/actions.Do not use multiple FAB(s) on the specific screen. Do not use FAB on every screen especially if the images denote the primary functions on the screen.

Floating Action Button Configuration

On the “Floating Action Button” element, you can perform the following configurations:

  • UI Configuration
  • Event Configuration

UI Configuration

For the “FAB” element, you can configure the following UI properties:

TabProperty NameDescriptionMandatoryNew Default ValueVisibility Rules
BasicReference NameSpecifies a unique name of the element. At the application level, an element is identified and managed by the reference name.YesFab_1
BasicSourceAllows you to configure the source location of the element’s image. The application fetches the element’s image from the source location and displays it to the user. You can use the following options to configure the source location:
–> None
–> URL
–> Asset Library
BasicEnter URLThis box appears after you select URL in the Source list. In the Enter URL box, enter the URL of the image, and the application loads the image from the source location.Yesif source = url
BasicSelect AssetIt allows you to fetch the element’s image from the Assets Manager module. In this box:
–> Click the asset library icon (), and the Select Asset dialog box opens.
–> In the Select Asset dialog box, select an icon, and then click Select, and you successfully configure the image of the icon. 
Yesif source = Assets
BasicVisibleAllows you to define the default visibility of the UI element. Nomarked
BasicEnableAllows the user to enable/disable an element. You can decide whether the element needs to be clickable and usable.Nomarked
UI PropertiesStylesAllows you to select a specific style for the element from the list of pre-defined styles. The vDesigner module offers pre-defined styles that you can apply to the element. These styles are:
–> Primary
–> Warning
–> Success
–> Secondary
–> Info
–> Danger
UI PropertiesColorClick the Color box and then select the background color of the button.NoTheme Variable (Primary)
UI PropertiesOpacityOpacity is the degree to which content behind an element is hidden, and is the opposite of transparency.

While configuring the color, you can also configure the opacity in the percentage unit.
UI PropertiesElevationAllows you to configure the elevation of the background. The elevation is measured as the relative distance between two surfaces along the Z-axis.No8
UI Properties- Alignment & SpacingMarginAllows you to desirably define margin around each side of the element. It provides four different boxes to define the margin outside the right, left, top, and bottom border of the element.NoTheme Variable (Margin)
UI Properties- Alignment & SpacingElement AlignmentAllows the user to set the position of the text within the element. You can use any of the following options for positioning the text:
–> Right
–> Top
–> Bottom
–> Top Right
–> Top Left
–> Bottom Right
–> Bottom Left
–> Center
NoLeft Top
UI Properties-IconSizeAllows you to configure the size of the element’s icon in the pixel unit.
UI Properties-IconColorAllows you to configure the color of the element’s icon. To configure the color:
–> In the Color box, click the left color box (), a color canvas open.
–> On the canvas, on the horizontal bar, move the circle to select the color.
–> In the upper section, move the circle to select the tone of the color.
UI Properties- Shape & DecorationTypeUnder the Shape and Decoration section, this property has the two following options:

Autofill:- If you select this option, you cannot change the element’s dimensions. When you drag the element to the canvas, this option is selected by default.

If you select Auto Fill, vDesigner places the element with the default dimensions.

Manual:- If you select this option, you can change the dimensions of the element.
UI Properties- Shape & DecorationWidth ValueEnter the width of the element in the pixel unit or percentage unit.No56px
UI Properties- Shape & DecorationHeight ValueEnter the height of the element in the pixel unit.No56px
UI Properties- Shape & DecorationXAllows you to move the element along the X-axis; when the value increases, the element moves from left to right.NoShow & Disable
UI Properties- Shape & DecorationYAllows you to move the element along the Y-axis; when the value increases, the element moves from top to bottom.NoShow & Disable
DataEntity PathThis property allows you to map an attribute to the element. You define the JSON based attributes in the entity in the Data Modeler module.

To define the entity path:
–> Click in the Entity Path box, and a list expands.
–> The list displays several attributes from the entity.
–> In the list, select an attribute to map it to the element.

After the user performs the function on the element, the application can perform the following functions:
a. Fetches data from the attribute and then displays it in the element.
b. Stores data in the attribute.

Event Configuration

You can configure the following event on the ?Fab Button? element:

  • onClick
Was this article helpful?