The Star Rating Block: Put a Clear Score On the Page, No Icon Wrangling

Type a value and a maximum, and it draws the stars — half-stars included. Lay them out inline or stacked, colour them to match, and drop it straight into the page.

A score shouldn’t mean hunting for star icons

You want to put a rating on a page — a product’s score, how a service went, a quick mark on a portfolio piece. So you go looking for a star icon font, paste in five glyphs, colour some and grey out the rest — and then a half-star means slicing an image or giving up and rounding. Change the score later and you’re editing icons by hand all over again.

The Star Rating block puts the whole thing in one place — you type a number, and it draws the stars for you.

Any value out of any maximum — including half-stars like 4.5 out of 5
Stars inline beside a label, or stacked above it, with an optional title
Set the star size, spacing and both the marked and unmarked colours
Flip on rating schema so search engines can read the score

Setting one up takes a few seconds. Type the value and the maximum, pick inline or stacked, choose your colours, and the stars redraw as you go. No icon font, no image slicing — change the number later and the stars follow.

Try a few of them

Each rating below is a live Star Rating block on this page — the same block, different settings.

Inline, four and a half out of five. A fractional value, with the half-star drawn precisely, and a label sitting after the stars.

Overall

Stacked, with the label on top. The same stars, laid out above their title instead of beside it.

Service

Scored out of ten. Set the maximum to anything — here the scale runs to ten stars instead of five.

Score

Your own colours, at a bigger size. Marked and unmarked colours set to match the section, with larger stars.

It’s the same block each time — you’re only changing the value, the scale, and a couple of colours in the sidebar. Whatever the page needs a score for, it fits.

Ready to put a score on the page?

The Star Rating block ships with Flexa Block. Install the plugin and it’s waiting in the editor the next time you open a page — right alongside the live ratings you just scrolled past.

More articles

Keep reading

Other guides from the Flexa Blocks library.

48 posts found