StarRating

React SDK guidance for StarRating.

Exact exports, props, slots, hooks, and runtime behavior belong to SDK package reference. Examples are guidance unless explicitly marked copy-paste-safe.

Review component intent and composition guidance before wiring this component into an app. Then use the live playground to confirm the rendered behavior.

Playground

When to use it

Use StarRating when the rating itself needs to be visible at a glance, either as a trust signal or as an input control.

Composition notes

Use display mode for summaries and interactive mode only when the page genuinely needs a rating input. Add reviewCount and showValue when the surrounding surface benefits from more explicit context.

Behavior and theming guidance

Choose size based on context. Small ratings fit cards and list rows. Larger ratings work better inside forms and review-detail surfaces.

Contract scope

  • Use SDK package reference for exact props, exports, slots, hooks, and runtime behavior.
  • Public import: @enadhq/enad-react-sdk/client/storefront.
  • Playground route: /sandbox?component=StarRating.
  • Copy/paste scope: guidance-only. Treat examples as guidance until checked against SDK package reference.

Implementation notes

StarRating

# StarRating > Exact exports, props, slots, hooks, and runtime behavior belong to SDK package reference. Examples are guidance unless explicitly marked copy-paste-safe. Review component intent and composition guidance before wiring this component into an app. Then use the live playground to confirm the rendered behavior. ## Playground - Import path: `@enadhq/enad-react-sdk/client/storefront`. - Live playground: [/components/commerce/star-rating](https://sdk.enad.io/components/commerce/star-rating). ## When to use it Use `StarRating` when the rating itself needs to be visible at a glance, either as a trust signal or as an input control. ## Composition notes Use display mode for summaries and `interactive` mode only when the page genuinely needs a rating input. Add `reviewCount` and `showValue` when the surrounding surface benefits from more explicit context. ## Behavior and theming guidance Choose size based on context. Small ratings fit cards and list rows. Larger ratings work better inside forms and review-detail surfaces. ## Contract scope - Use SDK package reference for exact props, exports, slots, hooks, and runtime behavior. - Public import: `@enadhq/enad-react-sdk/client/storefront`. - Playground route: /sandbox?component=StarRating. - Copy/paste scope: guidance-only. Treat examples as guidance until checked against SDK package reference. ### Implementation notes