0.0.3 • Published 5 years ago

react-native-star-review v0.0.3

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

Battle Tested ✅

Fully customizable Star Review for React Native

npm version npm expo-compatible Platform - Android and iOS License: MIT

Installation

Add the dependency:

Pure React Native:

npm i react-native-star-review

Peer Dependencies

IMPORTANT! You need install them.
"react": ">= 16.x.x",
"react-native": ">= 0.55.x",
"react-number-format": ">= 4.x.x",
"react-native-vector-icons": ">= 6.x.x",
"react-native-dynamic-vector-icons": ">= x.x.x"

// Expo Version
"react-native-dynamic-vector-icons": "WrathChaos/react-native-dynamic-vector-icons#expo"

Basic Usage

 <StarReview />

Advanced Usage

You can check the example for the advanced usage

<StarReview
  ratings={5}
  stars={10}
  starColor="#8409ff"
  reviews={219301495}
  reviewsText="contributions"
/>

Configuration - Props

PropertyTypeDefaultDescription
starsnumber5create stars as many as you want
reviewsnumber0makes the stars fillable as many as you want
reviewsTextstringreviewschange the review's description text
reviewTextStylestyledefault styleset your own text style for review text
starSizenumber16change the star icon's size
starColorstring#ffa114change the star icon's color
textColorstring#757575change the text color
iconComponentcomponentIconset your own Icon component instead of dynamic-vector-icons
enableStarsbooleanfalseshows the stars as text
enableParenthesesbooleanfalsereviews are shown inside of parentheses
disableReviewbooleanfalsedisable the whole review part

Expo Compatibility

Star Review is usable with Expo. You just need to add a peer dependency:

"react-native-dynamic-vector-icons": "WrathChaos/react-native-dynamic-vector-icons#expo"

Known Issues

Android

Stars are not showing :O

-> You need to add this line of code into app/gradle

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

Future Plans

  • LICENSE
  • Write an article about the lib on Medium

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Star Review Library is available under the MIT license. See the LICENSE file for more info.