# material-star-rating

> A star-rating component for React with Material-UI

Latest version **1.0.13** (published 2020-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install material-star-rating
pnpm add material-star-rating
yarn add material-star-rating
bun add material-star-rating
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2020-11-16 |
| First published | 2020-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 100.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Cyril Cabo |
| Maintainers | cyrilcabo |
| Keywords | star, material-ui, react, rating, interactive, review |

## Links

- npm: https://www.npmjs.com/package/material-star-rating
- Repository: https://github.com/cyrilcabo/material-star-rating
- Issues: https://github.com/cyrilcabo/material-star-rating/issues
- npm.io page: https://npm.io/package/material-star-rating

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.13 (latest) — 2020-11-16
- 1.0.12 — 2020-11-16
- 1.0.11 — 2020-11-16
- 1.0.10 — 2020-11-16
- 1.0.9 — 2020-11-16
- 1.0.8 — 2020-11-16
- 1.0.7 — 2020-11-16
- 1.0.6 — 2020-11-14
- 1.0.5 — 2020-11-14
- 1.0.4 — 2020-11-14
- 1.0.3 — 2020-11-14
- 1.0.2 — 2020-11-14
- 1.0.1 — 2020-11-14
- 1.0.0 — 2020-11-14

## README

# 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
```JSX
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](https://drive.google.com/uc?export=view&id=1Q9xJ7_-KJ-vRhnVByTrfTH8tF-hyr-tk)

---
_Source: https://npm.io/package/material-star-rating · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
