Skip to main content
Version: 4.0.0-rc.3

AirbnbRating

Ratings are used to collect measurable feedback from users. Use Rating over an Input where imagery can increase user interaction. This component is imported from react-native-ratings. There are two types of rating - TapRating and SwipeRating. This documentation is for Tap Rating version.

Import

import { AirbnbRating } from "@rneui/themed";

Usage

Props

NameTypeDefaultDescription
countnumberTotal number of ratings to displayDefault is 5
defaultRatingnumberInitial value for the ratingDefault is 3
isDisabledbooleanWhether the rating can be modiefied by the userDefault is false
onFinishRating(number: any) => voidCallback method when the user finishes rating. Gives you the final rating value as a whole number
ratingContainerStyleView StyleStyle for rating containerDefault is none
reviewColorstringColor value for review.Default is #f1c40f
reviewSizenumberSize value for review.Default is 40
reviewsstring[]Labels to show when each value is tappede.g. If the first star is tapped, then value in index 0 will be used as the labelDefault is ['Terrible', 'Bad', 'Okay', 'Good', 'Great']
selectedColorstringColor value for filled stars.Default is #004666
showRatingbooleanDetermines if to show the reviews above the ratingDefault is true
sizenumberSize of rating imageDefault is 40
starContainerStyleView StyleStyle for star containerDefault is none
starImagestringPass in a custom base image source

Playground

Loading...