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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fishtank/icons

v3.13.1

Published

The Fishtank Design System's SVG icons.

Downloads

18

Readme

Fishtank Icons

SVG icons for use with the Fishtank Design System.

On build, any icon in src will be optimized using svgo and saved to icons. We (will) maintain an NPM package with this step already done called @fishtank/icons.

Installation

npm install @fishtank/icons

Usage

If your project depends on @fishtank/icons, you'll be able to refer to the contents of the icons directory. How you'll do this will depend on your choice of build system or deployment mechanism. At this point, our adopters on using Webpack. If you are using something else, please let us know and we'll update this accordingly.

With Webpack

We recommend using [SVG Sprite Loader] (https://github.com/kisenka/svg-sprite-loader). This loader support a number of different strategies. We've had success with the default runtime.

If you are working with Vue JS, we have built @fishtank/icons-vue, a Vue Component that renders our SVG shapes.

Note that external sprites cannot be used with CDNs or asset hosts due to cross-origin restrictions.

Opinions

SVG vs. Font Icons

Early on, we decided in favor of using SVG sprites instead of font icons for our design system. To summarize the key points:

  1. SVGs are now well supported across our target browsers (sometimes with minor polyfills).
  2. Font icons have a number of accessibility issues.
  3. Font icons will fail with no fallback when font downloads are restricted (as we've seen at a number of government agencies).

More information here: Seriously Don't Use Icon Fonts

Sizing

We support two different icon sizes: 24px and 32px. Although SVG allows our icons to be infinitely scalable, the icons have been designed to be crisp and not have sub-pixels at those sizes (or integer multiples thereof).

In the future, we may figure out a way to make the icons responsive to the size they're used in.

Accessibility

When dealing with icon accessibility, we follow the advice in this article: Hiding inline SVG icons from screen readers

Many, probably the majority, of articles explaining how to use inline SVG for icons describe multiple ways of ensuring that your SVG graphics have a text alternative. That can be appropriate, but most of the time, at least in my experience, you just want an icon as an added visual cue alongside some text. Just like adding an image via the background-image CSS property. And icons of that kind should not have any text alternative since for a screen reader user that will just duplicate the information already available in plain text.

  • We strip title elements from the SVGs before packaging them.
  • We recommend that anyone using our icons
    • add aria-hidden="true" to the <svg> element
    • add accessible descriptive text to the context that our icons are being used in

Optimizations

Currently, we use SVGO's default optimization settings, but we're open to suggestions.