rc-rate
React Rate Component
Screenshots
Development
npm install
npm start
Example
http://localhost:8000/examples/
online example: http://react-component.github.io/rate/
install
Usage
var Rate = require('rc-rate');
var React = require('react');
React.render(<Rate />, container);
API
props
name | type | default | description |
---|
count | number | 5 | star numbers |
value | number | | controlled value |
defaultValue | number | 0 | initial value |
allowHalf | bool | false | support half star |
style | object | {} | |
onChange | function(value: Number) | | `onChange` will be triggered when click. |
onHover | function(value: Number) | | `onHover` will be triggered when hover. |
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
open coverage/ dir
License
rc-rate is released under the MIT license.