voronianski / react-star-rating-component

Basic React component for star (or any other icon based) rating elements
http://voronianski.github.io/react-star-rating-component/example
MIT License
379 stars 77 forks source link

Add hover effect on rating #55

Open Suraj-Chandola opened 6 years ago

Suraj-Chandola commented 6 years ago

Please add hover effect on stars

MuhammadHaseeb-IVL commented 5 years ago

have anyone found the solution for adding hover effect?

mojtabamoosavi commented 4 years ago

I had the same problem and fixed it : You can set initial state like this: tempRate: null and use onStarHover props to set tempRate value. So, in StarRating component set the value props like this : value={tempRating ? tempRating : rating}.

I hope solve your problem.

pigd0g commented 3 years ago

Hover Example - https://codesandbox.io/s/tailwind-star-rating-heroicons-lixtc?file=/src/App.js