@etzshally/reate
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

@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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.0
    2
    • latest

Version History

Package Sidebar

Install

npm i @etzshally/reate

Weekly Downloads

2

Version

1.4.0

License

MIT

Unpacked Size

45.3 kB

Total Files

14

Last publish

Collaborators

  • etzshally