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
| Prop | Type | Default | Description |
|---|---|---|---|
max | number | 5 | Number of stars. |
label | string | "" | Group legend. |
disabled | boolean | false | Disables the rating. |
name | string | — | Form field name; generated when omitted. |
modelValue | number | 0 | Stars given, 0 to max. |
Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | [value: number] | v-model update. |