{"repo":"NdYAG/react-rater","free":true,"listed":false,"github":"https://github.com/NdYAG/react-rater","clone":"git clone https://github.com/NdYAG/react-rater.git","description":"⭐️ Interative & customizable star rater","language":"JavaScript","stars":189,"topics":["react","rater","star-rater","react-component"],"license":"BSD-3-Clause","category":"ui-components","readme_excerpt":"React-rater Star rater Install Note: If your react version is under 16.8.0 without hooks support, please keep using react-rater@5 API All attributes are optional. - total : Number, default 5 - rating : Number, default 0 - interactive : Boolean, default true . Create a read-only rater by setting this attribute to false . - onRate : function({ rating }) . Callback to retrieve rating value. Called after rated. - onRating : function({ rating }) . Callback to retrieve rating value. Called during rating (mouse moving between stars). - onCancelRate : function({ rating }) . Called when mouse moves out from rater. From version 5.0.0, callback is split into onRate & onRating & onCancelRate . onRate is called when mouse click, while onRating is called when mouse moves between star components and onCancelRate is called when mouse leaves rater. Usually you only need onRate . Read-only mode Set interactive={false} to create a read-only rater. In read-only mode, rating could contain a fractional part like 3.6 . (Thanks to @devmtnaing) Callback onRate & onRating ( rating is passed with the React's SyntheticEvent) Styling The CSS way The JS way You can define your own 'star' component (src/star.js). and style it based on these props: Real world example Valentine's Day: Abilu judge system for Douban Music: License BSD.","default_branch":null,"files":null,"tree":[],"storefront":"/r/NdYAG","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/NdYAG/react-rater/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}