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

@konturio/default-icons

v2.4.0

Published

This module contain React components which contain SVG element.

Downloads

430

Readme

Default icons

This module contain React components which contain SVG element.

SVG elements based on Material design icons and exported with Figma design tool from icon font.

How to add new icon manually

  • Create SVG icon and export it
  • Open SVG file with text editor or IDE
  • Copy content
  • Create {NewName}Icon.tsx file in src/icons directory
  • Past content from SVG file to {NewName}Icon.tsx
  • and bring to the following form:
import React, { FC } from 'react';

const CloseIcon: FC = (props: React.SVGProps<SVGSVGElement>) => (
  <svg width="14" height="14" viewBox="0 0 14 14" {...props}>
    <path
      d="M13.9844 1.42188L8.40625 7L13.9844 12.5781L12.5781 13.9844L7 8.40625L1.42188 13.9844L0.015625 12.5781L5.59375 7L0.015625 1.42188L1.42188 0.015625L7 5.59375L12.5781 0.015625L13.9844 1.42188Z"
      fill="currentColor"
    />
  </svg>
);

export default React.memo(CloseIcon);

Alternatives

Material icons

You can get all icons from external packages as Material icons

React Icons

Include popular icons in your React projects easly with react-icons, which utilizes ES6 imports that allows you to include only the icons that your project is using.

SVGR

It can help you to transform SVGs into React components.

You can choose the way you prefer:

  • SVGR can be run from the CLI
  • SVGR can be used as a webpack loader, this way you can import your SVG directly as a React Component

Export icons from Figma

Before export icons, you will need to generate a Personal Access Token in Figma.

  1. Open Figma Files
  2. Click your name at the top left and go to the Settings tab.
  3. Under Personal Access Tokens, click Create a new personal access token.
  4. Copy this token. This is your Figma API key.

Copy the token. Now you can start export!

export FIGMA_TOKEN=<personalAccessToken> or on Windows set FIGMA_TOKEN=<personalAccessToken> npm run figma:export

You also can save this token in .env.local file in the root with content FIGMA_TOKEN=<personalAccessToken>

So next time you need to export icons you can run another command to reuse this token npm run figma:export-env