Pular para o conteúdo

Rating

Este conteúdo não está disponível em sua língua ainda.

The Rating component is used to display and capture user ratings, typically represented with stars, hearts, or other icons.

  • Interactive or read-only: Can show user ratings or allow input.
  • Customizable start value: Supports initial ratings via startIn.
  • Color and size variants: Flexible styling for design integration.
  • Disabled state: Prevents interaction when needed.
  • Inline or stacked display: Can be used in lists, cards, or forms.

start in

colors

sizes

disabled

PropTypeDefaultDescription
startInnumber0Initial rating value. Can be fractional (e.g., 2.5).
colorstringColor of the filled icons (e.g., blue, red, green).
disabledbooleanfalsePrevents interaction if true.
stylestringInline styles for font size or layout adjustments.
classstringOptional CSS classes for additional styling.
  • Use fractional values for more precise initial ratings.
  • Ensure color contrast is accessible for users with visual impairments.
  • Disable interaction for display-only ratings to avoid confusion.
  • Adjust icon size consistently across the UI for visual harmony.
  • Combine with text labels or tooltips for clarity in rating systems.