react-stars-ratings

2.0.0 • Public • Published

react-stars-rating

NPM

react-stars-ratings is a react component that allows you to add ratings to your applications.

A customizable and interactive React star rating component for your web applications.

Easily integrate this library to enable users to rate content with a visually appealing star rating system.

Features

  • Click to select: Clicking on a star sets it as the selected rating.
  • Hover effect: Stars change background color on hover.
  • Control how the stars appear by passing in appropriate props.

Watch in action

Usage

Install

$ npm install react-stars-ratings

or

$ yarn add react-stars-ratings

Usage

import { StarRating } from 'react-stars-ratings';

Example

import React from 'react';
import { StarRating } from 'react-stars-ratings';

const MyComponent = () => {
  return (
    <StarRating />
  );
}

PropTypes

Prop Name Type Default Required Description
iconSize String 32px false the size of the stars
borderColor String black false the border color of the star svg icon
fill String yellow false the fill(background-color) of the star svg icon

Package Sidebar

Install

npm i react-stars-ratings

Weekly Downloads

1

Version

2.0.0

License

none

Unpacked Size

6.81 kB

Total Files

6

Last publish

Collaborators

  • jaykalia007