IRatingFieldItemProps

interface
Form & Input

Props for a single star/icon cell inside <OrigamRatingField>. Declares the item-level state (value, filled, hovered, checked) alongside the full visual surface (color, size, density, rounded, border, elevation, padding, margin).

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

name
string
HTML name attribute forwarded to the underlying radio input — groups items in the same rating field.
index
number
Zero-based position of this item in the rating row — used by the parent for keyboard navigation.
value
requis
number
Numeric rating value this item represents (1-based by convention). Required.
label
string
Accessible label for this star position — rendered as aria-label or a visually-hidden string.
itemAriaLabel
string
showStar
boolean
Whether to render the icon. When false the item occupies space but shows no icon (used for spacer items in half-increment mode).
isFilled
boolean
True when the item value is at or below the current model value — paints the filled icon variant.
isHovered
boolean
True when the pointer is hovering over this specific item, enabling per-item hover styling.
isHovering
boolean
True when any item in the row is being hovered — used to dim non-hovered items.
disabled
boolean
Prevents interaction and applies the disabled visual state.
readonly
boolean
Makes the item non-interactive but keeps its normal visual appearance (no disabled dimming).
fullIcon
TIcon
Icon displayed when the item is filled. Defaults to the parent RatingField fullIcon.
emptyIcon
TIcon
Icon displayed when the item is empty. Defaults to the parent RatingField emptyIcon.
halfIncrements
boolean
Enables half-step selection — two invisible inputs occupy each star cell.
checked
boolean
Whether the underlying radio input is in the checked state.
length
number | string
Total number of items in the row — forwarded for accessibility labels.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Rendering a single rating item

html