npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kernpro/angular-wordcloud

v21.0.0

Published

An Angular standalone component for rendering interactive word clouds with up to **90 words**. Features animated transitions, responsive SVG rendering, and custom styling options.

Readme

Angular Wordcloud Component

An Angular standalone component for rendering interactive word clouds with up to 90 words. Features animated transitions, responsive SVG rendering, and custom styling options.

Live Demos

wordcloud example

Features

  • Up to 90 words with efficient placement algorithm (Archimedean spiral + collision detection)
  • Five word sizes: small | medium | large | extra-large | huge
  • Custom colors and animated transitions
  • Responsive SVG rendering with configurable aspect ratio (default 16:9)
  • Click events and loading state support
  • Browser-only rendering with graceful SSR handling

Installation & Usage

npm install @kernpro/angular-wordcloud
// Component usage
import { WordcloudComponent, WordcloudWord } from '@kernpro/angular-wordcloud';

const wordList: WordcloudWord[] = [
  { text: 'Angular', size: 'huge', color: '#dd0031' },
  { text: 'TypeScript', size: 'large', color: '#3178c6' },
  { text: 'Component', size: 'medium', color: '#42a5f5' },
  { text: 'Reactive', size: 'large', color: '#66bb6a' },
  { text: 'Modern', size: 'small', color: '#ff7043' },
];
<kp-wordcloud [words]="wordList" />

API

Inputs

  • words: readonly WordcloudWord[] - Array of words to render (default: [])
  • loading: boolean - Shows loader when true (default: false)
  • size: Readonly<Size> - SVG dimensions (default: {width: 640, height: 360})

Outputs

  • layoutComplete: void - Emitted when layout finishes
  • linkclick: string - Emitted with word text when clicked

WordcloudWord Type

type WordcloudWord = {
  text: string;
  size: 'small' | 'medium' | 'large' | 'extra-large' | 'huge';
  color?: string;
};

Custom Loading Content

Use content projection with slot="loader" for custom loading UI:

<kp-wordcloud [words]="words" [loading]="true">
  <div slot="loader">
    <mat-spinner diameter="50"></mat-spinner>
    <p>Processing your data...</p>
  </div>
</kp-wordcloud>

Without custom content, displays default CSS spinner with "Loading..." text.

Example

import { Component } from '@angular/core';
import { WordcloudComponent, WordcloudWord } from '@kernpro/angular-wordcloud';

@Component({
  template: `<kp-wordcloud [words]="words" [loading]="isLoading" (layoutComplete)="onReady()" />`,
  imports: [WordcloudComponent],
})
export class MyComponent {
  isLoading = true;

  words: WordcloudWord[] = [
    { text: 'Angular', size: 'huge', color: '#dd0031' },
    { text: 'TypeScript', size: 'large', color: '#3178c6' },
    { text: 'Component', size: 'medium', color: '#42a5f5' },
    // ... up to 90 words total
  ];

  onReady() {
    this.isLoading = false;
  }
}

Limitations & Notes

  • Maximum recommended words: 90 (more reduces readability and placement success)
  • Placement: Words that can't fit are skipped (no adaptive scaling)
  • Browser-only: No server-side rendering support
  • Algorithm: Uses Archimedean spiral with collision detection, inspired by d3-cloud

License

MIT. Inspired by d3-cloud (BSD-3-Clause). See THIRD_PARTY_NOTICES.md for attributions.