Skip to content

FormRating ​

Stars the visitor can choose, with half steps and the keyboard (slider role).

ts
import { FormRating } from '@zairakai/vue-components/Form'

Usage ​

vue
<FormRating />

Example ​

Score: 3.5

vue
<script setup>
  import { ref } from 'vue'

  const score = ref(3.5)
</script>

<template>
  <FormRating
    v-model="score"
    label="Your score"
    half
  />
  <p>Score: {{ score }}</p>
</template>

Props ​

NameTypeDefaultDescription
idstring
classstring
modelValuenumberundefined
maxnumber5
halfbooleanfalseAllow half stars.
labelstring
namestring
formstring
readonlybooleanfalse
disabledbooleanfalse
valueTextstring'{value} out of {max}'The text read for the score, with {value} and {max}.
clearablebooleantrue

Events ​

NameDescription
update:modelValue

Slots ​

NameDescription
default

See Theming for the class hooks and the data-* state of the components.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.