Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

q-fork-react-wordcloud

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q-fork-react-wordcloud

Powerful React + D3 word cloud component with rich features.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 13 Sep 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc