Skip to content

Rate

Rating: 3 / 5
Terminal window
npx skeci-ui add rate
import { Rate } from '@/components/ui/rate';
<Rate
count={5}
defaultValue={3}
onChange={(value) => console.log(value)}
/>

Sizes

Readonly & Disabled

Custom Count (10 stars)

PropTypeDefaultDescription
countnumber5The total number of stars.
valuenumberThe controlled value of the rating.
defaultValuenumber0The initial value when uncontrolled.
onChange(value: number) => voidCallback fired when the value changes.
size'sm' | 'md' | 'lg''md'The size of the stars.
disabledbooleanfalseWhether the component is non-interactive.
readonlybooleanfalseIf true, the rating can be displayed but not changed.