ensemble.RatingStars widget
The ensemble.RatingStars
widget in Ensemble provides an intuitive solution for displaying star ratings with customizable attributes. It is fixed at 5 stars.
Kitchen Sink example (opens in a new tab)
Input Parameters Required:
rating
: An integer or double between 1 and 5, indicating the number of stars to be filled
Optional:
starColor
: The color used to fill the stars, default is 0xFFF5970AstarBackgroundColor
: The color used as the background of the box containing each star, default is 0xFFFFFAEBsize
: An integer to set the size of each star, default is 16starGaps
: An integer to set the gap between stars, default is 4starPadding
: An integer to set the padding for each star, default is 2starBorderRadius
: An integer to set the gap between stars, default is 2
By utilizing these Input Parameters, you can customize the appearance of the rating stars by adjusting these parameters tailored to your app's design. Below is an example of how to use the public widget RatingStars
:
- ensemble.RatingStars:
inputs:
rating: 3
size: 24
starColor: white
starBackgroundColor: red
Since this widget is globally available, you only need to specify the rating input. The example above also showcases optional input parameters for further customization. Incorporate the ensemble.RatingStars
widget in your app to enhance the visual representation of rating stars.