React Rate Component
npm install
npm start
http://localhost:8000/examples/
online example: http://react-component.github.io/rate/
var Rate = require('rc-rate');
var React = require('react');
React.render(<Rate />, container);
name | type | default | description |
---|---|---|---|
count | number | 5 | star numbers |
value | number | controlled value | |
defaultValue | number | 0 | initial value |
allowHalf | bool | false | support half star |
allowClear | bool | true | reset when click again |
style | object | {} | |
onChange | function(value: Number) | `onChange` will be triggered when click. | |
onHoverChange | function(value: Number) | `onHoverChange` will be triggered when hover on stars. | |
character | ReactNode | ★ | The each character of rate |
npm test
npm run chrome-test
npm run coverage
open coverage/ dir
rc-rate is released under the MIT license.