vue
@blackywkl/vuewordcloud
npm i @blackywkl/vuewordcloud
vue

@blackywkl/vuewordcloud

word cloud make by vue

by blackie

1.1.4 (see all)License:MITTypeScript:Not FoundCategories:Vue Word Cloud
npm i @blackywkl/vuewordcloud
Readme

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.

Downloads/wk

12

GitHub Stars

0

LAST COMMIT

2yrs ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

0

OPEN PRs

28
VersionTagPublished
1.1.4
latest
2yrs ago
No tutorials found
Add a tutorial