🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@miiint/mint-angular-cloud

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@miiint/mint-angular-cloud

A customizable, responsive word cloud component for Angular 19+ applications.

1.1.0
latest
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created

Mint Angular Word Cloud

A customizable, responsive word cloud component for Angular 19+ applications.

Installation

npm install @miiint/mint-angular-cloud

Usage

  • Import the component in your standalone component:
import { MintAngularCloudComponent } from '@miiint/mint-angular-cloud';

@Component({
  standalone: true,
  imports: [MintAngularCloudComponent],
  template: `
    <div class="word-cloud-container">
      <mint-word-cloud
        [words]="words"
        [theme]="'blue'"
        [emphasis]="'high'">
      </mint-word-cloud>
    </div>
  `
})
  • Add the required styles:
.word-cloud-container {
    height: 400px;  // Fixed height
    width: 100%;
    display: block;
    position: relative;

    mint-word-cloud {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100%;
        width: 100%;
    }
}
  • Define your word data:
words = [
  { text: 'Example', weight: 100 },
  { text: 'Cloud', weight: 85 },
  { text: 'Component', weight: 70 },
  // ... more words
];

API Reference

Inputs

InputTypeDefaultDescription
wordsWordItem[][]Array of words with weights
theme'orange' | 'blue' | 'green' | 'purple' | 'multi''orange'Color theme for the word cloud
emphasis'high' | 'medium' | 'low''high'Controls size difference between weights
minFontSizenumber12Minimum font size in pixels
maxFontSizenumber48Maximum font size in pixels

Interfaces

interface WordItem {
  text: string;
  weight: number;
}

Themes

The component comes with 5 predefined color themes:

  • orange: Warm orange gradients
  • blue: Professional blue tones
  • green: Natural green shades
  • purple: Rich purple hues
  • multi: Dynamic multi-color scheme

Important Notes

  • Container sizing is crucial for proper rendering
  • The component requires specific CSS structure as shown in the usage section
  • The word cloud is responsive and will adjust to container resizing
  • Word weights affect both size and boldness of the text
  • Words are positioned to avoid overlapping

License

MIT

FAQs

Package last updated on 28 Jan 2025

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