Skip to content

A simple and customizable rating component for React

License

Notifications You must be signed in to change notification settings

SahajR/react-star-review

Repository files navigation

React star review

version downloads semantic-release travis build

A simple and customizable rating component for React Banner

View the demo.

Install

npm install react-star-review
// or
yarn add react-star-review

Usage

View example code here

Props

Prop Type Description Default
size Number Size of a star in px 30
rating Number Initial rating 0
rtl Boolean Rating behaves in right-to-left direction false
interactive Boolean If true, users can change a rating. Must also provide onRatingChanged false
onRatingChanged Function Callback when rating changes null
icon String A valid CSS Basic shape to be used as a mask for ratings Star
count Number Number of stars, aka the scale 5
borderThickness Number The stars' border thickness 2
filledColor String Color used to fill the star #FFC82C
clearColor String Color used to indicate the empty areas of the star #FFF
borderColor String The stars' border color #E4B50E
hoverColor String Color used to fill when a user hovers over them #FBDC84

Todos

  • Add support for right-to-left
  • Add support for custom icons

About

A simple and customizable rating component for React

Resources

License

Stars

Watchers

Forks

Packages

No packages published