/react-native-animated-rating

light weight animated rating component for react native

Primary LanguageJavaScriptMIT LicenseMIT

React Native Animated Ratings

Light weight animated ratings component for react native, with zero dependency. (only require react, and react-native)

Demo

Live Demo

Installation

Install the package using yarn or npm:

yarn add react-native-animated-rating

OR

npm install --save react-native-animated-rating

Usage

import { Rating } from 'react-native-animated-rating';

<Rating
  starSize={30}
  defaultRating={0}
  count={5}
  readonly={false}
  onRatingFinished={(rating) => console.log(rating) }
/>

API

RatingProps

prop default type description
starSize 30 number Pass in size for star.
defaultRating 0 number Rating start value to show.
count 5 number Number of stars.
readonly false boolean Set true if you want to allow user change ratings.
onRatingFinshed -- funtion Callback method when the user finishes rating. Gives you the final rating value as a whole number

Feedback

This repo is being actively manitained. Feel free to open a new Issue with a Feature Request or submit a PR with an Enhancement.