Class IgcRatingComponent

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

element

igc-rating

fires

igcChange - Emitted when the value of the control changes.

fires

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

csspart

base - The main wrapper which holds all of the rating elements.

csspart

label - The label part.

csspart

value-label - The value label part.

csspart

symbols - A wrapper for all rating symbols.

csspart

symbol - The part of the encapsulated default symbol.

csspart

full - The part of the encapsulated full symbols.

csspart

empty - The part of the encapsulated empty symbols.

cssproperty

--symbol-size - The size of the symbols.

cssproperty

--symbol-full-color - The color of the filled symbol.

cssproperty

--symbol-empty-color - The color of the empty symbol.

cssproperty

--symbol-full-filter - The filter(s) used for the filled symbol.

cssproperty

--symbol-empty-filter - The filter(s) used for the empty symbol.

Hierarchy

  • SizableInterface<this> & EventEmitterInterface<IgcRatingEventMap, this> & LitElement<this>
    • IgcRatingComponent

Index

Constructors

Properties

disabled: boolean = false

Sets the disabled state of the component

hoverPreview: boolean = false

Sets hover preview behavior for the component

label: string

The label of the control.

max: number = 5

The maximum value for the rating

name: string

The name attribute of the control

readonly: boolean = false

Sets the readonly state of the component

single: boolean = false

Toggles single selection visual mode.

size: "small" | "medium" | "large"

Determines the size of the component.

step: number = 1

The minimum value change allowed.

value: number = 0

The current value of the component

valueFormat: string

A format string which sets aria-valuetext. All instances of '{0}' will be replaced with the current value of the control. Important for screen-readers and useful for localization.

styles: CSSResult[] = ...
tagName: "igc-rating" = 'igc-rating'

Methods

  • emitEvent<K, D>(type: K, eventInitDict?: CustomEventInit<D>): boolean
  • Type Parameters

    • K extends keyof IgcRatingEventMap

    • D extends number

    Parameters

    • type: K
    • Optional eventInitDict: CustomEventInit<D>

    Returns boolean

  • stepDown(n?: number): void
  • stepUp(n?: number): void