Rating provides insight regarding others' opinions and experiences, and can allow the user to submit a rating of their own

CSS Parts
base — The main wrapper which holds all of the rating elements.
label — The label part.
value-label — The value label part.
symbols — A wrapper for all rating symbols.
symbol — The part of the encapsulated default symbol.
full — The part of the encapsulated full symbols.
empty — The part of the encapsulated empty symbols.

Whether to reset the rating when the user selects the same value.

allowReset: boolean

Sets hover preview behavior for the component

hoverPreview: boolean

The label of the control.

label: string

The maximum value for the rating.

If there are projected symbols, the maximum value will be resolved based on the number of symbols.

max: number

Makes the control a readonly field.

readOnly: boolean

Toggles single selection visual mode.

single: boolean

The minimum value change allowed.

Valid values are in the interval between 0 and 1 inclusive.

step: number

The current value of the component

value: number

A format string which sets aria-valuetext. Instances of '{0}' will be replaced with the current value of the control and instances of '{1}' with the maximum value for the control.

Important for screen-readers and useful for localization.

valueFormat: string

Decrements the value of the control by n steps multiplied by the step factor.

stepDown(n: number): void

Parameters

  • n: number

Returns void

Increments the value of the control by n steps multiplied by the step factor.

stepUp(n: number): void

Parameters

  • n: number

Returns void

Emitted when the value of the control changes.

onChange(args: CustomEvent<number>): void

Parameters

Returns void

Emitted when hover is enabled and the user mouses over a symbol of the rating.

onHover(args: CustomEvent<number>): void

Parameters

Returns void