- Components
- Rating
- Hearts
Hearts Rating
Render scores as rows of hearts with partial fills and custom colors, updating the value on every API call. Generate heart rating images free with imejis.
Updated

What this style sets
A style is the rating component with a few properties set. Send these, or start from the style in the editor.
{
"score.iconShape": "heart",
"score.activeColor": "#EF4444"
}Good for
- Like and favorite counts as visuals
- Health or lives indicators in gamified emails
- Valentine-themed campaign graphics
Try your own data
Change the hearts rating here with the same controls the editor shows. The preview updates as you type, and you get the API request for your changes.
Examples
Each example is the same hearts rating with different values. The JSON is what you send.
Recipe favorite score
A 4.5-heart community rating for a food blog recipe card.
{
"score.iconShape": "heart",
"score.activeColor": "#EF4444",
"score.value": 4.5
}Lives left in a streak email
Two of five hearts remaining — a gamified nudge on a dark canvas.
{
"score.iconShape": "heart",
"score.activeColor": "#EF4444",
"score.value": 2,
"score.inactiveColor": "#374151"
}New values, every render
Set '<key>.value' to the score for each render; max, colors and border props are overridable too. Send only the properties you want to change; everything else keeps its design value. The API guides cover every language.
curl -X POST "https://render.imejis.io/v1/$IMEJIS_DESIGN_ID" \
-H "dma-api-key: $IMEJIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"score.iconShape": "heart",
"score.value": 3.5,
"score.activeColor": "#EF4444"
}' \
-o image.pngconst res = await fetch(`https://render.imejis.io/v1/${process.env.IMEJIS_DESIGN_ID}`, {
method: "POST",
headers: {
"dma-api-key": process.env.IMEJIS_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"score.iconShape": "heart",
"score.value": 3.5,
"score.activeColor": "#EF4444"
}),
})
if (!res.ok) throw new Error(`render failed: ${res.status}`)
const image = Buffer.from(await res.arrayBuffer())import os
import requests
response = requests.post(
f"https://render.imejis.io/v1/{os.environ['IMEJIS_DESIGN_ID']}",
headers={
"dma-api-key": os.environ["IMEJIS_API_KEY"],
"Content-Type": "application/json",
},
json={
"score.iconShape": "heart",
"score.value": 3.5,
"score.activeColor": "#EF4444"
},
)
response.raise_for_status()
with open("image.png", "wb") as f:
f.write(response.content)Other rating styles
Hearts Rating questions
What does the Hearts style change on the rating component?
Heart icons — likes, favorites and health bars. It sets 2 properties on the rating component: iconShape, activeColor. Everything else keeps the component's defaults, so your data and layout carry over.
How do I render the hearts rating through the API?
Add a rating component to a design, then send its data together with the style's properties as flat overrides (for example score.iconShape and score.activeColor) in the render request. Each render can carry different data while keeping the Hearts look.
Can the rating value change on every API call?
Yes — send '<key>.value' with any number, including fractions like 4.3; max, colors and other properties are overridable too.
How are fractional scores like 4.3 displayed?
The partial property controls the last icon: 'exact' fills it proportionally, 'half' rounds to halves and 'round' rounds to a whole icon.
Where the rating component fits
Free tools built on it, guides that use it, and the components that sit beside it.





