Socket
Socket
Sign inDemoInstall

@blackywkl/vuewordcloud

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @blackywkl/vuewordcloud

word cloud make by vue


Version published
Weekly downloads
11
increased by175%
Maintainers
1
Install size
39.5 kB
Created
Weekly downloads
 

Readme

Source

wordcloud for Vue

A wordcloud component for Vue.

Install

npm install @blackywkl/vuewordcloud

Example

Edit @blackywkl/vuewordcloud

<template>
	<div id="app">
      <wordcloud v-bind:texts="texts"></wordcloud>
  </div>
</template>

<script>
import Wordcloud from '@blackywkl/vuewordcloud';

export default {
  	name: 'app',
  	components: {
    	Wordcloud
  	},
  	data() {
    	return {
      		defaultWords: [{
          		text: 'Cat',
          		size: 26
        	}, {
          		text: 'fish',
          		size: 19
        	}, {
          		text: 'things',
          		size: 18
        	}, {
          		text: 'look',
          		size: 16
        	}, {
          		text: 'two',
          		size: 15
        	}, {
        	    text: 'fun',
        	    size: 9
        	}, {
        	    text: 'know',
        	    size: 9
        	}, {
        	    text: 'good',
        	    size: 9
        	}, {
        	    text: 'play',
        	    size: 6
        	}]
    	}
  	}
}
</script>

Props

namemeaningtypedefault value
textsarray contain each textArray[]
widthwidth(px) for entire componentNumber400
heightheight(px) for entire componentNumber400
mouseStopstop the word when the mouse is hoverBooleanfalse
properties for each item in texts
namemeaningtypedefault value
textword to showStringtest
sizefont size for the wordNumberrandom
fontFamilyfont family for the wordStringMicrosoft YaHei
colorcolor for the wordStringrgb(200,200,200)

Todos

  • Add github page
  • Add online demo(codesandbox)
  • Add test
  • Add callback for click
  • Add attribute to avoid collision
  • Add attribute to controll speed

License

MIT.

Keywords

FAQs

Last updated on 02 Dec 2019

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