Socket
Socket
Sign inDemoInstall

q-fork-react-wordcloud

Package Overview
Dependencies
25
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    q-fork-react-wordcloud

Powerful React + D3 word cloud component with rich features.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
5.96 MB
Created
Weekly downloads
 

Readme

Source

React Wordcloud

Powerful React + D3 word cloud component with rich features. Based on the original word cloud generator: https://www.jasondavies.com/wordcloud/.

Example cloud of Twitter search results for “amazing”

Install

Add to package.json with yarn or npm.

yarn add https://github.com/chrisrzhou/react-wordcloud.git

Usage

This is a simple example using minimal props.

import * as React from 'react';

import ReactWordCloud from 'react-wordcloud';

const words = [
  {word: 'hello', value: 3},
  {word: 'world', value: 1},
  {word: 'github', value: 1},
  {word: 'code', value: 1},
];

const WORD_COUNT_KEY = 'value';
const WORD_KEY = 'word';

const MyWordCloud = () => {
  return (
    <div style={{width: 600, height: 400}}>
      <ReactWordCloud
	words={words}
	wordCountKey={WORD_COUNT_KEY}
	wordKey={WORD_KEY}
      />
    </div>
  );
};

export default MyWordCloud;

Word Cloud Generator Example

Check out the code in this word cloud generator to see how to use react-wordcloud in production.

This generator allows you to tweak many properties of the word cloud component.

It also demonstrates how we can parse string into words, and bind click actions on the words to highlight their occurrences in the original text.

FAQs

Last updated on 13 Sep 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