Star Rating
This post is referring to Vahana 2 (beta version). To check the document for production, please go to vDesigner-v1.0
This element allows the user to give his/her feedback in the form of stars (For example: -one star, two stars, etc.). When the rating is given, the selected stars should be highlighted in different colors.

Usage
When to use |
Use when a frequent user’s feedback is required.Show evaluation.A quick rating operation on something. |
Star Rating Configuration
The “Star Rating” element consists of the following properties:
- UI Configuration
- Event Configuration
UI Configuration
For the “Star Rating” element, you can configure the following UI properties:
Tab | Property Name | Description | Mandatory | New Default Value | Visibility Rules |
Basic | Reference Name | Specifies a unique name of the element. At the application level, an element is identified and managed by the reference name. | Yes | StarRating 1 | |
Basic | Caption | Specifies the title of the element. | No | Star Rating | |
Basic | Rating Value | This property allows you to configure the value of the rating. # Sample Rating Value static(‘3.0′,’double’) | No | static(“3.0″,”double”) | |
Basic | Total Star Count | This property allows you to configure the total number of the stars that the application displays to capture the user’s rating. | No | 5 | |
Basic | Default Value | This property allows you to define the default value of an element. To define the default value: –> Click in this box, and it displays the list of the pre-define functions, attributes, and element IDs. –> In the list, select an attribute from which the application will fetch the default value and then display it in the element. | |||
Basic | Star Size | In this box, enter the size (For example: – 24) of the star that the application will display to the user. | No | 20 | |
Basic | Read Only | This property is configured to make the values of rating only readable. It provides the following options: Yes: – Selecting this value means that the user cannot select the stars to give the rating No: – Selecting this value means that the user can select the stars to give the rating. | No | marked | |
Basic | Visible | Allows you to define the default visibility of the UI element. | No | marked | |
Basic | Enable | Allows the user to enable/disable an element. You can decide whether the element needs to be clickable and usable. | No | marked | |
Basic | Mandatory | Allows you to configure the element as a mandatory element. | No | unmarked | |
Basic | Half Rating | This property allows the user to select half of the stars when the user gives the rating. It provides the following options: Yes: – Selecting this value means that the user can select half of the stars to give the rating. No: – Selecting this value means that the app will not allow the user to select half of the total stars to give the rating. | No | marked | |
Basic | Message on Failure | This property becomes visible when you select Yes under Mandatory. In the Message on Failure box, enter the error message that the application will display if the user does not perform the function on the element. | No | Required | when mandatory = checked |
UI Properties | Styles | Allows 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 pre-defined styles are: –> Primary –> Warning –> Success –> Danger –> Info –> Secondary | No | Primary | |
UI Properties- Alignment & Spacing | Margin | Allows 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. | No | Theme Variable (Margin) | |
UI Properties- Alignment & Spacing | Element Alignment | Click this list to align the element as follows: –> Right –> Top –> Bottom –> Top Right –> Top Left –> Bottom Right –> Bottom Left –> Center | No | Left Top | |
UI Properties-Caption | Font | Select the font type (For example: – Arial) of the element’s caption. | No | Theme Variable (Font Family) | |
UI Properties-Caption | Size | Enter the font size of the caption. | No | 12 | |
UI Properties-Caption | Color | Select the color of the font of the caption. | No | Theme Variable (Caption) | |
UI Properties-Caption | Bold | Enter the thickness of the character of the element’s caption in the range of values from 1 to 9. | No | 4 | |
UI Properties-Caption | Style | Select the style of font (For example:- Italic) of the caption | No | Normal | |
UI Properties- Shape & Decoration | Type | Under 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 & Decoration | X | Allows you to move the element along the X-axis; when the value increases, the element moves from left to right. | No | Show & Disable | |
UI Properties- Shape & Decoration | Y | Allows you to move the element along the Y-axis; when the value increases, the element moves from top to bottom. | No | Show & Disable | |
UI Properties- Shape & Decoration | Border Color | Click the Color box and then define the color of the border of the star shape. | No | Theme Variable (Primary) | |
UI Properties- Shape & Decoration | Opacity | Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. | Yes | 100% | |
UI Properties- Shape & Decoration | Select Color | Click the Color box and then define the color of the star shape. | No | Theme Variable (Primary) | |
UI Properties- Shape & Decoration | Opacity | Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. | Yes | 100% | |
Data | Entity Path | This 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. | No | Entity Name = “entity” |
Event Configuration
On the “Star Rating” element, you can configure the following event:
- onClick
Was this article helpful?
YesNo