SakaniUI

Star Rating

An e-commerce product rating display, shared by ProductCard and ProductDetailBlock.

4.5(128 reviews)

Orientation

4.5(128 reviews)
4.5(128 reviews)

Props

PropTypeDefaultDescription
ratingnumber0–5. Drives the filled/half/empty star count.
reviewCountnumberShown next to the stars when showLabel is true.
showLabelbooleantrueShows the numeric rating + review count text.
orientation'horizontal' | 'horizontal-reverse' | 'vertical''horizontal'Only meaningful while showLabel is true.
formatReviewCount(count: number) => stringCustom formatter for the review count text.

Why it works this way

Why

  • The numeric label is independent of the stars, so a compact row can show stars alone while the stars still convey the rating.

Don't

  • Don't show stars without an accessible text value when the rating matters.