@etzshally/reate
v1.4.0
Published
A simple React rating with stars component for day-to-day apps.
Downloads
8
Maintainers
Readme
@etzshally/reate
@etzshally/reate
is a React component designed for creating simple star ratings in day-to-day applications.
Installation
Install the package using npm:
npm i @etzshally/reate
Usage
Stars Component
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.
API
AnimatedStarRating({ ratingValue }: StarsProp): ReactElement
ratingValue
: The rating value (between 0 and 5).
Example
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;
Keywords
- react
- rating
- stars
- component
- UI
- frontend
Contributing
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.