Skip to main content
Version: Next 🚧

Migrate from react-native-ratings

- import { AirbnbRating, Rating } from 'react-native-ratings';
+ import { Rating } from '@elik56a/react-native-pickers';

- <AirbnbRating
- count={5}
- defaultRating={3}
- size={24}
- selectedColor="#f1c40f"
- showRating={false}
- onFinishRating={setStars}
- />
+ <Rating defaultValue={3} size={24} color="#f1c40f" onChange={setStars} />
react-native-ratingsReact Native Pickers
count / ratingCountmax (default 5)
defaultRating / startingValuedefaultValue, or value to control it
onFinishRatingonChange, once on a tap or the end of a drag
onStartRating / onSwipeRating—
size / imageSizesize (default 32)
selectedColor / ratingColorcolor
unSelectedColor / ratingBackgroundColoremptyColor
jumpValue={0.5} / fractionsstep={0.5}
minValuetaps pick at least one step; keys can go to 0
isDisabled / readonlyreadOnly to show a score, or disabled to dim it
type="heart" / starImage / ratingImagerenderIcon={({ color, size }) => …}
reviews + showRatingrender your own label from value
starContainerStyle / stylestyles={{ container, item }} / style

There are no images to bundle: stars are text, and renderIcon takes any icon you already use. Rating is adjustable for screen readers and steps with arrow keys on the web.

See all migration guides for other libraries, and Comparison for when another library is the better choice.