star-review-react

1.0.0 • Public • Published

React star review

A simple and customizable rating component for React Banner

Props

Prop Type Description Default
size Number Size of a star in px 30
rating Number Initial rating 0
interactive Boolean If true, users can change a rating. Must also provide onRatingChanged false
onRatingChanged Function Callback when rating changes null
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

Dependencies (0)

    Dev Dependencies (39)

    Package Sidebar

    Install

    npm i star-review-react

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    530 kB

    Total Files

    10

    Last publish

    Collaborators

    • sahajr