Add ratings

Adding ratings (HTML)

[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]

The Rating control let users rate something by clicking an icon that represents a rating. It can display three types of ratings: an average rating, a tentative rating, and the user's rating. (Windows only)

Rating controls displaying average, tentative, and user ratings

Average rating

Displays the average rating as calculated or stored by your app.

The control doesn’t store user ratings or calculate the average, so you must save the ratings to your server or local storage and calculate the average. The control accepts floating point values and can show partial stars.

Tentative rating

When the user interacts with the control, by mouse hover, keyboard focus, mouse down, mouse drag, touch down, or touch drag, the control displays a preview of the new rating. After a moment, it also displays a tooltip with a description or value of the new rating.

User rating

The rating selected by the user.

By default, the control lets users clear their previous ratings by sliding their fingers or the mouse pointer from the right to the left side of the control and lifting. Users can also use the arrow key to empty all the stars and then press Enter, or press 0 and then Enter.

Clearing a rating

The topics in this section show you how to use the Rating control in your app.

In this section


Quickstart: adding ratings

Walks you through the steps to add a Windows Library for JavaScript Rating control to a Windows app using JavaScript. (Windows only)




© 2019 Microsoft