Rating component
Datatype: "rating"A row of stars, hearts, circles or custom icons filled to a value — with exact/half/rounded partial fills and an optional numeric label. Perfect for reviews and scores.
Design JSON
{
"title": "Rating sample",
"description": "A dynamic star rating",
"dimensions": {
"width": 800,
"height": 420
},
"background": {
"color": "#ffffff"
},
"components": [
{
"id": "sample-rating",
"key": "score",
"type": "rating",
"position": {
"x": 260,
"y": 182
},
"rotation": 0,
"size": {
"width": 280,
"height": 56
},
"dynamic": true,
"properties": {
"value": 4,
"max": 5,
"iconShape": "star",
"activeColor": "#FBBF24",
"inactiveColor": "#E5E7EB",
"emptyStyle": "filled",
"partial": "exact",
"showValue": false,
"valueFormat": "decimal",
"opacity": 1
}
}
]
}Like what you built? The full editor — canvas, templates and the render API — is free to start.
Open the editorRating examples
Real renders of the rating — each one is the same component with different property values, and the API payload below each preview reproduces it exactly.
App store rating badge
A 4.8-star average with the decimal score alongside, ready for a landing page.
API overrides for this example
{
"score.value": 4.8,
"score.showValue": true,
"score.valueFormat": "decimal",
"score.valueColor": "#374151"
}Weekly CSAT report
The support team satisfaction average as green stars for a Monday Slack digest.
API overrides for this example
{
"score.value": 4.2,
"score.activeColor": "#10B981",
"score.showValue": true,
"score.valueFormat": "fraction",
"score.valueColor": "#065F46"
}All rating styles
Every style rendered live — each is just a different set of property values on the same component, and each has its own page with a dedicated preview, use cases and API example.
Use cases
What developers typically build with the rating component.
- Product OG images showing the live review average
- Testimonial cards with the customer score rendered as stars
- App store rating badges for marketing sites
- Weekly CSAT report images for Slack or email
Use it dynamically via the API
Set '<key>.value' (or just '<key>') to the score for each render; max, colors and border props are overridable too.
Full API request with the sample design's current values — the playground above sends only the properties you change
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"score.value": 4,
"score.max": 5,
"score.iconShape": "star",
"score.activeColor": "#FBBF24",
"score.inactiveColor": "#E5E7EB",
"score.emptyStyle": "filled",
"score.partial": "exact",
"score.showValue": false,
"score.valueFormat": "decimal",
"score.opacity": 1
}'Only send the properties you want to change — everything else keeps its design value. See the API documentation for all languages.
Property reference
Every property the rating component accepts — in the editor, in design JSON, and as API overrides.
| Property | Type | Edits as | Default | Description |
|---|---|---|---|---|
| value | number | 3 | 3 | Current rating value (supports fractions). |
| max | number | 5 | 5 | Total number of icons. |
| iconShape | 'star' | 'heart' | 'circle' | 'custom' | starheartcirclecustom | "star" | Icon used for each rating unit. |
| customPath | string | text | — | SVG path for the icon when iconShape is 'custom'. |
| customEmoji | string | text | — | Emoji used as the icon when iconShape is 'custom'. |
| activeColor | color | #FBBF24 | "#FBBF24" | Color of filled (active) icons. |
| inactiveColor | color | #E5E7EB | "#E5E7EB" | Color of unfilled (inactive) icons. |
| emptyStyle | 'filled' | 'outline' | filledoutline | "filled" | Whether empty icons render solid in the inactive color or as outlines. |
| partial | 'exact' | 'half' | 'round' | exacthalfround | "exact" | How fractional values fill the last icon. |
| showValue | boolean | false | false | Show the numeric value next to the icons. |
| valueFormat | 'decimal' | 'fraction' | 'countOfTotal' | decimalfractioncountOfTotal | "decimal" | Format of the numeric label (4.5, 4.5/5, or "4 of 5"). |
| valueColor | color | #374151 | "#374151" | Color of the numeric label. |
| perRow | number | 0 | 0 | Icons per row before wrapping (0 = single row). |
| opacity | number | 1 | 1 | Overall component opacity from 0 (transparent) to 1 (opaque). |
| borderWidth | number | 0 | 0 | Border thickness in pixels around the component. |
| borderColor | color | transparent | "transparent" | Border color (any CSS color). |
| borderStyle | 'solid' | 'dashed' | 'dotted' | 'double' | 'none' | soliddasheddotteddoublenone | "solid" | Border line style. |
| borderRadius | number | 0 | 0 | Corner radius in pixels. |
| boxShadow | string | text | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |