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.

typescript

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.

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.

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

html