Rating API
import { Rating } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
animation | "scale" | "pulse" | "none" | |
ariaDescribedBy | string | |
ariaLabel | string | |
ariaLabelledBy | string | |
disabled | boolean | |
label | string | |
max | number | |
onChange | (event: RatingChangeEvent) => void | |
precision | 1 | 0.5 | |
radius | string | |
readonly | boolean | |
shape | "rounded" | "square" | "pill" | |
showValue | boolean | |
size | "sm" | "md" | "lg" | |
state | "idle" | "hover" | "focus" | "disabled" | |
theme | "light" | "dark" | "brand" | |
tone | "neutral" | "info" | "success" | "warning" | "danger" | |
value | number | |
variant | "default" | "soft" | "glass" | "contrast" | "minimal" |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-rating>
Rating renders the ui-rating custom element from @editora/ui-core, which can also be used without React.
Attributes: animation, aria-describedby, aria-label, aria-labelledby, disabled, headless, label, max, precision, radius, readonly, shape, show-value, size, state, theme, tone, value, variant
Events: change, input