Components/Rating

Rating

Interactive star rating component with hover preview, click-to-deselect, three sizes, and custom color. Readonly mode for displaying scores.

import { Rating } from "@animui/ui"

Interactive

0.0 / 5
Click to rate

Read-only (display)

5.0
4.0
3.0
2.0
1.0

Sizes

sm
md
lg

In a form

Overall experience

0.0 / 5

Documentation quality

0.0 / 5

Props

PropTypeDefaultDescription
valuenumberControlled rating (float ok for readonly display).
defaultValuenumber0Uncontrolled initial rating.
maxnumber5Number of stars.
onChange(value: number) => voidCalled when user selects a star.
readOnlybooleanfalseDisable interaction.
size"sm" | "md" | "lg""md"Star size.
colorstring"#f59e0b"CSS color for filled stars.
showValuebooleanfalseShow numeric value next to stars.
labelstringLabel shown before the stars.
© 2026 Steal Shadow. MIT License.Report an issue