is there any way to show rating in spfx web part from list as star

enter image description here

1 Answer 1


If you're using React, you can use an NPM package like https://www.npmjs.com/package/react-star-ratings to do what you're looking for.

enter image description here

To use it:

  1. Add the NPM package to your project by using:
npm i react-star-ratings
  1. In your web part's component (where you render the content), add the following import:
import StarRatings from './react-star-ratings';
  1. In your render method, add the star rating control and pass the average rating:

Let us know if you're not looking at using an NPM package, or if you aren't using React.

I hope this helps.

  • it worked , thank you
    – kumar
    Jul 15, 2020 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.