@etzshally/reate
is a React component designed for creating simple star ratings in day-to-day applications.
Install the package using npm:
npm i @etzshally/reate
import React from "react";
import { AnimatedStarRating } from "@etzshally/reate";
const MyRatingComponent = () => {
return (
<AnimatedStarRating
ratingValue={4} // Rating (between 0 and 5)
/>
);
};
export default MyRatingComponent;
The AnimatedStarRating
component generates a set of stars based on the provided rating, filled color, and unfilled color.
-
ratingValue
: The rating value (between 0 and 5).
import React from "react";
import { AnimatedStarRating } from "@etzshally/reate";
const MyApp = () => {
return (
<div>
<h1>Product Rating</h1>
<AnimatedStarRating ratingValue={4.2} />
</div>
);
};
export default MyApp;
- react
- rating
- stars
- component
- UI
- frontend
Feel free to contribute by opening issues or submitting pull requests on GitHub.
Make sure to replace "Etzshally" with your actual GitHub username in the URLs and adjust the details as needed for your project.