Skip to main content
Version: Next

Rating API

import { Rating } from '@editora/ui-react';

Props​

PropTypeDescription
animation"scale" | "pulse" | "none"
ariaDescribedBystring
ariaLabelstring
ariaLabelledBystring
disabledboolean
labelstring
maxnumber
onChange(event: RatingChangeEvent) => void
precision1 | 0.5
radiusstring
readonlyboolean
shape"rounded" | "square" | "pill"
showValueboolean
size"sm" | "md" | "lg"
state"idle" | "hover" | "focus" | "disabled"
theme"light" | "dark" | "brand"
tone"neutral" | "info" | "success" | "warning" | "danger"
valuenumber
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