![npm version](https://badge.fury.io/js/react-animation-rating.svg)
React-animation-rating
A simple component to display rating as stars
Installing as a package
npm i react-animation-rating
Usage
const Template: ComponentStory<typeof RatingAnimation> = (args) => {
const [value, setValue] = React.useState(4);
return (
<div>
<RatingAnimation
value={value}
countItem={5}
onChange={setValue}
/>
</div>
);
};
Demo
https://u4aew.github.io/react-animation-rating/
![demo](https://github.com/u4aew/react-animation-rating/raw/HEAD/./img/demo.gif)
Options
Name | Type | Required | Default |
---|
sizeStar | number | false | 24 |
countItem | number | false | 5 |
value | number | true | |
colorStar | string | false | #ffc107 |
colorInactiveStar | string | false | #9e9e9e |
disabled | boolean | false | false |
className | string | false | |
onChange | function | false | |