Skip to content

f20manuel/react-native-rating-by-f20manuel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

React Native Rating by f20manuel

Installation

Install the package using yarn or npm:

yarn add f20manuel-react-native-ratings

// OR

npm install --save f20manuel-react-native-ratings

Usage

import Rating from 'f20manuel-react-native-ratings';

export default function App() {
  const [rating, setRating] = useState(0);

  return (
    <Rating
      rating={rating}
      onFinishRating={setRating}
    />
  );
}

API

prop default type description
rating 0 number Total number of ratings to display
ratingCount 5 number Total amount of icons to display
onFinishRating none function(value: number) Callback method when the user finishes
icon star string icon displayed when selected (icon name in fontawesome)
emptyIcon star-o string icon displayed when not selected (icon name in fontawesome)
color #F9BB01 CSS Color Hexadecimal code of the selected icon
emptyColor #F9BB01 CSS Color Hexadecimal code of the not selected icon
size 32 number Icon size in pixels

About

Rating component for react native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published