1.0.0 • Published 2 years ago

simple-react-star-rating v1.0.0

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

Simple React Star Rating

The typical rating star component with number indicator.

Install

npm install simple-react-star-rating

With number indicator

star-rating

Without number indicator

star-rating

Examples

import StarRating from "simple-react-star-rating";

function App() {
    return (
        <div>
            <StarRating showNumaric={true} size="16pt" value={3}></StarRating>
        </div>
    );
}

export default App;

Properties

PropertiesTypedefaultDescription
readOnlybooleanfalseOnly shows the value and can not be changed
disabledbooleanfalseRead only and opasity will 0.7
valuenumber0The value should be a displayed
numOfStarsnumber5Number of stars in the component
sizestring24ptThe size of the component in px or pt
showNumaricbooleantrueShow or hide the Number indicator