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

@hackclub/icons

v0.0.15

Published

Hack Club’s iconset, a superset of spectrum-icons

Downloads

5,684

Readme

@hackclub/icons

Hack Club’s icons are a superset of Spectrum’s incredible collection (also published as spectrum-icons). Designed for use with our Design System.

See them all

Usage

With React

npm i @hackclub/icons
import React from 'react'
import Icon from '@hackclub/icons'

export default () => (
  <div style={{ color: 'cyan' }}>
    <Icon glyph="clubs" size={128} />
    <Icon glyph="bank-circle" size={64} />
    <Icon glyph="leaders" size={32} />
  </div>
)

With the API

https://icons.hackclub.com/api/icons/:color/:glyph

  • :glyph - A glyph from icons.hackclub.com.
  • :color - Any valid HTML color or Hack Club Theme color prefixed with hackclub-. Replace # with 0x when using a hexadecimal color.

All responses are SVGs with the MIME type image/svg+xml. You can optionally include the .svg file extension.

Examples:

<img src="https://icons.hackclub.com/api/icons/red/clubs">
<img src="https://icons.hackclub.com/api/icons/hackclub-green/battery-bolt">
<img src="https://icons.hackclub.com/api/icons/0xc78ad4/sam.svg">

In Figma

Copy and paste the Hack Club Icon component from the Figma file: figma.com/file/u8evOObGA4HCzUKlrVra1q/Hack-Club-Icon-Component

Choose the icon you'd like by modifying the Glyph.

Development Setup

  1. Clone & enter the repo.
$ git clone https://github.com/hackclub/icons.git
$ cd icons
  1. Install dependencies.
$ yarn
  1. Build library.
yarn run prepare
  1. Run docs locally.
yarn run dev

Adding an icon

If you’d like to add an icon, the Figma file is Hack Club Icons. Try to design the icon only out of components of other icons, to keep consistency high, with those small square canvas sizes. When you’re done, clone your new icon, flatten all the layers into one shape for the simplest/smallest code/rendering, then export as an SVG with no background. Open the file, copy the <path>, then in the Icon source file, add a new one (alphabetically), using a wrapping <g> if you have several <path>s. Make sure to remove the fill attribute from all paths, & ensure you’re formatting props correctly as JSX (replacing hyphens with camelCase).

After publishing, remember to update the package dependency on the docs site so it’s showing the latest iconset.