# react-native-easy-rating

> Easy rating view for react-native

Latest version **0.2.1** (published 2021-05-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-easy-rating
pnpm add react-native-easy-rating
yarn add react-native-easy-rating
bun add react-native-easy-rating
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2021-05-07 |
| First published | 2016-06-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 43.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Jacob Ho |
| Maintainers | clh161 |
| Keywords | react, native, react native, star, stars, rating, ratings, review, reviews, react-component, react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-easy-rating
- Repository: https://github.com/clh161/react-native-easy-rating
- Issues: https://github.com/clh161/react-native-easy-rating/issues
- npm.io page: https://npm.io/package/react-native-easy-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

- 0.2.1 (latest) — 2021-05-07
- 0.2.0 — 2021-05-07
- 0.1.3 — 2016-06-23
- 0.1.2 — 2016-06-20
- 0.1.1 — 2016-06-19
- 0.1.0 — 2016-06-18

## README

# react-native-easy-rating
[![npm package](https://img.shields.io/npm/v/react-native-easy-rating.svg?style=flat-square)](https://www.npmjs.org/package/react-native-easy-rating)
[![npm](https://img.shields.io/npm/dm/react-native-easy-rating.svg)](https://www.npmjs.com/package/react-native-easy-rating)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square)](https://gitter.im/react-native-easy-rating/Lobby#)

> A React Native component for rating view. Compatible with both iOS and Android.
<p align="center">
  <img src="./assets/demo_image_1.png"/>
</p>

#### Tested with react-native 0.64.1

## Installation

```sh
yarn add react-native-easy-rating
```


## Usage

### Props

| Prop | Type | Description | Required | Default |
|---|---|---|---|---|
|**`rating`**|`number`|Set initial rating|`No`|`0`|
|**`max`**|`number`|Set maximum of rating|`No`|`5`|
|**`iconWidth`**|`number`|Set width of icon|`No`|`36`|
|**`iconHeight`**|`number`|Set height of icon|`No`|`36`|
|**`iconSelected`**|`image`|Set image of selected icon|`No`|<img src="./images/icon_star_selected.png"/>|
|**`iconUnselected`**|`image`|Set image of unselected icon|`No`|<img src="./images/icon_star_unselected.png"/>|
|**`onRate`**|`function(rating)`|Trigger when rating changes|`No`||
|**`editable`**|`boolean`|Ability to change rating by tap|`No`|`Yes`|

### Example

```js
import  Rating from 'react-native-easy-rating';
...
export default function App() {
  const [rating,setRating] = useState();

  return (
    <Rating
      rating={rating}
      max={5}
      iconWidth={24}
      iconHeight={24}
      onRate={setRating}/>
  );
}
```

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