Rating

The ArcadiaRating component displays a configurable star rating input with hover preview, keyboard navigation, and read-only mode.

Basic Usage

<ArcadiaRating @bind-Value="rating" Max="5" />

<ArcadiaRating Value="4" ReadOnly="true" Color="warning" />

<ArcadiaRating @bind-Value="score" Max="10" Size="lg" />

Parameters

ParameterTypeDefaultDescription
Valueint0Current rating value. Supports two-way binding.
Maxint5Maximum number of stars.
ReadOnlyboolfalseWhether the rating is read-only.
AllowHalfboolfalseWhether half-star ratings are allowed.
Sizestring"md"Size: "sm", "md", "lg".
Colorstring"warning"Color of filled stars.
Classstring?nullAdditional CSS class names.
Stylestring?nullInline CSS styles.

Events

EventTypeDescription
ValueChangedEventCallback<int>Fired when the rating value changes.

Accessibility

  • Uses role="slider" with aria-valuemin="0", aria-valuemax, and aria-valuenow.
  • Provides aria-label="Rating".
  • Keyboard support: Arrow Right/Up to increase, Arrow Left/Down to decrease, Home for 0, End for max.
  • Read-only rating has tabindex="-1".