@inotom/vue-rating-star

Rating star icon, Vue.js component.
1,236
vue
Install
npm install @inotom/vue-rating-star
Latest Version:2.0.0
Vue:3
Older releases:2
License:MIT
Last Updated:Feb 22, 2024
Links: GitHub  ·  npm
Maintainer: inotom

vue-rating-star

Rating star icon, Vue.js component.

From v2.0.0, it works for Vue 3.

Demo

Demo

Install

Browser

<script src="vue.global.prod.js"></script>
<script src="vue-rating-star.umd.js"></script>

npm

npm install --save @inotom/vue-rating-star

Usage

Browser

<div id="app">
  <rating-star></rating-star>
</div>

<script src="vue.global.prod.js"></script>
<script src="vue-rating-star.umd.js"></script>
<script>
const { createApp } = Vue;
const { RatingStar } = SwsVueRatingStar;

createApp({
  components: {
    RatingStar,
  },
}).mount('#app');
</script>

SFC (TypeScript)

<template>
  <rating-star></rating-star>
</template>

<script setup lang="ts">
import RatingStar from '@inotom/vue-rating-star';
</script>

Props

name type defaults description
:max-value Number 5 Number of stars
:initial-value Number 0 Initial rating number
:star-size Number 30 Star icon width/height
color String ffcc00 Star icon color
bg-color String cccccc Star icon background-color
stroke-color String 000000 Star icon stroke color
:has-stroke Boolean false Enable star icon stroke
:is-readonly Boolean false Disable rating status changing

License

MIT

Author

inotom

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

468,054,189 54,906
vue
eslint-plugin-vue

Official ESLint plugin for Vue.js

266,364,830 4,591
@vueuse/shared
260,835,866 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

257,315,514 686
@vueuse/core

Collection of essential Vue Composition Utilities

256,285,643 22,398

Version History

Version Released Vue License
2.0.0 ^3.3.11 MIT
1.0.4 ^2.6.10 MIT
1.0.3 2.6.10 MIT
1.0.2 2.6.10 MIT
Pre-releases (1)
Version Released Vue License
2.0.0-beta.1 ^3.3.11 MIT