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
| Prop | Type | Default | Description |
|---|---|---|---|
rating | number | 0 | Numeric rating value (0–5, supports decimals for half stars) |
count | number | 0 | Total review count displayed in parentheses |
showRating | boolean | true | Whether to show the numeric rating value next to the stars |
showCount | boolean | false | Whether 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.
