Rate
freeRate captures a star or symbol score for reviews, feedback, and quality ratings.
How was your experience?
Your rating helps us improve future orders.
3 out of 5
Installation
Add this component with the NateUI CLI.
Examples
Basic
Half Ratings
3.5 stars
Count
Custom Character
States
Read only
4.0 average
Disabled
Controlled
Current rating: 2
API
Rate renders a single div with role="slider" and full keyboard support: arrow keys adjust the value by one step, and Home / End jump to the minimum and maximum.
| Prop | Description | Type | Default |
|---|---|---|---|
value | Current rating for controlled usage. | number | - |
defaultValue | Initial rating for uncontrolled usage. | number | 0 |
count | Number of rating items rendered. | number | 5 |
allowHalf | Enables half-step precision by splitting each item into two halves. | boolean | false |
allowClear | Clicking the current value again resets the rating to 0. | boolean | true |
disabled | Dims the control and blocks all interaction. | boolean | false |
readOnly | Displays the value at full opacity but blocks interaction. | boolean | false |
name | Renders a hidden input so the value submits with a native form. | string | - |
character | Custom rating symbol, either a node or a render function per item. | RateCharacter | StarIcon |
tooltips | Native title text per item, indexed from the first item. | string[] | - |
label | Trailing content rendered after the last item, such as a live readout. | ReactNode | - |
size | Control size. | ControlSize | 'md' |
classNames | Class name overrides for the item, icon, and label slots. | RateClassNames | - |
onChange | Called with the next value when the rating is committed. | (value: number) => void | - |
onHoverChange | Called with the previewed value as the pointer moves across items. | (value: number) => void | - |
className | Class names applied to the root element. | string | - |
ref | Ref forwarded to the root div. | Ref<HTMLDivElement> | - |
...nativeDivProps | Native props for the root div. | NativeRateDivProps | - |