Rxova
Skip to content

UseRatingOptions

optional allowClear?: boolean;

Re-selecting the current value clears to 0.

true when interactive

optional defaultValue?: number;

Uncontrolled initial score. Ignored when value is provided.


optional disabled?: boolean;

optional id?: string;

Base id; option inputs derive ${id}-1, ${id}-2, …


optional max?: number;

Number of icons rendered. Positive integer.

5

optional name?: string;

Radio group name; also emits a value readable by a native <form>.


optional onBlur?: (event) => void;

Fires when focus leaves the whole group, not when moving between icons.

ParameterType
eventFocusEvent<HTMLElement>

void


optional onChange?: (value) => void;

Providing this makes the component interactive.

ParameterType
valuenumber

void


optional onHoverChange?: (value) => void;

Hover/keyboard preview; null when the preview ends.

ParameterType
valuenumber | null

void


optional onWarn?: (warning) => void;

Callback invoked when a warning is emitted.

ParameterType
warningRatingWarning

void


optional precision?: number;

Quantization grid: 1 = whole icons, 0.5 = halves, 0 = continuous.

0

optional readOnly?: boolean;

Force read-only even when onChange is present.

!onChange


optional rounding?: RatingRounding;

Direction of the snap onto the grid.

'nearest'

optional value?: number;

Controlled score. Clamped to [0, max]; NaN/Infinity become 0.