Rate

A score expressed as a row of glyphs, with half values, a custom character and a tooltip per step.

Basic

A Rate with a defaultValue of 3 shows five stars with three filled, and a click on any star changes the score.

Count

Set count to change how many stars the scale has, like 10 for a score out of ten.

Half

Add allowHalf so a click on the left half of a star picks a half step, like 2.5 out of 5.

Size

Set size to small, medium or large, or give the Rate a larger font size to scale the stars past large.

Read only

Pass disabled to show a score people cannot change, and add allowHalf for half values like 3.5.

Clear

Clicking the selected star again resets the rating to 0, and allowClear={false} turns that off for a rating that must stay set.

With text

Pass tooltips a word per star and show the word for the current score beside the stars, from Terrible to Wonderful.

Tooltip objects

Pass tooltips objects instead of strings to give each star its own tooltip title and color, like red for low protection.

Custom character

Pass any node as character to replace the star, like a check icon or the letter A.

Emoji reaction

Return an emoji per index from character for a five-step reaction scale, and dim the unselected ones with a class since emoji keep their own color.

In a form

Put Rate in a Form.Item with a required rule, and label each star with tooltips from Terrible to Wonderful.

In context

The component inside real screens, with the components it usually sits beside.

Category ratings

A review breakdown with a small read-only score per category, like cleanliness, accuracy and location.

Review summary

An average score above its rating count, beside a bar per star level that shows how the reviews split.

API Reference

Rate
Rate's props. Rows marked antuikit in the Version column are added by the kit.