Skip to main content

Rating

Inputs & Controls

Rating

Star rating input + display component.

Usage

Capture feedback scores or show aggregated ratings.

Highlights

  • Fractional display and animation
  • Custom icon + color tokens

When to use it

  • Users review content with 1-5 style ratings.
  • Inline analytics require quick scanning.

Examples

Default

Preview (Web)
import { Rating } from 'react-native-molecules/components/Rating';

export default function Example() {
  return <Rating count={5} />;
}
PropTypeDefaultDescription
countnumber | undefinedrating count
valuenumber | undefinedThe rating value.
defaultValuenumber | undefinedThe default value for the uncontrolled state
onChange((value: number) => void) | undefinedCallback function that is fired when the hover state changes.
readonlyboolean | undefinedRemoves all hover effects and pointer events.
disabledboolean | undefinedIf `true`, the component is disabled
iconNamestring | undefinedname of the empty icon
iconType"material-community" | "feather" | undefinedthe type of the empty icon
activeIconNamestring | undefinedname of the active icon
activeIconType"material-community" | "feather" | undefinedtype of the active icon
sizenumber | undefinedsize of all the icons
colorstring | undefinedcolor of the empty icon
activeColorstring | undefinedcolor of the active icon
iconContainerStyleViewStyle | undefinedstyle of the icon container component
iconPropsOmit<IconProps, "ref" | "color" | "name" | "type"> | undefinedprops for to pass down to all the icons
showTooltipsboolean | undefineddisplay tooltips
tooltipPropsTooltipProps | undefinedfor configuring tooltip won't be used if showTooltips is false
Defined in react-native-molecules/components/Rating