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

opentagcloud

v0.6.0

Published

A dependency-free, self-packing, SSR-friendly tag cloud for any framework — Svelte 5 component, vanilla-JS mount(), and the <otc-tag-cloud> custom element in one package; React, Vue, Angular, Solid, and Next.js adapters ship as @opentagcloud/*.

Downloads

781

Readme

opentagcloud

A dependency-free, self-packing, SSR-friendly tag cloud — for any framework, or none. This package bundles the Svelte 5 component, a vanilla-JS entry point (opentagcloud/vanilla: mount() and the <otc-tag-cloud> custom element — one script tag, no build step), and re-exports of the framework-agnostic engine. Dedicated React, Vue, Angular, SolidJS, and Next.js adapters ship as @opentagcloud/*.

Live examples →

Terms are laid out by a lightweight packer that seeds the heaviest tags across the container and spirals the rest out from their anchors until nothing overlaps — so the cloud fills its container at any size or aspect ratio. The scatter is deterministic (seeded per tag), so server-rendered and hydrated output match and the layout is stable across renders.

Install

npm install opentagcloud

Svelte 5 is a peer dependency (only if you use the Svelte component — the vanilla entry point and custom element need no framework at all).

Usage

No build step (any site, any framework):

<script src="https://unpkg.com/opentagcloud/dist/opentagcloud.vanilla.js"></script>

<otc-tag-cloud
  style="height: 320px"
  items='[
    { "label": "JavaScript", "weight": 95, "href": "/tags/javascript" },
    { "label": "Rust", "weight": 60 }
  ]'
></otc-tag-cloud>

Svelte 5:

<script lang="ts">
  import { TagCloud, type TagCloudItem } from 'opentagcloud';

  const items: TagCloudItem[] = [
    { label: 'JavaScript', weight: 95, href: '/tags/javascript' },
    { label: 'TypeScript', weight: 88, href: '/tags/typescript' },
    { label: 'Svelte', weight: 70, href: '/tags/svelte' },
    { label: 'Go', weight: 55 }, // no href → renders as a <span>
  ];
</script>

<!-- Give the cloud a sized container; it fills it. -->
<div style="height: 320px">
  <TagCloud {items} />
</div>

Props (items, minPx, maxPx, fill), the TagCloudItem fields, theming custom properties (--otc-color, --otc-hover-color, --otc-transition, per-tag color), and the layout algorithm are documented in the project README.

For custom per-tag styling beyond color, pass a class on the item and target it globally (tag elements carry the otc-tag class):

<TagCloud items={[{ label: 'Legacy', weight: 20, class: 'muted' }]} />

<style>
  :global(.otc-tag.muted) {
    font-style: italic;
  }
</style>

Development

This package doubles as the repo's demo app:

npm install        # at the repo root
npm run dev        # demo app at /
npm run check      # svelte-check
npm run build -w opentagcloud

License

MIT © Henry Koren