length number 5 Name length Description The number of rating items to render.
Type number Default 5 disabled boolean false Name disabled Description When true , prevents the user from interacting with radio items.
Type boolean Default false dir Direction — Name dir Description The reading direction of the combobox when applicable.
If omitted, inherits globally from ConfigProvider or assumes LTR (left-to-right) reading mode.
Type ' ltr ' | ' rtl ' Default — orientation DataOrientation 'horizontal' Name orientation Description The orientation of the component.
Type ' vertical ' | ' horizontal ' Default 'horizontal' asChild boolean false Name asChild Description Change the default rendered element for the one passed as a child, merging their props and behavior.
Read our Composition guide for more details.
Type boolean Default false as AsTag | Component — Name as Description The element or component this component should render as. Can be overwritten by asChild .
Type ComponentOptions < any , any , any , ComputedOptions , MethodOptions , any , any , any , string , {}, {}, string , {}, {}, {}, string , ComponentProvideOptions > | ( props : any , ctx : Omit < { attrs : Attrs ; slots : Readonly < InternalSlots > ; emit : ( event : string , ... args : any [] ) => void ; expose : < Exposed extends Record < string , any > = Record < string , any >> ( exposed ?: Exposed | undefined ) => void ; }, ' expose ' > ) : any | ComponentPublicInstanceConstructor < any , any , any , any , ComputedOptions , MethodOptions > | ' a ' | ' button ' | ' div ' | ' form ' | ' h2 ' | ' h3 ' | ' img ' | ' input ' | ' label ' | ' li ' | ' nav ' | ' ol ' | ' p ' | ' span ' | ' svg ' | ' ul ' | ' template ' | {} & string Default — modelValue number — Name modelValue Description The controlled rating value. Can be bound with v - model .
Type number Default — defaultValue number — Name defaultValue Description The rating value when initially rendered. Use when you do not need to control the state of the rating.
Type number Default — name string — Name name Description The name of the field. Submitted with its owning form as part of a name/value pair.
Type string Default — required boolean false Name required Description When true , indicates that the user must set the value before the owning form can be submitted.
Type boolean Default false loop boolean false Name loop Description When true , keyboard navigation will loop from last item to first, and vice versa.
Type boolean Default false clearable boolean false Name clearable Description When true , clicking the currently selected rating resets the value to 0 .
Type boolean Default false hoverable boolean true Name hoverable Description When true , the rating previews the value under the pointer on hover.
Type boolean Default true class ClassValue — Name class Description Classes added to the part's own element, after its recipe classes.
Type null | string | false | Record < string , any > | ClassValue[] Default — size RatingSize 'md' Name size Description Type ' md ' | ' sm ' | ' lg ' Default 'md' shape RatingShape 'star' Name shape Description Draws the marks as dots or stars.
Type ' star ' | ' dot ' Default 'star' label ( ( value : number , length : number ) => string ) ` ${ value } out of ${ length } ` Name label Description Builds each mark's screen-reader name from its value and the number of marks, e.g. 4 out of 5 .
Type ( value : number , length : number ) : string Default ` ${ value } out of ${ length } `