Component docs
Loading
"use client";
import { Rating } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | number | — | Initial value when uncontrolled. |
disabled | boolean | — | Disables interaction. |
label | string | — | Visible label (also the accessible name). |
max | number | — | — |
onValueChange | (value: number) => void | — | Called with the new value (only when it changes). |
readOnly | boolean | — | Shows the value without allowing edits. |
value | number | — | Current value (controlled); null where it means "nothing selected". |
defaultValuenumber
Initial value when uncontrolled.
disabledboolean
Disables interaction.
labelstring
Visible label (also the accessible name).
maxnumber
onValueChange(value: number) => void
Called with the new value (only when it changes).
readOnlyboolean
Shows the value without allowing edits.
valuenumber
Current value (controlled); null where it means "nothing selected".
Other props are passed to the root element (HTMLAttributes<HTMLSpanElement>), including className, style, id and aria-* attributes.
<Rating defaultValue={3} />