Rating

Interactive star rating with hover preview. Works controlled or uncontrolled, and can be read-only.

Import

import { Rating } from "@igorao79/uivix";

Examples

Controlled

Value managed by state

3 / 5

Read only

Display a score

Custom max

10 stars

Props

PropTypeDefaultDescription
valuenumber-Controlled value
defaultValuenumber0Initial value when uncontrolled
maxnumber5Number of stars
onChange(value: number) => void-Called when a star is selected
readOnlybooleanfalseDisable interaction
sizenumber24Star size in px
classNamestring-Additional CSS classes