Card
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | The controlled score value of the rating. |
defaultValue | number | 0 | The initial score value when uncontrolled. |
onValueChange | (value: number) => void | — | Callback fired when the rating value changes. |
max | number | 5 | Maximum number of stars to display. |
open | boolean | — | Controlled uncollapsed state for the review panel. |
defaultOpen | boolean | false | Initial uncollapsed state. |
onOpenChange | (open: boolean) => void | — | Callback fired when the review panel collapses or uncollapses. |
review | string | — | Controlled text value of the review textarea. |
onReviewChange | (review: string) => void | — | Callback fired when review text changes. |
onSubmit | (data: RatingSubmitData) => void | — | Callback fired when the review is submitted. |
disabled | boolean | false | Disables interaction with stars and inputs. |
readOnly | boolean | false | Makes the rating read-only. |
uncollapseOnRate | boolean | true | Automatically uncollapses review textarea upon clicking a star. |
ratingLabels | string[] | ["Poor", "Fair", "Good", "Very Good", "Excellent"] | Descriptive labels for each star value. |
showLabel | boolean | true | Whether to display the text label for the active rating. |
activeColorClassName | string | — | Custom color class for filled stars. |
inactiveColorClassName | string | — | Custom color class for unfilled stars. |
| Prop | Type | Default | Description |
|---|---|---|---|
starClassName | string | — | Custom CSS classes applied to each star button. |
| Prop | Type | Default | Description |
|---|---|---|---|
transition | Transition | { type: "spring", stiffness: 420, damping: 28, mass: 0.8 } | Custom Motion spring transition for uncollapsing. |