1.0.13 • Published 3 years ago

material-star-rating v1.0.13

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

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

1.0.13

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago