Components/Form
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/starsratingbar
A star rating bar allows the user to rate the quality of an item or an experience, such as a purchased product, completed service or received meal from a restaurant.
<FacesRatingBar/> insteadSpecify the mode of component:
readOnly - used to display overall rating.Control the size of a component:
largemediumsmalltinyInteractive mode, which requires input from the user, supports large and medium sizes only.
Give more context to the rating scale by providing value labels.
Captions will be shown only if all 5 labels are defined.
Add text that explains the status or what action the user should take with the statusMessage prop.
Show the status message inline, directly below the rating bar by wrapping it in a <FormField/> and adding statusMessage.
View more inline status message examples in <FormField/>.
Use an interactive rating bar to collect feedback from your users.
Use readOnly mode to display individual or general ratings of an item or service.
| Name | Type | Default | Description |
|---|---|---|---|
dataHook | string | — | Applies a data-hook HTML attribute that can be used in tests. |
descriptionValues | string[] | — | Specifies the rate caption value labels. Array must contain all 5 strings to display the rating labels. |
labelValues | string[] | — | Specifies the rate input value labels. |
name | string | — | Specifies radio group name. |
onChange | (rating: number) => void | — | Defines a handler that is called whenever rating changes. ##### Signature: function(rating: number) => void * * rating: 1 | 2 | 3 | 4 | 5 |
readOnly | boolean | — | Specifies whether the rating bar is in read-only mode. |
ref | null | string | (instance: HTMLInputElement | null) => void | RefObject<HTMLInputElement> | — | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). |
size | "small" | "tiny" | "medium" | "large" | — | Controls the size of the star rating bar. Interactive mode can be large or medium. The default value for the read only mode is medium. |
value (required) | number | — | Specifies the selected rate, from 0 to 5. 0 indicates an undefined rating. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
selectRating | Selects a star rating bar value |
getSelectedRating | Gets the selected rating (a number between 0 to 5) |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
--wds-stars-rating-bar-unfilled-star-color token instead of the shared --wds-color-black-500 primitive directly. In odeditor-dark (Studio 2.0) it resolves to black.400 instead of black.500, fixing insufficient contrast against dark surfaces — most visible for read-only ratings. Every other theme aliases to the unchanged black.500, so nothing else visually changes, including odeditor (Harmony). Other components consuming --wds-color-black-500 directly are unaffected. (#17016) — has visual changesLast updated: 30 October 2026