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

@wmcadigital/ui-icons

v0.1.0-alpha.2

Published

Icons are images used in context to communicate a meaning (a visual representation of an object, action, or idea).

Readme

# Icons

SVG icon set used across the system; includes sprite or individual SVGs depending on build.

## Usage

Reference icons via `<svg>` use patterns or load the sprite.

## Installation

Include the compiled icon assets into your build or use the loader script where provided.

# @wmcadigital/ui-icons

SVG icon set used across the design system. Provides a small runtime helper to inject a sanitized SVG sprite into the page and a stylesheet that makes icons inherit the current theme colour.

## Install

Install from the monorepo package registry (or use the workspace package):

pnpm add @wmcadigital/ui-icons

## What this package provides

- `initIcons()` (default export): a small function that fetches a sprite (the demo uses `/demo/sprite.svg`), sanitises presentation attributes and injects it into the document so icons can be referenced with `<use>`.
- SCSS/CSS that makes icon SVGs inherit the current theme colour and exposes a CSS variable you can override: `--wmca-icons-fill`.
- Source SVGs organised under `src/icon/` (categories: caret, chevron, facilities, files, general, info-warnings, modes, portfolio, sharing, social, swift, etc.).

## Usage

1. Sprite + runtime (recommended for many icons):

```js
import initIcons from '@wmcadigital/ui-icons';

// Call once on app startup to inject the SVG sprite into the document
initIcons();
```

Then reference an icon in markup:

<svg class="wmca-icon" aria-hidden="true" width="16" height="16">
  <use href="#icon-facebook"></use>
</svg>

Notes:

  • The demo server serves a sprite.svg file — adapt the fetch path in initIcons() if you host the sprite at a different URL.
  • The package's JS sanitises the sprite to remove presentation attributes (so icons use currentColor).
  1. Inline SVGs

You can also inline individual SVG files from src/icon/* when you need to keep an icon self-contained (for example if it requires unique accessibility text or animation). The shipped stylesheet applies fill: currentColor so SVGs will pick up the surrounding color value.

<svg class="wmca-icon" aria-hidden="true" width="20" height="20">...inline svg content...</svg>

Accessibility

  • Decorative icons should use aria-hidden="true" so they are ignored by assistive technology.
  • If an icon conveys meaning, make it accessible by providing a text alternative: either a visible label or a title element inside the SVG and ensure aria-hidden is not set.
  • Consider pairing non-decorative icons with an off-screen label for screen readers.

Customisation

  • Override the icon colour using the CSS variable --wmca-icons-fill, or directly set color on the icon container. The SCSS sets --wmca-icons-fill to the theme primary colour by default.

Example:

.my-button .wmca-icon {
  color: #0a66c2;
}
/* or override the variable */
:root {
  --wmca-icons-fill: #0a66c2;
}

Development

  • Source SVGs are in src/icon/<category>/.
  • The runtime helper src/index.ts fetches /demo/sprite.svg in development; when deploying you should generate and serve a sprite file and ensure the fetch path is correct or provide your own injection mechanism.