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

@glyphkit/glyphkit

v0.0.124

Published

A customizable SVG icon toolkit for React applications

Readme

GlyphKit

A lightweight, customizable SVG icon toolkit for React applications with built-in caching and TypeScript support.

npm version
TypeScript

Overview

GlyphKit is an extensive icon library designed to be friendly to use, highly performant, flexible to any need, and in a constant state of evolution. This documentation will help you get started with using the library effectively.

Performance

GlyphKit includes built-in caching for SVG content:

  • SVGs are cached after the first load
  • Subsequent requests use cached content
  • Memory-efficient Map implementation
  • Automatic error handling

Browser Support

Supported browsers include:

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Note: IE11 is not supported.

Getting Started

Installation

Choose your preferred package manager:

# npm
npm install @glyphkit/glyphkit

# yarn
yarn add @glyphkit/glyphkit

# pnpm
pnpm add @glyphkit/glyphkit

Quick Start

Once installed correctly, its pretty simple to get started... Just import the package where will be consumed then add the icon reference like so:

import { Icon } from '@glyphkit/glyphkit';

function App() {
  return (
    <Icon
      name="arrow-right"
      size={24}
      color="#000"
    />
  );
}

API Reference

Icon Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | name | string | Required | Icon name (without .svg extension) | | size | number \| string | 24 | Icon size in pixels | | color | string | 'currentColor' | Icon color | | className | string | undefined | Additional CSS classes | | svgDirectory | string | 'public/icons' | Directory containing SVG files | | iconPrefix | string | 'gk' | Prefix for icon IDs | | onError | (error: Error) => void | undefined | Error callback | | onLoad | () => void | undefined | Success callback |

Usage

Error Handling

The onError and onLoad props can be used for debugging purposes. The onError prop allows you to handle any issues that arise when loading an icon, while the onLoad prop can be used to confirm successful loading.

<Icon
  name="user"
  onError={(error) => console.error('Icon failed to load:', error)}
  onLoad={() => console.log('Icon loaded successfully')}
/>

Color

The color prop can handle various formats, including hex, rgba, and even advanced logic for dynamic color changes. This allows for flexible styling based on application state or user interactions.

<Icon
  name="heart"
  color={isLiked ? '#ff0000' : '#cccccc'}
  size={24}
/>

Size

The size prop allows you to specify the size of the icon. You can use dynamic size attributes to adjust the icon's size based on your application's needs. For example, you can specify sizes like x_16 or x_24 in the icon name to indicate the desired size.

<Icon
  name="x_24"
  size={24}
/>

Accessibility

GlyphKit icons support ARIA attributes for proper accessibility implementation. Here are the common patterns for different use cases:

Decorative Icons

Icons that are purely decorative should have aria-hidden="true". This will not visually hide the icon, but it will hide the element from assistive technology.

<Icon 
  name="heart"
  aria-hidden={true}
  size={24}
/>

Interactive Icons

If the icon conveys meaning, it should have alternate text defined by adding an aria-label.

<Icon
  name="heart"
  aria-label="Add to favorites"
  size={24}
/>

Icons Within Interactive Elements

When an icon is inside another element that it's describing, the parent element should have the aria-label, and the icon should be hidden using aria-hidden.

<button aria-label="Add to favorites">
  <Icon
    name="heart"
    aria-hidden={true}
    size={24}
  />
</button>

Keywords

  • 🚀 Zero dependencies
  • 📦 Tree-shakeable
  • 🎨 Customizable colors and sizes
  • 💾 Built-in SVG caching
  • 🔧 TypeScript support
  • ♿ Accessibility-friendly
  • 🎯 Simple API

Support

License

MIT © caidentity

Credits

Created and maintained by caidentity.