レーティングRatingExperimental

Read-only star rating display with half-star support, optional numeric value and review count, for product, review, and feedback summaries.

プレビュー

Props

表は横にスクロールできます
プロパティ初期値説明
valuenumber-Current rating (e.g. 4.5). Rounded to the nearest half-star.
maxnumber5Maximum number of stars.
size"sm" | "default" | "lg""default"Star size.
reviewCountnumber-Optional review count rendered after the stars.
showValueboolean-Render the numeric value before the stars.
labelstring-Override the accessible label (default "{value} out of {max} stars").
classNamestring-Additional CSS class names.

Usage

import { Rating } from "@gunjo/ui"

export function Example() {
  return <Rating value={4.5} reviewCount={128} showValue />
}