Skip to main content
Version: Next

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#

Reference#

AirbnbRating#

count#

Total number of ratings to display

Default is 5

TypeDefault
numberNone

defaultRating#

Initial value for the rating

Default is 3

TypeDefault
numberNone

isDisabled#

Whether the rating can be modiefied by the user

Default is false

TypeDefault
booleanNone

onFinishRating#

Callback method when the user finishes rating. Gives you the final rating value as a whole number

TypeDefault
(number: any) => voidNone

reviewColor#

Color value for review.

Default is #f1c40f

TypeDefault
stringNone

reviewSize#

Size value for review.

Default is 40

TypeDefault
numberNone

reviews#

Labels 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']

TypeDefault
string[]None

selectedColor#

Color value for filled stars.

Default is #004666

TypeDefault
stringNone

showRating#

Determines if to show the reviews above the rating

Default is true

TypeDefault
booleanNone

size#

Size of rating image

Default is 40

TypeDefault
numberNone

starContainerStyle#

Style for star container

Default is none

TypeDefault
View style(Object)None

starImage#

Pass in a custom base image source

TypeDefault
stringNone