Default

<Rating value={3} />

Read-only display

<Rating value={1} readOnly />
<Rating value={3} readOnly />
<Rating value={5} readOnly />

Custom count

<Rating count={3} value={2} />
<Rating count={10} value={7} />

Colors and sizes

<Rating value={4} color="yellow" />
<Rating value={4} color="orange" />
<Rating value={3} size="xs" readOnly />
<Rating value={3} size="xl" readOnly />

Disabled

<Rating value={3} disabled />

Props

PropTypeDefaultDescription
countnumber5Total number of rating symbols
valuenumber0Currently selected rating value
namestringautoName shared by all radio inputs; auto-generated if omitted
colorstringAccent color applied to filled symbols
size'xs'|'sm'|'md'|'lg'|'xl'Visual size of the rating symbols
readOnlybooleanfalseDisables inputs while keeping normal appearance
disabledbooleanfalseDisables inputs and dims the widget
fractionsnumberNumber of selectable fractions per symbol
emptySymbolstringstar SVGSVG/HTML string for unfilled symbols
fullSymbolstringstar SVGSVG/HTML string for filled symbols
classstringAdditional CSS class names
styleobjectInline styles