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

react-awesome-stars-rating

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-awesome-stars-rating

React Awesome Stars Rating is a simple star component with easy integration for your React applications.

  • 0.16.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
increased by30.1%
Maintainers
1
Weekly downloads
 
Created
Source

React Awesome Stars Rating · GitHub license npm version Build Status codecov

React Awesome Stars Rating is a simple star component with easy integration for your React applications.

Table of Contents

Previews

react-awesome-stars-rating preview

Features

  • Half stars
  • Custom size and color
  • Value shows with high precision
  • Easy integration with Redux
  • Accessibility
  • SVG Icons

Installation

npm install react-awesome-stars-rating

Usage

import React from 'react';
import ReactDOM from 'react-dom';

import ReactStarsRating from 'react-awesome-stars-rating';

const onChange = (value) => {
  console.log(`React Stars Rating value is ${value}`);
};

const ReactStarsExample = ({ value }) => {
  return <ReactStarsRating onChange={onChange} value={value} />;
};

ReactDOM.render(<ReactStarsExample />, document.getElementById('root'));

Documentation

NameDescriptionTypeDefault
idIdentifierString${Date.now()}
valueValueNumber0
onChangeA function, that will be invoked when value have changedFunctionnull
isEditIf true the rating is in editing modeBooleantrue
isHalfIf true half stars are availableBooleantrue
countCount of the starsNumber5
sizeSize of the starsNumber25
starGapGap between the starsNumber0
classNameClass name for button containerString''
primaryColorStar's color when star is activeString'orange'
secondaryColorStar's color when star isn't activeString'grey'
isArrowSubmitLeft arrow or right arrow click onvokes onChangeBooleanfalse

Examples

You can see live examples by below links:

Keywords

FAQs

Package last updated on 14 Mar 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