Light Weight Animated Rating Component for React Native

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

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: number) => handleRating(rating) }
/>

API

RatingProps

prop default type description
starSize 30 number Pass in size for start image.
defaultRating 0 number Rating value to show if readonly is true.
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.

Download Details:

Author: Lutif

Source Code: https://github.com/Lutif/react-native-animated-rating

#react-native #react #mobile-apps

Light Weight Animated Rating Component for React Native
2.45 GEEK