/ Rating

React.js component for entering 0-5 stars

React.js component for entering 0-5 stars

react-star-rating-input

React.js component for entering 0-N stars (N is 5 by default).

Installation

Made for Browserify; graphics and CSS bundled.

npm install --save react-star-rating-input

Props

Static layout

  • size -- how many stars to display. The default value is 5
  • showClear -- hides the "Clear" link when false. The default value is true
  • clearLabel -- custom text for the "Clear" link
  • clearHint -- custom <a>'s title, a tooltip for the "Clear" link on mouse-hover

Interaction

  • value -- how many stars are selected
  • onChange: function (value) {...} -- your value change handler

GitHub