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

seed-icons

v1.1.6

Published

An open-source icon set that makes tracking down and using optimized, quality, consistent brand SVG icons a little less painful.

Downloads

12

Readme

🌱 Seed icons

Seed icons is an open-source icon set that makes tracking down and using optimized, quality, consistent brand SVG icons a little less painful.

What's available?

Seed icons are available in a few different capacities:

SVG Library

Library of optimized SVG files for download on seedicons.com.

Figma Component Library

A consumable Figma component library for use in your designs. To use the components, log in to your Figma account and duplicate the file to your drafts.

Seed Repo

This repository that supplies a simplified API for use in your projects. SVGs can also be imported individually through the seed-icons/dist/icons/... folder.

Quick start

CodeSandbox Template

View a live CodeSandbox example of fundamental HTML implementation.

HTML Snippet

<!DOCTYPE html>
<html>
  <script src="https://unpkg.com/seed-icons"></script>
  <body>
    <i data-seed="google-plus"></i>
    <i data-seed="github"></i>
    <i data-seed="figma" height="60px" width="60px"></i>
    <script>
      seed.replace()
    </script>
  </body>
</html>

How to use

JavaScript

  1. Add a link to the icons library to your project using unpkg. After including the script, seed will be available as a global variable.
<script src="https://unpkg.com/seed-icons"></script>
  1. Add the data-seed attribute with the icon name to an element in your HTML.
<i data-seed="figma"></i>
  1. Call seed.replace() method before the closing </body> tag to replace all elements with the data-seed attribute with the corresponding SVG icon.
<script>
  seed.replace()
</script>

Node

  1. Install
npm install seed-icons
  1. Import
import { ReactComponent as FirefoxIcon } from 'seed-icons/dist/icons/firefox.svg'
  1. Use
<FirefoxIcon />

API

1. seed.icons

An object with information about every icon. A typical icon object looks like:

seed.icons["google-play"]

// returns

{
   name: 'google-play',
   contents: '<path fill="#1ABCFE...',
   tags: ['app', 'browser', 'google'],
   attrs: {
     class: 'seed seed-google-play',
     xmlns: 'http://www.w3.org/2000/svg',
     width: 48,
     height: 48,
     viewBox: '0 0 48 48',
   }
}

2. seed.replace({attrs})

Replaces all elements that have a data-seed attribute with SVG markup. You can pass seed.replace() an attrs object. All attributes on the placeholder element (i.e. <i>) will be copied to the <svg> tag. All attributes on the placeholder element (i.e. <i>) will be copied to the <svg> tag.

<!-- Pass the below attributes in the replace method. -->
<i data-seed="firefox"></i>
<script>
  seed.replace({ class: 'foo', height: 40 })
</script>

--

<!-- Returns in this output: -->
<svg
  xmlns="http://www.w3.org/2000/svg"
  width="100px"
  height="100px"
  viewBox="0 0 48 48"
  class="seed seed-figma foo"
  data-seed="figma"
>
  <path>...</path>
</svg>

3. seed.icons['name'].toSvg({attrs})

Returns the supplied icon name SVG as a string.

Bugs, Requests and Contributing

Contributions are always welcome. If you notice and bug or would like to request an icon, use an issue template to kickstart the process.

Credits

This project is one big mashup and open-source appropriation of projects from Feather, Ionicons, and Eva Icons. I started this project as something to work on while I practice React/Gatsby and inspecting those projects as I learn has been truly invaluable. Anything impressive is probably code from them I didn't change. Anything that barely functions is probably from yours truly. Please consider contributing.