Skip to content

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

PropertyDescription
rating_scoreNumber 0–100. Score on a scale of 100
star_dimensionNumber 4–400. Size in pixels of one star
star_marginNumber 0–100. Margin in pixels between stars
star_color6–8 digit hex or cmyka (print). Color of the filled stars
background_color6–8 digit hex or cmyka (print). Background color of all stars
shadow_color / shadow_blur / shadow_offset_x / shadow_offset_ySee Shadow

Example

json
{
  "rating_score": 64,
  "star_dimension": 40,
  "star_margin": 10,
  "star_color": "#FF0000",
  "background_color": "#EAEAEA80"
}

Rating example