tags-cloud
v1.0.1
Published
Lightweight tag cloud generator. Generates different font sizes, for each word, based on their frequency
Maintainers
Readme
Tag Cloud
Lightweight tag cloud generator.
It generates different font sizes (in rems), for each word, based on their frequency.

Install & Run tests
- Install:
npm install tags-cloud
How to use
tagCloud(tagList, order='default', minFontSize=1, maxFontSize=2);
import { tagCloud } from 'tags-cloud';
const tagList = [{ name: 'tag', count: '8' }, { name: 'cloud', count: '1' }];
// Default order (the current order of your tagList)
tagCloud(tagList, 'default');
// Ascending order
tagCloud(tagList, 'asc');
// Descending order
tagCloud(tagList, 'desc');
// Random order
tagCloud(tagList, 'random');
// Aplhabetical order
tagCloud(tagList, 'alphabetical');
// Defining the min and max font size (in rems)
tagCloud(tagList, 'default', 2, 6);