Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-stars-ratings

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-stars-ratings

Add star ratings component to your React applications

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 09 Feb 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc