Skip to content

MRating <m-rating> ​

Stars that pop in one after another, with wedges and a hollow ポン on the last; full marks get a burst. Native radios underneath: arrow keys and forms work.

Demo source
vue
<script setup lang="ts">
import { ref } from 'vue';
import { MRating } from 'vue-manga-ui';

const stars = ref(0);
</script>

<template>
  <MRating v-model="stars" label="Rating" name="rating" />
</template>

Props ​

PropTypeDefaultDescription
maxnumber5Number of stars.
labelstring""Group legend.
disabledbooleanfalseDisables the rating.
namestring—Form field name; generated when omitted.
modelValuenumber0Stars given, 0 to max.

Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.

Events ​

EventPayloadDescription
update:modelValue[value: number]v-model update.