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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tokens-studio/icons-webcomponents

v0.0.5

Published

Tokens Studio: Internal icon library

Readme

@tokens-studio/icons-webcomponents

A comprehensive, type-safe icon library as web components for use in any framework or vanilla JavaScript.

Features

  • 344+ icons available as web components
  • TypeScript support with full type definitions
  • Framework agnostic - works with React, Vue, Angular, Svelte, or vanilla JS
  • Tree-shakeable - import only what you need
  • AI-friendly - comprehensive types and metadata for AI assistants
  • Customizable - style with CSS custom properties

Installation

npm install @tokens-studio/icons-webcomponents

Usage

Basic Usage

<!-- Import the icon -->
<script type="module">
	import '@tokens-studio/icons-webcomponents/Plus';
</script>

<!-- Use it in your HTML -->
<icon-plus></icon-plus>

TypeScript Usage

// Import specific icon
import '@tokens-studio/icons-webcomponents/Plus';

// Or import all icons
import * as Icons from '@tokens-studio/icons-webcomponents';

// Use types for type-safe icon names
import type {
	IconName,
	IconComponentName,
} from '@tokens-studio/icons-webcomponents';

const iconTag: IconName = 'icon-plus';
const componentName: IconComponentName = 'Plus';

React Usage

import '@tokens-studio/icons-webcomponents/Plus';

function MyComponent() {
	return <icon-plus></icon-plus>;
}

Vue Usage

<template>
	<icon-plus></icon-plus>
</template>

<script setup>
import '@tokens-studio/icons-webcomponents/Plus';
</script>

Styling

Icons use currentColor for stroke/fill, so you can style them with CSS:

icon-plus {
	color: #3b82f6;
	width: 32px;
	height: 32px;
}

/* Or use CSS custom properties */
icon-plus {
	--icon-width: 32px;
	--icon-height: 32px;
	color: #3b82f6;
}

Type Safety

Icon Name Types

import type {
	IconName,
	IconComponentName,
} from '@tokens-studio/icons-webcomponents';

// Type-safe icon tag names
const tag: IconName = 'icon-plus'; // ✅ Valid
const invalid: IconName = 'icon-invalid'; // ❌ TypeScript error

// Type-safe component names
const component: IconComponentName = 'Plus'; // ✅ Valid

Icon Maps

import {
	iconTagToComponentMap,
	iconComponentToTagMap,
} from '@tokens-studio/icons-webcomponents';

// Convert tag name to component name
const componentName = iconTagToComponentMap['icon-plus']; // 'Plus'

// Convert component name to tag name
const tagName = iconComponentToTagMap['Plus']; // 'icon-plus'

Icon Manifest

Access the complete icon manifest programmatically:

import manifest from '@tokens-studio/icons-webcomponents/manifest';

console.log(manifest.total); // 344
console.log(manifest.icons); // Array of all icons with metadata

Each icon in the manifest includes:

  • name: PascalCase component name (e.g., "Plus")
  • tag: Web component tag name (e.g., "icon-plus")
  • keywords: Search keywords for the icon
  • importPath: Full import path
  • importStatement: Ready-to-use import statement
  • componentImport: Component import statement

Available Icons

All icons are available with their kebab-case tag names. For example:

  • icon-plus<icon-plus></icon-plus>
  • icon-user<icon-user></icon-user>
  • icon-settings01<icon-settings01></icon-settings01>

Many icons also have "filled" variants:

  • icon-plus (outline)
  • icon-plus-filled (filled/solid)

AI Assistant Support

This package is designed to be AI-friendly with:

  1. Comprehensive TypeScript types - All icon names are typed
  2. Icon manifest - JSON file with all icon metadata
  3. JSDoc comments - Each icon component has documentation
  4. Type exports - Easy to discover available icons programmatically

AI assistants can:

  • Discover all available icons via types
  • Get icon metadata from the manifest
  • Understand icon usage through JSDoc
  • Provide type-safe suggestions

Development

Building

npm run build

Regenerating Icons

npm run regenerate

This will:

  1. Clean existing icons
  2. Convert SVG assets to React components (via SVGR)
  3. Convert React components to web components
  4. Generate type definitions and manifest

License

[Your license here]