IRatingFieldItemProps
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.
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.
- namestring
- HTML name attribute forwarded to the underlying radio input — groups items in the same rating field.
- indexnumber
- Zero-based position of this item in the rating row — used by the parent for keyboard navigation.
- valuerequisnumber
- Numeric rating value this item represents (1-based by convention). Required.
- labelstring
- Accessible label for this star position — rendered as aria-label or a visually-hidden string.
- itemAriaLabelstring
- showStarboolean
- Whether to render the icon. When false the item occupies space but shows no icon (used for spacer items in half-increment mode).
- isFilledboolean
- True when the item value is at or below the current model value — paints the filled icon variant.
- isHoveredboolean
- True when the pointer is hovering over this specific item, enabling per-item hover styling.
- isHoveringboolean
- True when any item in the row is being hovered — used to dim non-hovered items.
- disabledboolean
- Prevents interaction and applies the disabled visual state.
- readonlyboolean
- Makes the item non-interactive but keeps its normal visual appearance (no disabled dimming).
- fullIconTIcon
- Icon displayed when the item is filled. Defaults to the parent RatingField fullIcon.
- emptyIconTIcon
- Icon displayed when the item is empty. Defaults to the parent RatingField emptyIcon.
- halfIncrementsboolean
- Enables half-step selection — two invisible inputs occupy each star cell.
- checkedboolean
- Whether the underlying radio input is in the checked state.
- lengthnumber | 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