Skip to content

FormRating ​

A FormKit wrapper for OpenVue's Rating component.

Live Example on Website

Usage ​

vue
<FormKit type="formRating" v-model="rating" />

Object-based Example ​

vue
<script setup>
const schema = [
  { $formkit: 'formRating', label: 'Select Rating', name: 'rating' },
  {
    $formkit: 'formRating',
    label: 'Select Rating',
    name: 'ratingDisabled',
    value: 3,
    disabled: true
  },
  {
    $formkit: 'formRating',
    label: 'Select Rating',
    name: 'ratingCancel',
    value: 7,
    stars: 10,
    cancel: true
  },
]
const data = {}
</script>

<template>
  <FormKit :schema="schema" :data="data" />
</template>

Props ​

NameTypeDescription
starsnumberNumber of stars
cancelbooleanShow cancel icon
onIconstringIcon for selected star
offIconstringIcon for unselected star
cancelIconstringIcon for cancel
ptobjectPass-through options
ptOptionsobjectPass-through options
unstyledbooleanDisable default styles

See OpenVue Rating docs for more details.

FormKit OpenVue Module