Feather: Expose icons as react components

Created on 2 Jun 2017  ·  11Comments  ·  Source: feathericons/feather

I would love to use these icons in my React projects – beeing able to import them as a component would make this so much fun to use. Maybe feather can be added to react-icons (it already does this, but for other icon libraries)?

Let me know your thoughts on this! 🤔

enhancement

Most helpful comment

Indeed. I would also recommend keeping the feather repo as barebones as possible.
The only thing I would ad in this repo is the way it exposes all icons.

Finding a better way to expose all icons inside the NPM package would make the development of those packages a lot easier...

For example:

import heart from 'feather-icons/heart'
// or
import {heart} from 'feather-icons'

The current approach isn't really convinient:

import heart from 'feather-icons/icons/core/heart.svg'

I'm not sure if it works this way with the webpack loader, but it would make it much more enjoyable to consume. It even would work in a variety of different frameworks, which makes the other repos less important.

All 11 comments

I think eventually it might make sense to create a react-feather repo for this purpose. Maybe vue-feather, jekyll-feather, etc. repos as well. Just an idea.

Indeed. I would also recommend keeping the feather repo as barebones as possible.
The only thing I would ad in this repo is the way it exposes all icons.

Finding a better way to expose all icons inside the NPM package would make the development of those packages a lot easier...

For example:

import heart from 'feather-icons/heart'
// or
import {heart} from 'feather-icons'

The current approach isn't really convinient:

import heart from 'feather-icons/icons/core/heart.svg'

I'm not sure if it works this way with the webpack loader, but it would make it much more enjoyable to consume. It even would work in a variety of different frameworks, which makes the other repos less important.

I am also wondered if this is good to keep the website stuffs into the main repository.

Is feather already ready to be an Orga ? :tada:

@timolins I 100% agree. Let's definitely explore that idea!!

@Swizz I think it makes sense to separate the website from the main Feather repo. If we do something like @timolins is suggesting, the website could just have 'feather' as a dependency.

I like the idea of making Feather a GitHub Org.

I know GitHub's Octicons do something similar to what @timolins is suggesting. We might be able to get some ideas from them.

I really like the idea of keeping the main 'feather' repo as bare bones as possible: just a folder of SVGs and some JS to expose icon information.

We can create additional repos that leverage the main npm package to cover differ use cases.

Here's a nice article from GitHub about how they're using SVGs: https://github.com/blog/2112-delivering-octicons-with-svg

This is almost exactly what I want to do with the main feather repo: https://github.com/jxnblk/geomicons-open

How about closing all issues talking about the same subject to open a Fresh new one referencing them ?

I think we met a consensus about :

  • Making Feather an Org
  • Opening all icons as individual svg files
  • Providing a SVG Symbole sprite
  • Supplying some JS loaders :

    • JS

    • React

    • Vue

We can also dive into multi-packages/mono-repo if you want to keep Feather under your personal profile.

Let's move this conversation to #101 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoelEllis picture JoelEllis  ·  3Comments

MarcelloTheArcane picture MarcelloTheArcane  ·  4Comments

naoufel-ui picture naoufel-ui  ·  3Comments

chetanraj picture chetanraj  ·  4Comments

mittalyashu picture mittalyashu  ·  4Comments