npm

Need private packages and team management tools?Check out npm Orgs. »

rc-rate

2.5.0 • Public • Published

rc-rate


React Rate Component

NPM version build status Test coverage gemnasium deps npm download

Screenshots

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example: http://react-component.github.io/rate/

install

rc-rate

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
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
disabled bool false

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-rate is released under the MIT license.

install

npm i rc-rate

Downloadsweekly downloads

216,886

version

2.5.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability