🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-easy-rating

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-easy-rating

Easy rating view for react-native

0.2.1
latest
Source
npm
Version published
Weekly downloads
41
-42.25%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-easy-rating

npm package npm Gitter

A React Native component for rating view. Compatible with both iOS and Android.

Tested with react-native 0.64.1

Installation

yarn add react-native-easy-rating

Usage

Props

PropTypeDescriptionRequiredDefault
ratingnumberSet initial ratingNo0
maxnumberSet maximum of ratingNo5
iconWidthnumberSet width of iconNo36
iconHeightnumberSet height of iconNo36
iconSelectedimageSet image of selected iconNo
iconUnselectedimageSet image of unselected iconNo
onRatefunction(rating)Trigger when rating changesNo
editablebooleanAbility to change rating by tapNoYes

Example

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}/>
  );
}

Keywords

react

FAQs

Package last updated on 07 May 2021

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