X Enterprises
Shared

StarRating

Star rating display with optional numeric rating and review count.

Shared

These components are used across the full layer. XRdStarRating is a utility display component usable anywhere a rating needs to be shown.

Components

<XRdStarRating />

Renders a row of 5 star icons (filled, half, or empty) with an optional numeric rating label and review count. Uses i-lucide-star and i-lucide-star-half-2 icons.

<XRdStarRating
  :rating="4.7"
  :count="128"
  :show-rating="true"
  :show-count="true"
/>

Props

PropTypeDefaultDescription
ratingnumber0Numeric rating value (0–5, supports decimals for half stars)
countnumber0Total review count displayed in parentheses
showRatingbooleantrueWhether to show the numeric rating value next to the stars
showCountbooleanfalseWhether to show the review count next to the stars

AI Context

category: Shared
package: "@xenterprises/nuxt-x-restaurants"
components:
  - XRdStarRating
use-when: >
  Rendering a star rating row with optional numeric value and review count
  anywhere across the restaurant directory — listing cards, profile heroes,
  review items. Handles half-star logic automatically.
Copyright © 2026