Simple rating component

Demo:

advanced/070 component schema

This is a simplified schema of a advanced/070 component element:

{
    "type": "component",
    "component": "advanced/070",
    "settings": {
        "rating": {}
    }
}

Check the full specification of the Component schema in the API documentation.

Settings property for advanced/070

This component accepts the following object items in the settings property:

rating object

Defines the rating component properties

Check all available object properties here.
Object property
Default value
value
5
Specify an integer number from 0 to 5
symbol
"star"
Defines what symbol to use. Select star|heart
vertical-align
"center"
horizontal-align
"center"
size
"3vw"
color
"gold"
off-color
"transparent"
Color of the non-rated stars or hearts

Usage examples

Check the following examples of advanced/070:

Example 1

{
    "width": 640,
    "height": 320,
    "quality": "high",
    "draft": true,
    "scenes": [
        {
            "background-color": "#6BAA75",
            "elements": [
                {
                    "type": "component",
                    "component": "advanced/070",
                    "settings": {
                        "rating": {
                            "value": 4,
                            "symbol": "star",
                            "size": "12vw",
                            "off-color": "rgba(255,255,255,0.1)"
                        }
                    },
                    "start": 0.5,
                    "duration": 5
                }
            ]
        }
    ]
}