Skip to main content
Version: 5.1.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 @rn-vui/ratings. There are two types of rating - TapRating and SwipeRating. This documentation is for Tap Rating version.

Import

import { AirbnbRating } from '@rn-vui/themed';

Theme Key

AirbnbRating

Usage

Props

NameTypeDefaultDescription
countnumber5Total number of ratings to display.
defaultRatingnumber3Initial value for the rating
isDisabledbooleanfalseWhether the rating can be modified by the user
onFinishRating(value: number) => voidCallback method when the user finishes rating. Gives you the final rating value as a whole number
ratingContainerStyleView StyleundefinedStyle for rating container
reviewColorstring#f1c40fColor value for review.
reviewSizenumber40Size value for review.
reviewsstring[]['Terrible', 'Bad', 'Okay', 'Good', 'Great']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.
selectedColorstring#004666Color value for filled stars.
showRatingbooleantrueDetermines if to show the reviews above the rating.
sizenumber40Size of rating image
starContainerStyleView StyleundefinedStyle for star container
starImagestringPass in a custom base image source
starStyleImageStyleStyle for star
unSelectedColorstring#BDC3C7Color value for not filled stars.

Playground

Loading...