IRatingFieldProps
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.
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 for the underlying radio inputs — important for form submission and label association.
- labelstring
- itemAriaLabelstring
- Aria-label template applied to each star item. Supports interpolation tokens for value and length.
- clearableboolean
- Clicking the currently selected item clears the rating back to 0 / undefined.
- disabledboolean
- Disables all interactions and applies the disabled visual state.
- emptyIconTIcon
- Icon rendered for unselected positions. Defaults to the DS star-outline token.
- fullIconTIcon
- Icon rendered for selected positions. Defaults to the DS star token.
- halfIncrementsboolean
- Allows 0.5 step selection — each star cell gets two invisible half-width inputs.
- hoverboolean
- Shows a hover preview: hovering over an item temporarily lights all items up to that position.
- lengthnumber | string
- Total number of star items to render. Accepts a number or a string coerced to number. Default 5.
- readonlyboolean
- Makes the field non-interactive while keeping normal visual appearance.
- modelValuenumber | string
- The current rating value bound with v-model.
- itemLabelsArray<string>
- Array of per-item labels shown above or below each star. Length should match the `length` prop.
- itemLabelPositionTBlock
- 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