A React Native component for generating and displaying interactive star ratings. Compatible with both iOS and Android.
Install the package via npm install react-native-star-rating --save
. Then require it in your JavaScript file via require('react-native-star-rating')
. Check out an example usage below:
var StarRating = require('react-native-star-rating');
var ExampleComponent = React.createClass({
onStarRatingPress: function (value) {
console.log('Rated ' + value + ' stars!');
},
render() {
return (
<StarRating
maxStars={5}
rating={3.5}
disabled={false}
starSize={15}
selectedStar={this.onStarRatingPress}
/>
);
}
});
module.exports = ExampleComponent;
- Node
npm install react-native-star-rating --save
View the project roadmap here
See CONTRIBUTING.md for contribution guidelines.