0.4.0 • Published 6 months ago

react-customizable-star-rating v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months 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

6 months ago

0.2.8

6 months ago

0.4.0

6 months ago

0.2.7

10 months ago

0.2.6

10 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago