All Projects → ui-ninja → react-native-rating-element

ui-ninja / react-native-rating-element

Licence: MIT License
A simple rating library for react native supporting: decimal points, direction aware icons, custom icon set from Ionicons, custom images and record rating given by users.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-rating-element

react-star-ratings
A customizable svg star rating component for selecting x stars or visualizing x stars
Stars: ✭ 128 (+573.68%)
Mutual labels:  ratings, rating, star-rating-component, star-rating
rater-js
Star rating widget for the browser. Unlimited number of stars. No dependencies. No Jquery required.
Stars: ✭ 66 (+247.37%)
Mutual labels:  rating, star-rating-component, star-rating
rating
Rating stars component
Stars: ✭ 28 (+47.37%)
Mutual labels:  ratings, rating
Raty
🌟 Raty - A Star Rating Plugin
Stars: ✭ 2,292 (+11963.16%)
Mutual labels:  rating, star-rating
GoAIRatings
Estimate Go AI ratings by real games
Stars: ✭ 118 (+521.05%)
Mutual labels:  ratings, rating
react-ratings-declarative
A customizable rating component for selecting x widgets or visualizing x widgets
Stars: ✭ 41 (+115.79%)
Mutual labels:  rating, star-rating
goodreads-toolbox
9 tools for Goodreads.com, for finding people based on the books they’ve read, finding books popular among the people you follow, following new book reviews, etc
Stars: ✭ 56 (+194.74%)
Mutual labels:  ratings, rating
vue-star-rating
⭐ A simple star rating component for vue apps
Stars: ✭ 30 (+57.89%)
Mutual labels:  star-rating-component, star-rating
rating
⭐ A true Bayesian rating system with scope and cache enabled
Stars: ✭ 49 (+157.89%)
Mutual labels:  rating, star-rating
react-simple-star-rating
A simple react component for adding a star rating to your project.
Stars: ✭ 74 (+289.47%)
Mutual labels:  star-rating
discourse-ratings
A Discourse plugin that lets you use topics to rate things
Stars: ✭ 31 (+63.16%)
Mutual labels:  ratings
cyberrating
🚥 S&P of Blockchains
Stars: ✭ 13 (-31.58%)
Mutual labels:  rating
Angular-Reactive-Demo-Shop
Angular Demo Shop
Stars: ✭ 79 (+315.79%)
Mutual labels:  rating
devrating
A tool that suggests minimal PR size for contributors
Stars: ✭ 19 (+0%)
Mutual labels:  rating
yii2-vote
Provides voting for any model 👍 👎
Stars: ✭ 70 (+268.42%)
Mutual labels:  rating
MovieRatings
Android app to show movie ratings when browsing Netflix, Amazon Prime Video and other supported video streaming apps on the phone
Stars: ✭ 71 (+273.68%)
Mutual labels:  ratings
ColorRatingBar
change color of star in rating bar
Stars: ✭ 23 (+21.05%)
Mutual labels:  rating
average-rating
Calculate average score and rating based on Wilson Score Equation
Stars: ✭ 28 (+47.37%)
Mutual labels:  rating
iconic-input
Beautiful Input components for React Native... <IconicTextbox/> and much more!
Stars: ✭ 22 (+15.79%)
Mutual labels:  ionicons
Coursera-Clone
Coursera clone
Stars: ✭ 48 (+152.63%)
Mutual labels:  rating

React Native Rating Element

A simple rating library for react native supporting:

  • a11y ready ⚛️
  • decimal points like 3.7, 4.2 etc,
  • direction aware icons (like you can pass direction as “column” or “row-reverse”),
  • custom icon set from Ionicons,
  • custom images (You can add any suitable image as per your wish),
  • and interact and record rating given by users.

Installation · Usage · API Documentation · Sample Output ·

Please note: This package depends on react-native-vector-icons. Please configure it for iOS and android before using this package.
- For iOS, you will need to add Ionicons.ttf file from node_modules/react-native-vector-icons to Fonts folder and then edit Info.plist. Try this article
- For android - Please follow these instruction.

Installation

Use the package manager npm to install react-native-rating-element.

npm install react-native-rating-element

Usage

import { Rating } from "react-native-rating-element";

<Rating
  rated={3.7}
  totalCount={5}
  ratingColor="#f1c644"
  ratingBackgroundColor="#d4d4d4"
  size={24}
  readonly // by default is false
  icon="ios-star"
  direction="row" // anyOf["row" (default), "row-reverse", "column", "column-reverse"]
/>

**Custom Image, onIconTap and bottom to top direction**
<Rating
  rated={3.7}
  totalCount={5}
  size={42}
  onIconTap={position => console.log(`User pressed: ${position}`)}
  direction="column-reverse"
  type="custom" // default is always to "icon"
  selectedIconImage={require('./filled.png')}
  emptyIconImage={require('./empty.png')}
/>

API

prop default type description
rated 0 number Represents Initial value for the rating.
totalCount 5 number Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is totalCount
type icon string If you want custom images, then pass custom as prop value.
In case of custom, Make sure to pass selectedIconImage and emptyIconImage.
selectedIconImage - image path (node) Pass in custom path for selected icon. For ex. selectedIconImage={require('../pathToImage/image.png}.
emptyIconImage - image path (node) Pass in custom path for selected icon. For ex. emptyIconImage={require('../pathToImage/image.png}.
readonly false bool If passed true, onIconTap event won't be fired.
direction 'row' string Pass any value from [ "row", "row-reverse", "column", "column-reverse"].
onIconTap - func On press of star icon by user, this function will be invoked with position paramter. For ex. when user taps on 4 rating, this function will be invoked and in position parameter you will get value 4. Please note: This won't be triggered if readonly is passed as true.
ratingColor #f1c644 string (color) Pass in a custom color to fill-color the rating icon.
ratingBackgroundColor #d4d4d4 string (color) Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon.
size 24 number Pass in a custom font size for the icon
icon 'ios-star' string Pass in a custom text for the icon. For ex. 'beer', 'bulb'. These icons are imported from package react-native-vector-icons. Please Note: For now this package only support Ionicons
marginBetweenRatingIcon 1 number Pass in custom number to manage space or margin between the rating icons.

Output

Output

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].