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

material-star-rating

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-star-rating

A star-rating component for React with Material-UI

  • 1.0.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

Material Star Rating

Installation

  • Run npm install material-star-rating in your project.
  • Import in your project using import Rating from 'material-star-rating';

Usage

<Rating {...props} />

Props

  • isBig (optional | boolean | default:false) - changes the size of the stars
  • interactive (optional | boolean | default:false) - makes the stars interactive
  • handleRate (optional, required if interactive | function | default:null) - handles the rating if the stars are interactive
  • value (optional | number | default:0) - the number of filled stars (can have decimal numbers)

Sample Usage

import React from 'react';
import Rating from 'material-star-rating;


const Component = () => {
	const [rating, setRating] = React.useState(1);
	const handleRate = (val) => setRating(val);
	
	return <Rating interactive handleRate={handleRate} value={rating} isBig />
}


export default Component;

Demo

Live demo

Keywords

FAQs

Package last updated on 16 Nov 2020

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