Rating
A rating element renders a row of 5 stars, with filled and empty states controlled by rating_score. Only the 5-star layout is supported.
rating_score is on a scale of 0–100 (not 0–5). A score of 64 fills 3.2 out of 5 stars. The star_color property controls the filled stars; background_color controls the empty star backgrounds.
Available Properties
| Property | Description |
|---|---|
rating_score | Number 0–100. Score on a scale of 100 |
star_dimension | Number 4–400. Size in pixels of one star |
star_margin | Number 0–100. Margin in pixels between stars |
star_color | 6–8 digit hex or cmyka (print). Color of the filled stars |
background_color | 6–8 digit hex or cmyka (print). Background color of all stars |
shadow_color / shadow_blur / shadow_offset_x / shadow_offset_y | See Shadow |
Example
json
{
"rating_score": 64,
"star_dimension": 40,
"star_margin": 10,
"star_color": "#FF0000",
"background_color": "#EAEAEA80"
}
