allowZeroStars boolean
Allow the rating value to be set to 0 instead of a minimum of 1.
ariaLabelFormat string
Optional label format for a rating star that will be read by screen readers. Can be used like "{0} of {1} stars selected", where {0} will be substituted by the current rating and {1} will be substituted by the max rating.
ariaLabelId string
Deprecated: Optional id of label describing this instance of Rating.
componentRef IRefObject<IRating>
Optional callback to access the IRating interface. Use this instead of ref for accessing the public methods and properties of the component.
getAriaLabel (rating: number, max: number) => string
icon string
Custom icon
max number
Maximum rating, defaults to 5, has to be \>= min
min number
Minimum rating, defaults to 1, has to be \>= 0
onChange (event: React.FocusEvent<HTMLElement>, rating?: number) => void
Callback issued when the rating changes.
onChanged (rating: number) => void
rating number
Selected rating, has to be an integer between min and max
readOnly boolean
Optional flag to mark rating control as readOnly
size RatingSize
Size of rating, defaults to small
styles IStyleFunctionOrObject<IRatingStyleProps, IRatingStyles>
Call to provide customized styling that will layer on top of the variant rules.
theme ITheme
Theme (provided through customization.)
unselectedIcon string
Custom icon for unselected rating elements.