0.0.2 • Published 2 years ago

react-dynamic-star v0.0.2

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

React Dynamic Star

A Highly Customizable, easy-to-use elegant stars rating component. This component is a port of an open-source component made in vue, you can access the repo in Vue Star Rating.

Demo

Full

Outlined

Edit react-dynamic-star-example

Usage

  1. Install via npm or yarn
yarn add react-dynamic-star

npm install react-dynamic-star
  1. Import in project
import { DynamicStar } from 'react-dynamic-star';
  1. Use
const App = () => { 

    return (
        <div>
            <DynamicStar rating={5} />
        </div>
    )
}

Props

PropertyTypeDescriptionDefault
rating*NumberA number between 0.0-totalStars that will determine the fullness of the stars rating polygons
outlined?Boolean, StringUse only outlined, the stroke color will use the fullStarColor, pass the color for he the outlined color will use.
outlineWidth?NumberThe width for outline
sharpnessStar?NumberDefine the sharpness/fatness of a star2.5
totalStars?NumberDefine total of stars5
width?NumberDefine width of a star100
height?NumberDefine height of a star100
emptyStarColor?StringDefine empty color when star is not filledtransparent
fullStarColor?StringDefine full star color when star is filled#FFBC00