Star Rating
Star Rating
Star Rating is a visual component to collect and display measurable feedback from app users.
Adding a Star Rating component
To add a Star Rating to your app screen:
- Select the Star Rating component from the Components drawer. You can open the list of components by clicking the
+
button next to Components. - Go to alter the properties of the component, go to the Configs tab (second tab) in the Properties Panel.
Configuration Properties
Property | Description |
---|---|
Component Name | To alter the name of the component. The name is reflected in the Components tree. Defaults to Touchable. |
Star Size | Size of the star icons. |
Max Stars | The number of stars to display. |
Editable | Enable it to allow the app user to edit the star rating. |
Active Color | Color to display for active stars based on rating. |
Inactive Color | Color to display for inactive stars based on rating. |
Setting up the Star Rating component to use dynamic values
The Star Rating component can be hooked to the data incoming from an API endpoint.
To use the key in the API's JSON response and display the actual rating from the API endpoint:
- Go to the Data tab (third tab) in the Properties Panel.
- Set the value of Data Source property under Setup to the key from the JSON response.
Here is an example of using a Star Rating component in a List component.
{
"rating": 4,
...
}
Editing the rating using the Star Rating component
To make the Star Rating component interactive:
- Go to the Configs tab (second tab) in the Properties Panel.
- Enable Editable property to make the component interactive.
Updated 10 months ago