Skip to main content
Version: 5.0.0

AirbnbRating

Import

import { AirbnbRating } from '@rneui/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 text.
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...