Socket
Socket
Sign inDemoInstall

vue-cute-rate

Package Overview
Dependencies
449
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-cute-rate

Simple to use and very cute rate component for Vue.js


Version published
Weekly downloads
330
decreased by-6.78%
Maintainers
1
Install size
21.1 MB
Created
Weekly downloads
 

Readme

Source

vue-cute-rate

NPM version NPM downloads CircleCI

Rate with star, heart, emoji or anything you like.

See the beautiful doc for vue-cute-rate. Powered by kokk 🍹

Install

yarn add vue-cute-rate --save

CDN: UNPKG | jsDelivr (available as window.rate)

API

See the doc for live demo and details.

PropertyDescriptiontypeDefault
countstar countnumber5
value / v-modelcurrent valuenumber0
star-halfwhether to allow semi selectionbooleanfalse
disabledread only, unable to interactbooleanfalse
disabled-cursorset mouse cursor to not-allowed when hover a read only elementbooleanfalse
allow-clearwhether to allow clear when click againbooleantrue
font-sizeset the font size of characterstring22px
typethere are 3 cute types of iconfont by default, star star1 and heartstringstar
hover-changesupport set hover-change to change value when hoverbooleanfalse
active-colorcolor of the active valuesstring#fadb14
inactive-colorcolor of the inactive valuesstring#e9e9e9
hover-colorcolor when hover a valuestringsame as activeColor by default
inactive-charthe inactive character, only rendered when use a customChar slotstring- (hyphen)
on-hover-changecallback when hover itemFunction(value: number)-
on-changecallback when select valueFunction(value: number)-

slot

rateChar

Use the slot when replace the default star to other character like alphabet, digit, iconfont or anything which can be controled by color.

The slot name is rateChar, and make sure to write slot-scope="props" :class="props.computeClass" as well. We need Scoped Slots and compute classnames by props.

customChar

Use the slot when replace the default star to other character like image, Unicode, or anything which cannot be controled by color. At the same time, you may want to set the inactive character.

The slot name is customChar, and make sure to write slot-scope="props" :class="props.computeClass" as well. We need Scoped Slots and compute classnames by props.

License

MIT © luyilin

minemine.cc · GitHub @luyilin · Twitter @luyilin12

Keywords

FAQs

Last updated on 11 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc