We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The JavaScript Rating is a highly customizable control to rate products or services with precise and accurate values by using built-in precision modes. The customization supported in the JavaScript Rating control makes rating more expressive instead of just showing numeric values.

JavaScript Rating Component


Precision modes

The JavaScript Rating control has several precision modes, which are listed below.

  • Full: The rating value is displayed in multiples of 1 (whole number).
  • Half: The rating value is displayed in multiples of 0.5 (half).
  • Quarter: The rating value is displayed in multiples of 0.25 (quarter).
  • Exact: The rating value is displayed in multiples of 0.1 (fraction).

JavaScript Rating Precision Modes


Tooltips

The JavaScript Rating control supports tooltips to provide more information about the rating. Tooltips can be customized using the template to provide more expressive content rather than the item’s numerical values.

JavaScript Rating Tooltip Template


Labels

Labels provide additional information about the current rating value. Labels can be customized using the template and placed in different positions around the rating.

JavaScript Rating Label


JavaScript Rating Templates

Templates

The JavaScript Rating control supports templates to customize rating items in different ways. Custom icons can be in the form of emojis, hearts, stars, SVG, and more.


Right to left (RTL)

The JavaScript Rating control supports right-to-left (RTL) rendering.

JavaScript Rating RTL


Built-in themes

The JavaScript Rating supports these built-in themes: Tailwind CSS, Bootstrap 5, Bootstrap 4, Bootstrap, Material, Fabric, Fluent, and high contrast. Users can customize one of these built-in themes or create new themes to achieve their desired look and feel by simply overriding SASS variables or using our Theme Studio application.


Web Accessibility

  • Fully supports WAI-ARIA accessibility to work with screen readers and assistive devices.
  • Follows WAI-ARIA best practices for implementing keyboard interaction.
    • Tab: Navigate to the Rating control.
    • Left Arrow: Decrease the rating value.
    • Right Arrow: Increase the rating value.
    • Up Arrow: Increase the rating value.
    • Down Arrow: Decrease the rating value.
  • Follows WCAG 2.0 standards in design of the UI visual elements such as foreground color, background color, line spacing, text, and images.

JavaScript Rating code example

Easily get started with the JavaScript Rating using a few simple lines of HTML and TS code example as demonstrated below. Also explore our JavaScript Rating example that shows you how to render and configure the JavaScript Rating.

<div>
     <input id='rating'/>
</div>
import { Rating } from '@syncfusion/ej2-inputs';

// Initialize the Rating.
let rating: Rating = new Rating();

// Render initialized Rating.
rating.appendTo('#rating');

80+ JAVASCRIPT UI CONTROLS

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

4.4/5
(340+ Reviews)
Read more on Capterra
4.6/5
(390+ Reviews)
Read more on G2
4.4/5
(340+ Reviews)
Read more on GetApp

Transform your applications today by downloading our free evaluation version Download Free Trial

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile