All Projects → SeregPie → Vuewordcloud

SeregPie / Vuewordcloud

Licence: mit
Generates a cloud out of the words.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vuewordcloud

Vue Lazy Component
🐌 Vue.js 2.x 组件级懒加载方案-Vue.js 2.x component level lazy loading solution
Stars: ✭ 915 (+222.18%)
Mutual labels:  plugin, component
Jqueryrotate
jQueryRotate - plugin to rotate images by any angle cross-browse with animation support
Stars: ✭ 157 (-44.72%)
Mutual labels:  plugin, rotation
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-55.28%)
Mutual labels:  plugin, component
Zmjimageeditor
ZMJImageEditor is a picture editing component like WeChat. It is powerful and easy to integrate, supporting rendering, text, rotation, tailoring, mapping and other functions. (ZMJImageEditor 是一个和微信一样图片编辑的组件,功能强大,极易集成,支持绘制、文字、旋转、剪裁、贴图等功能)
Stars: ✭ 470 (+65.49%)
Mutual labels:  draw, rotation
Summernote Cleaner
Plugin for Summernote that adds a Button and/or Paste functionality for cleaning MS Word Crud from editor text
Stars: ✭ 148 (-47.89%)
Mutual labels:  word, plugin
React Native Sketch View
A React Native component for touch based drawing supporting iOS and Android.
Stars: ✭ 97 (-65.85%)
Mutual labels:  draw, component
React Native Wormhole
⚛️ 🌌 Inter-dimensional Portals for React Native. 👽 🖖
Stars: ✭ 133 (-53.17%)
Mutual labels:  plugin, component
React Planner
✏️ A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
Stars: ✭ 846 (+197.89%)
Mutual labels:  draw, component
Vue Context Menu
🗃️ Vue 2.x 右键菜单组件,菜单内容可以随意自定义
Stars: ✭ 279 (-1.76%)
Mutual labels:  plugin, component
Vue Plugin Template
🚀 Solid foundation to start a Vue plugin with the best developer experience and a focus on performance
Stars: ✭ 189 (-33.45%)
Mutual labels:  plugin, component
Vue Slide Bar
🎢 A Simple Vue Slider Bar Component.
Stars: ✭ 129 (-54.58%)
Mutual labels:  plugin, component
React Input Tags
React component for tagging inputs.
Stars: ✭ 10 (-96.48%)
Mutual labels:  tag, component
V Chart Plugin
Easily bind a chart to the data stored in your Vue.js components.
Stars: ✭ 188 (-33.8%)
Mutual labels:  plugin, component
Esp Azure
SDK to connect ESP8266 and ESP32 to Microsoft Azure IoT services
Stars: ✭ 137 (-51.76%)
Mutual labels:  cloud, component
Esp Aliyun
Aliyun Iotkit-embedded, support esp32 & esp8266.
Stars: ✭ 262 (-7.75%)
Mutual labels:  cloud, component
V Track
🕹 A manual tracking decoupling plugin based on Vue directive / 一个基于Vue指令实现的埋点解耦插件~
Stars: ✭ 277 (-2.46%)
Mutual labels:  plugin
Mpvue Weui
基于 mpvue 的 weui 框架
Stars: ✭ 279 (-1.76%)
Mutual labels:  component
Flow Netbeans Markdown
Markdown file support for the NetBeans IDE
Stars: ✭ 276 (-2.82%)
Mutual labels:  plugin
Rome
📆 Customizable date (and time) picker. Opt-in UI, no jQuery!
Stars: ✭ 2,901 (+921.48%)
Mutual labels:  component
Ictf Framework
The iCTF Framework, presented by Shellphish!
Stars: ✭ 281 (-1.06%)
Mutual labels:  cloud

VueWordCloud

Generates a cloud out of the words.

demo

Try it out!

setup

npm

npm i vuewordcloud

ES module

Register the component globally.

import Vue from 'vue';
import VueWordCloud from 'vuewordcloud';

Vue.component(VueWordCloud.name, VueWordCloud);

or

Register the component in the scope of another component.

import VueWordCloud from 'vuewordcloud';

export default {
  components: {
    [VueWordCloud.name]: VueWordCloud,
  },
};

browser

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vuewordcloud"></script>

The component is globally available as VueWordCloud. If Vue is detected, the component will be registered automatically.

usage

<vue-word-cloud
  style="
    height: 480px;
    width: 640px;
  "
  :words="[['romance', 19], ['horror', 3], ['fantasy', 7], ['adventure', 3]]"
  :color="([, weight]) => weight > 10 ? 'DeepPink' : weight > 5 ? 'RoyalBlue' : 'Indigo'"
  font-family="Roboto"
/>

Pass custom renderer for the words.

<vue-word-cloud :words="words">
  <template slot-scope="{text, weight, word}">
    <div :title="weight" style="cursor: pointer;" @click="onWordClick(word)">
      {{ text }}
    </div>
  </template>
</vue-word-cloud>

properties

property type default description
animation-duration Number 1000 The duration of the animation.
animation-easing String 'ease' The easing of the animation.
animation-overlap Number 1 The overlap of the animation. Set the value to 1 to animate words all at once. Set the value to 0 to animate words one by one. The value 5 has the same effect as the value 1/5.
color [String, Function] 'Black' The default color for each word.
create-canvas Function * Creates a new Canvas instance.
create-worker Function * Creates a new Worker instance.
enter-animation [Object, String] * The enter animation.
font-family [String, Function] 'serif' The default font family for each word.
font-size-ratio Number 0 The font size ratio between the words. For example, if the value is 5, then the largest word will be 5 times larger than the smallest one. The value 5 has the same effect as the value 1/5.
font-style [String, Function] 'normal' The default font style for each word.
font-variant [String, Function] 'normal' The default font variant for each word.
font-weight [String, Function] 'normal' The default font weight for each word.
leave-animation [Object, String] * The leave animation.
load-font Function * Loads the font.
rotation-unit [String, Function] 'turn' The default rotation unit for each word. Possible values are 'turn', 'deg' and 'rad'.
rotation [Number, Function] 0 The default rotation for each word.
spacing Number 0 The spacing between the words. The value is relative to the font size.
text [String, Function] '' The default text for each word.
weight [Number, Function] 1 The default weight for each word.
words Array [] The words to place into the cloud. A value of the array could be either an object, an array or a string.
If the value is an object, it will be resolved to {text, weight, rotation, rotationUnit, fontFamily, fontStyle, fontVariant, fontWeight, color}.
If the value is an array, it will be resolved to [text, weight].
If the value is a string, it will be resolved to text.

let enterAnimation = {opacity: 0};
let leaveAnimation = {opacity: 0};

Make more complex animations.

let enterAnimation = {
  opacity: 0,
  transform: 'scale3d(0.3,0.3,0.3)'
};

Use classes for CSS animations.

let enterAnimation = 'animated bounceIn';
let leaveAnimation = 'animated hinge';

let createCanvas = function() {
  return document.createElement('canvas');
};

let loadFont = function(fontFamily, fontStyle, fontWeight, text) {
  return document.fonts.load([fontStyle, fontWeight, '1px', fontFamily].join(' '), text);
};

Provide custom loadFont function to support older browsers.

import FontFaceObserver from 'fontfaceobserver';

let loadFont = function(family, style, weight, text) {
  return (new FontFaceObserver(family, {style, weight})).load(text);
};

let createWorker = function(code) {
  return new Worker(URL.createObjectURL(new Blob([code])));
};

events

event description
update:progress The current progress of the cloud words computation.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].