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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
Inheritance
Extends
Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- 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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Basic star rating with half-increments