0.4.0 • Published 2 years ago

react-customizable-star-rating v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

To use React customizable star rating

Steps to use the package

  • Install the package npm i react-customizable-star-rating this will add the package to your project
  • Import the package import {StarRating} from "react-customizable-star-rating";

Basic usage

<StarRating onSetRating={onRating} /> You need to replace this onRating with you own useState hook

Customization

You can pass these props to make sure that it's more suitable for you

#PropTypeDefault valueDescriptionMandatory
1onSetRatingFunction-----------useState hook to get/set the rating      
2defaultRatingNumber0Initial rating to view      
3maxRatingNumber5Stars Number      
4colorString#FCC419The stars filing and number color      
5sizeNumber48 in pixelThe size of the stars this will impact the number size      
6borderColorStringcolor= #FCC419The stars border color      
7classNameString''Class name for the stars container      
8messagesArray[]Array of messages to display when the user rating ex. instead of 1 => poor and so on      
8viewOnlybooleanfalseTo disable the rating functionality and make it a view only component      
For any suggestion/improvement please use GitHub repo URL
0.3.0

2 years ago

0.2.8

2 years ago

0.4.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago