# react-native-rating-star

> A React Native component for generating and displaying interactive star ratings

Latest version **0.2.1** (published 2016-03-31) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2016-03-31 |
| First published | 2016-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | liuchungui |
| Maintainers | liuchungui |
| Keywords | react-native, rating, star, star-rating, react-native-rating-star, react-native-star-rating |

## Links

- npm: https://www.npmjs.com/package/react-native-rating-star
- Repository: https://github.com/liuchungui/react-native-star-rating
- Homepage: https://github.com/liuchungui/react-native-star-rating#readme
- Issues: https://github.com/liuchungui/react-native-star-rating/issues
- npm.io page: https://npm.io/package/react-native-rating-star

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2016-03-31
- 0.2.0 — 2016-03-31
- 0.1.0 — 2016-03-30

## README

# React Native Star Rating Component
A React Native component for generating and displaying interactive star ratings. Compatible with both iOS and Android.

#Installation
```
npm install react-native-rating-star --save
```


#Usage

```js
import StarRating from 'react-native-rating-star';
class StarRaingDemo extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
        StarRating not set starSize and interitemSpacing.
        </Text>
        <StarRating
          maxStars={5}
          rating={1}
          selectStar={require('./select_star.png')}
          unSelectStar={require('./unselect_star.png')}
          valueChanged={this._valueChanged}
        />
        <Text style={styles.welcome}>
        StarRating set starSize.
        </Text>
        <StarRating
          maxStars={5}
          rating={2}
          selectStar={require('./select_star.png')}
          unSelectStar={require('./unselect_star.png')}
          valueChanged={this._valueChanged}
          starSize={25}
        />
        <Text style={styles.welcome}>
        StarRating set starSize and interitemSpacing
        </Text>
        <StarRating
          maxStars={5}
          rating={3}
          selectStar={require('./select_star.png')}
          unSelectStar={require('./unselect_star.png')}
          valueChanged={this._valueChanged}
          starSize={50}
          interitemSpacing={20}
        />
      </View>
    );
  }

  _valueChanged(rating) {
    console.log(rating);
  }
}
```

<img src="http://ww4.sinaimg.cn/mw690/7746cd07jw1f2fdg8ltxig208o0fodh4.gif"/>

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