Components/Form
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/facesratingbar
Faces rating bar allows you to rate an experience, such as an interview, a call with customer care or a doctor's appointment.
<StarsRatingBar/> instead.Specify the mode of component:
interactive (default) - use it to collect individual feedback.readOnly - use it to display an overall rating.Control the size of the faces with the size prop:
medium (default) - use in forms and feedback modals.small - use in dense layouts, such as table rows and cards.Disable the rating bar with the disabled prop when the rating can't be changed yet. A disabled rating bar ignores hover, focus and clicks.
Show descriptions for each face in a tooltip.
Descriptions will only be shown if all 5 labels are defined.
maxValue controls how many faces are shown (2 to 5).
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 mode to collect feedback from your users.
Use read only mode to display ratings.
| Name | Type | Default | Description |
|---|---|---|---|
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
descriptionValues | string[] | — | Specifies the rate value descriptions' texts. The array length must match the maxValue prop number (5 by default). |
disabled | boolean | false | Specifies whether the rating bar is disabled. A disabled rating bar doesn't respond to hover, focus or clicks. |
maxValue | 5 | 2 | 3 | 4 | 5 | Specifies the maximum rate value. |
onChange | (rating: number) => void | — | Defines a handler that is called whenever a rating changes. ##### Signature: function(rating: number) => void * rating: 1 | 2 | 3 | 4 | 5 |
readOnly | boolean | false | Specifies whether the rating bar is in read only mode. |
size | "small" | "medium" | 'medium' | Controls the size of the faces. |
value | number | — | Specifies the selected rate, from 0 to maxValue. 0 or no value indicates undefined rating. readOnly mode value can't be 0. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
selectRating | Select the faces rating bar value |
getSelectedRating | Return the selected rating (a number between 0 to 5) |
isDisabled | Returns true when every face of the rating bar is disabled |
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. |
size prop (small for 18px faces, medium by default) and a disabled prop that greys out the faces and ignores hover, focus and clicks, in interactive and read-only mode. (#17588) — has visual changesLast updated: 30 October 2026