RatingGroup

Star rating input with accessible radio group pattern

Category: inputs · WCAG 2.2-AA · form, rating, stars, input, feedback

Sizes

States

Props

PropTypeDefaultDescription
valuenumberThe controlled value.
onValueChange(v: number) => voidCalled with the new value when it changes.
maxnumber5Maximum allowed value.
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
readOnlybooleanfalseWhen true, the value is shown but cannot be edited.
labelsRatingGroupLabelsOverrides for the component’s user-visible strings (i18n).

Design tokens

When to use

When not to use

How to build an accessible RatingGroup in React →

Examples

Basic

<RatingGroup value={3} onValueChange={() => {}} />

Read only

<RatingGroup value={4} readOnly />

Related components

← Back to docs