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.
#
Usage#
Props#
AirbnbRating- count
- defaultRating
- isDisabled
- onFinishRating
- reviewColor
- reviewSize
- reviews
- selectedColor
- showRating
- size
- starContainerStyle
- starImage
#
Reference#
AirbnbRating#
countTotal number of ratings to display
Default is 5
Type | Default |
---|---|
number | None |
#
defaultRatingInitial value for the rating
Default is 3
Type | Default |
---|---|
number | None |
#
isDisabledWhether the rating can be modiefied by the user
Default is false
Type | Default |
---|---|
boolean | None |
#
onFinishRatingCallback method when the user finishes rating. Gives you the final rating value as a whole number
Type | Default |
---|---|
(number: any) => void | None |
#
reviewColorColor value for review.
Default is #f1c40f
Type | Default |
---|---|
string | None |
#
reviewSizeSize value for review.
Default is 40
Type | Default |
---|---|
number | None |
#
reviewsLabels to show when each value is tapped
e.g. If the first star is tapped, then value in index 0 will be used as the label
Default is ['Terrible', 'Bad', 'Okay', 'Good', 'Great']
Type | Default |
---|---|
string[] | None |
#
selectedColorColor value for filled stars.
Default is #004666
Type | Default |
---|---|
string | None |
#
showRatingDetermines if to show the reviews above the rating
Default is true
Type | Default |
---|---|
boolean | None |
#
sizeSize of rating image
Default is 40
Type | Default |
---|---|
number | None |
#
starContainerStyleStyle for star container
Default is none
Type | Default |
---|---|
View style(Object) | None |
#
starImagePass in a custom base image source
Type | Default |
---|---|
string | None |