IRatingFieldProps

interface
Form & Input

Props for <OrigamRatingField>. Extends the input contract (IInputProps), ripple effect (IRippleProps), tag polymorphism (ITagProps), and label (ILabelProps) with rating-specific props such as icon customisation, half-increments, hover preview, and per-item aria labels.

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 for the underlying radio inputs — important for form submission and label association.
label
string
itemAriaLabel
string
Aria-label template applied to each star item. Supports interpolation tokens for value and length.
clearable
boolean
Clicking the currently selected item clears the rating back to 0 / undefined.
disabled
boolean
Disables all interactions and applies the disabled visual state.
emptyIcon
TIcon
Icon rendered for unselected positions. Defaults to the DS star-outline token.
fullIcon
TIcon
Icon rendered for selected positions. Defaults to the DS star token.
halfIncrements
boolean
Allows 0.5 step selection — each star cell gets two invisible half-width inputs.
hover
boolean
Shows a hover preview: hovering over an item temporarily lights all items up to that position.
length
number | string
Total number of star items to render. Accepts a number or a string coerced to number. Default 5.
readonly
boolean
Makes the field non-interactive while keeping normal visual appearance.
modelValue
number | string
The current rating value bound with v-model.
itemLabels
Array<string>
Array of per-item labels shown above or below each star. Length should match the `length` prop.
itemLabelPosition
TBlock
Vertical placement of the per-item labels relative to the star row.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

Basic star rating with half-increments

html