Socket
Socket
Sign inDemoInstall

react-stars-ratings

Package Overview
Dependencies
8
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-stars-ratings

Add star ratings component to your React applications


Version published
Weekly downloads
23
increased by9.52%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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 NameTypeDefaultRequiredDescription
iconSizeString32pxfalsethe size of the stars
borderColorStringblackfalsethe border color of the star svg icon
fillStringyellowfalsethe fill(background-color) of the star svg icon

Keywords

FAQs

Last updated on 09 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc