Giter VIP home page Giter VIP logo

react-icons's Introduction

React Icons

npm

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

Installation (for standard modern project)

yarn add react-icons
# or
npm install react-icons --save

example usage

import { FaBeer } from "react-icons/fa";

function Question() {
  return (
    <h3>
      Lets go for a <FaBeer />?
    </h3>
  );
}

View the documentation for further usage examples and how to use icons from other packages. NOTE: each Icon package has it's own subfolder under react-icons you import from.

For example, to use an icon from Material Design, your import would be: import { ICON_NAME } from 'react-icons/md';

Installation (for meteorjs, gatsbyjs, etc)

Note This option has not had a new release for some time. More info #593

If your project grows in size, this option is available. This method has the trade-off that it takes a long time to install the package.

yarn add @react-icons/all-files
# or
npm install @react-icons/all-files --save

example usage

import { FaBeer } from "@react-icons/all-files/fa/FaBeer";

function Question() {
  return (
    <h3>
      Lets go for a <FaBeer />?
    </h3>
  );
}

Icons

Icon Library License Version Count
Circum Icons MPL-2.0 license 1.0.0 288
Font Awesome 5 CC BY 4.0 License 5.15.4-3-gafecf2a 1612
Font Awesome 6 CC BY 4.0 License 6.4.2 2025
Ionicons 4 MIT 4.6.3 696
Ionicons 5 MIT 5.5.4 1332
Material Design icons Apache License Version 2.0 4.0.0-90-g1ea21d5429 4341
Typicons CC BY-SA 3.0 2.1.2 336
Github Octicons icons MIT 18.3.0 264
Feather MIT 4.29.1 287
Lucide ISC v4.11.0-15-g7493227d 1215
Game Icons CC BY 3.0 12920d6565588f0512542a3cb0cdfd36a497f910 4040
Weather Icons SIL OFL 1.1 2.0.12 219
Devicons MIT 1.8.0 192
Ant Design Icons MIT 4.3.1 789
Bootstrap Icons MIT 1.11.1 2716
Remix Icon Apache License Version 2.0 3.5.0 2537
Flat Color Icons MIT 1.0.2 329
Grommet-Icons Apache License Version 2.0 4.11.0 635
Heroicons MIT 1.0.6 460
Heroicons 2 MIT 2.0.18 876
Simple Icons CC0 1.0 Universal 9.20.0 2753
Simple Line Icons MIT 2.5.5 189
IcoMoon Free CC BY 4.0 License d006795ede82361e1bac1ee76f215cf1dc51e4ca 491
BoxIcons CC BY 4.0 License 2.1.4 1634
css.gg MIT 2.1.1 704
VS Code Icons CC BY 4.0 0.0.35 439
Tabler Icons MIT 2.40.0 4836
Themify Icons MIT v0.1.2-2-g9600186 352
Radix Icons MIT @radix-ui/[email protected] 318
Phosphor Icons MIT 2.0.2 7488
Icons8 Line Awesome MIT 1.3.1 1544

You can add more icons by submitting pull requests or creating issues.

Configuration

You can configure react-icons props using React Context API.

Requires React 16.3 or higher.

import { IconContext } from "react-icons";

<IconContext.Provider value={{ color: "blue", className: "global-class-name" }}>
  <div>
    <FaFolder />
  </div>
</IconContext.Provider>;
Key Default Notes
color undefined (inherit)
size 1em
className undefined
style undefined Can overwrite size and color
attr undefined Overwritten by other attributes
title undefined Icon description for accessibility

Migrating from version 2 -> 3

Change import style

Import path has changed. You need to rewrite from the old style.

// OLD IMPORT STYLE
import FaBeer from "react-icons/lib/fa/beer";

function Question() {
  return (
    <h3>
      Lets go for a <FaBeer />?
    </h3>
  );
}
// NEW IMPORT STYLE
import { FaBeer } from "react-icons/fa";

function Question() {
  return (
    <h3>
      Lets go for a <FaBeer />?
    </h3>
  );
}

Ending up with a large JS bundle? Check out this issue.

Adjustment CSS

From version 3, vertical-align: middle is not automatically given. Please use IconContext to specify className or specify an inline style.

Global Inline Styling

<IconContext.Provider value={{ style: { verticalAlign: 'middle' } }}>

Global className Styling

Component

<IconContext.Provider value={{ className: 'react-icons' }}>

CSS

.react-icons {
  vertical-align: middle;
}

TypeScript native support

Dependencies on @types/react-icons can be deleted.

Yarn

yarn remove @types/react-icons

NPM

npm remove @types/react-icons

Contributing

./build-script.sh will build the whole project. See also CI scripts for more information.

Development

yarn
cd packages/react-icons
yarn fetch  # fetch icon sources
yarn build

Add/Update icon set

First, check the discussion to see if anyone would like to add an icon set.

https://github.com/react-icons/react-icons/discussions/categories/new-icon-set

The SVG files to be fetched are managed in this file. Edit this file and run yarn fetch && yarn check && yarn build.

https://github.com/react-icons/react-icons/blob/master/packages/react-icons/src/icons/index.ts

Preview

Note The project is not actively accepting PR for the preview site at this time.

The preview site is the react-icons website, built in Astro+React.

cd packages/react-icons
yarn fetch
yarn build

cd ../preview-astro
yarn start

Demo

The demo is a Create React App boilerplate with react-icons added as a dependency for easy testing.

cd packages/react-icons
yarn fetch
yarn build

cd ../demo
yarn start

Why React SVG components instead of fonts?

SVG is supported by all major browsers. With react-icons, you can serve only the needed icons instead of one big font file to the users, helping you to recognize which icons are used in your project.

Related Projects

Licence

MIT

  • Icons are taken from the other projects so please check each project licences accordingly.

react-icons's People

Contributors

abuuzayr avatar antoinerousseau avatar bacali95 avatar bentatum avatar connor4312 avatar delacannon avatar dependabot[bot] avatar dpwilhelmsen avatar exah avatar florianstahr avatar georgenance avatar gorangajic avatar greysteil avatar harshzalavadiya avatar kamijin-fanta avatar kimtaejin3 avatar laurent-le-graverend avatar mergebandit avatar nikgraf avatar nolanleung avatar nwwells avatar onurgvnc avatar paustria avatar rvanlaarhoven avatar sadorlovsky avatar shankhadeepbanerjee avatar steventsao avatar thatmattlove avatar trevorblades avatar vishalkdotcom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-icons's Issues

Not building with webpack NODE_ENV=production

ModuleNotFoundError: Module not found: Error: Can't resolve 'react-icons' in '/Users/awilmer/Projects/legacy-portal-relay'
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/webpack/lib/Compilation.js:229:38
    at onDoneResolving (/Users/awilmer/Projects/legacy-portal-relay/node_modules/webpack/lib/NormalModuleFactory.js:29:20)
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/webpack/lib/NormalModuleFactory.js:94:20
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/async/lib/async.js:726:13
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/async/lib/async.js:52:16
    at done (/Users/awilmer/Projects/legacy-portal-relay/node_modules/async/lib/async.js:241:17)
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/async/lib/async.js:44:16
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/async/lib/async.js:723:17
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/async/lib/async.js:167:37
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/webpack/lib/NormalModuleFactory.js:89:22
    at onResolved (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/Resolver.js:68:11)
    at loggingCallbackWrapper (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at afterInnerCallback (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/Resolver.js:136:10)
    at loggingCallbackWrapper (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at Tapable.applyPluginsAsyncSeriesBailResult1 (/Users/awilmer/Projects/legacy-portal-relay/node_modules/tapable/lib/Tapable.js:108:46)
    at innerCallback (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/Resolver.js:123:19)
    at loggingCallbackWrapper (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/tapable/lib/Tapable.js:210:15
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:39:4
    at loggingCallbackWrapper (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at afterInnerCallback (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/Resolver.js:136:10)
    at loggingCallbackWrapper (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at Tapable.applyPluginsAsyncSeriesBailResult1 (/Users/awilmer/Projects/legacy-portal-relay/node_modules/tapable/lib/Tapable.js:108:46)
    at innerCallback (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/Resolver.js:123:19)
    at loggingCallbackWrapper (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/tapable/lib/Tapable.js:210:15
    at innerCallback (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/Resolver.js:121:11)
    at loggingCallbackWrapper (/Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/tapable/lib/Tapable.js:210:15
    at /Users/awilmer/Projects/legacy-portal-relay/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:45:5
resolve 'react-icons' in '/Users/awilmer/Projects/legacy-portal-relay'
  Parsed request is a module
  using description file: /Users/awilmer/Projects/legacy-portal-relay/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/awilmer/Projects/legacy-portal-relay/package.json (relative path: .)
    resolve as module
      /Users/awilmer/Projects/node_modules doesn't exist or is not a directory
      /Users/awilmer/node_modules doesn't exist or is not a directory
      /Users/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /Users/awilmer/Projects/legacy-portal-relay/node_modules
        using description file: /Users/awilmer/Projects/legacy-portal-relay/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Users/awilmer/Projects/legacy-portal-relay/package.json (relative path: ./node_modules)
          using description file: /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons/package.json (relative path: .)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons is not a file
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons.json doesn't exist
            as directory
              existing directory
                using path: /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons/index
                  using description file: /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons/package.json (relative path: ./index)
                    no extension
                      Field 'browser' doesn't contain a valid alias configuration
                      /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons/index doesn't exist
                    .js
                      Field 'browser' doesn't contain a valid alias configuration
                      /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons/index.js doesn't exist
                    .json
                      Field 'browser' doesn't contain a valid alias configuration
                      /Users/awilmer/Projects/legacy-portal-relay/node_modules/react-icons/index.json doesn't exist

Include Ionicon

It would be really nice to have the Ionicon set in this library.

I believe I added the proper source files in #13.

index.js:25 Uncaught TypeError: Cannot read property 'reactIconBase' of undefined

Hi!

I am getting the following exception when I am trying to use the icons with the react-svg-morph library:

index.js:25 Uncaught TypeError: Cannot read property 'reactIconBase' of undefined
MorphTransition.js:97 Uncaught TypeError: Cannot read property 'paths' of undefined
morph.js:138 Uncaught TypeError: Cannot read property 'length' of undefined

Versions:
[email protected]
[email protected]

I am not sure whether if it's a reac-icons, react-icon-base or a react-svg-morph issue. But since you are the maintainer all of them I guess it does not really matter.

Btw it work's fine with [email protected]

Icons are missing from lib/

We used to manually include icons from lib/ folder as described in readme, but 1.0.6 has less icons than 1.0.3 had. Probably a build issue.

specifically, we need react-icons/lib/md/favorite-border

change color on hover

Hi, I am using Radium to add :hover styles, but when I add a new color on hover, it doesn't appear. Any idea how I can achieve this effect? Thanks!

'SVGElement.offsetWidth' is deprecated

Anyone getting this error in chrome?

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.

Loader needed for Webpack

When attempting to use with Webpack, I get the following error:

screen shot 2015-10-27 at 3 39 36 pm

It seems to be due to not having a loader of some type, but it might be good to include that in the documentation. I am going to experiment with some css/style loaders to see if I can get something working.

readme to describe props and required/optional?

I had to dig (a little) to find:

IconBase.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number
]),
style: PropTypes.object
}

You might want to consider listing the proptypes for the icons eg in the readme. Further, maybe specify that size is required and eg color is not?

Some fontawesome icons are broken / don't fit their viewport

Missing fa icons

I updated to react 15 and react-icons 2. The following are missing now.

Error: Cannot find module 'react-icons/lib/fa/times'
Error: Cannot find module 'react-icons/lib/fa/link'
Error: Cannot find module 'react-icons/lib/fa/gear'
Error: Cannot find module 'react-icons/lib/fa/undo'

Include Octicons

It would be nice to also include Github's Octicons, but just a suggestion.

The icons not showing

Hi,

If I import like import * as IO from 'react-icons/io I'm getting error

/Users/boris/WebstormProjects/autralis-sales-new/node_modules/react-icons/io/index.js:1
export IoAlertCircled from './alert-circled';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

If I import like import * as IO from 'react-icons/lib/io I'm not getting an error, but the icons are not showing. The div where {IO.IoAndroidFavorite} is, is empty.

Any advice "zemljace" :) ?

Babel 6 support

Hi

I'm having an issue with Babel 6:

Module build failed: ReferenceError: [BABEL] C:...\node_modules\react-icons\md\index.js: Using removed Babel 5 option

I think it's due to old Babel 5 syntax in .babelrc for react-icons. Does anybody know a workaround for this? And also is this module still actively supported?

Built icons in lib should require react-icon-base/lib

I am building an app on react-typescript-boilerplate, which is a fork of react-boilerplate. (I haven't changed the webpack configuration at all except to try to get this working.)

I'm having trouble getting import FaBeer from 'react-icons/fa/beer'; to work, so I tried using the pre-compiled icons: var FaBeer = require('react-icons/lib/fa/beer');. However the pre-built icons have var IconBase = require('react-icon-base'); on line 18, which does not pull in the pre-built version of react-icon-base. Shouldn't that line be changed to var IconBase = require('react-icon-base/lib');? Otherwise what's the point of providing pre-built icons?


I truly don't mean to come across as demanding or stupid. I've spent all morning trying to get this library and others working, but nothing has worked yet, and I'm exhausting my understanding of web development. I just want some icons for my app. Thank you for your patience.

Spinning icons

Hi and thanks for the great work

Is there a way to make icons spin ?

Thanks

Automation

There should be a single command which does:

  1. Fetch the latest font from each repository (md, fa, etc.)
  2. Extract the SVGs
  3. Transform the SVGs (e.g. normalize the size and remove fill property from paths) and create the react components from it

Without automation everything is too fragile. For example as far as I understand you removed the fill=#444 manually? What happens with the next update? You would always need to keep this in mind if it's not automated. A new font awesome release should be pulled into react-icons with a single command (same for all other fonts).

Question: Is this project still maintained?

Thank you for this is a great library.
But it seams to me that this project is not being maintained anymore

Latest commit is on 26 May 2016 (a month ago)

If it's the case then a search for a new maintainer might be the best option.

fa/check-square-o and fa/square-o misalignment

I tried using fa/check-square-o and fa/square-o for a form checkbox, but they don't align properly. Try the html below to see it.

<svg xmlns="http://www.w3.org/2000/svg">
    <path d="m32.9 20.8v7.1q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.2 0.2-0.5 0.2-0.1 0-0.2-0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-5.7q0-0.3 0.2-0.5l1.4-1.4q0.2-0.3 0.5-0.3 0.1 0 0.3 0.1 0.4 0.2 0.4 0.7z m5.2-11l-18.2 18.2q-0.5 0.6-1.3 0.6t-1.2-0.6l-9.6-9.6q-0.6-0.5-0.6-1.3t0.6-1.2l2.4-2.5q0.6-0.5 1.3-0.5t1.3 0.5l5.8 5.9 14.5-14.5q0.5-0.5 1.3-0.5t1.2 0.5l2.5 2.5q0.5 0.5 0.5 1.3t-0.5 1.2z"/>
    <path style="fill:red;" d="m29.5 5.7h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-18.6q0-1.5-1.1-2.5t-2.5-1.1z m6.4 3.6v18.6q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q2.7 0 4.5 1.8t1.9 4.6z"/>
</svg>

image

Wrap in div with class

Would be great if each icon would be wrapped in a div with a class, e.g. .react-icon, so that global icon styles could be applied. Unless I'm missing something obvious, you currently have to either have global svg styles or separate styles for each usage.

How to appropriately create a loader in webpack?

Right now this is the loader i'm using in my webpack:

  {
    test: /react-icons\/(.)*(.js)$/,
    loader: 'babel',
    include: config.iconPath
  }

with config.iconPath pointing to my "node_modules/react-icons" path.

This all works, however currently every time I start my localhost dev, it takes around 8-10 seconds for it to finally be viewable in the browser. Is this normal? Or am I doing this wrong? Thank you!

lib version doesn't use lib of react-icons-base

I'm using as documented import FaBeear from 'react-icons/lib/fa/beer'; and getting the following error:

ERROR in ./~/react-icon-base/index.js
Module parse failed: /Users/tobias.pinnekamp/Sites/react-boilerplate/node_modules/react-icon-base/index.js Unexpected token (3:50)
You may need an appropriate loader to handle this file type.
| import { default as React, PropTypes } from 'react'
| 
| const IconBase = ({ children, color, size, style, ...props }, { reactIconBase = {} }) => {
|   const computedSize = size || reactIconBase.size || '1em'
|   return (
 @ ./~/react-icons/lib/fa/beer.js 18:15-41
 @ ./app/containers/LoginForm/index.js
 @ ./app/containers/App/index.js
 @ ./app/app.js
 @ multi main

the problem seems to be that the lib version of react-icons does not use the lib version of react-icons-base. Because if I edit beer.js to use the lib version of react-icons-base it's working fine.

But also I guess it has something to do, that I'm using https://github.com/mxstbr/react-boilerplate
Because in a previous learning project using the icons worked fine.

Any hints?

Ionicons

Hey,
Awesome library ๐Ÿ‘๐Ÿผ ! Just wondering if it is possible to add Ionicons to this collection?

Issue with importing icons

Hi,
I could be terribly overlooking something, but none of the import method in the doc didn't work for me.

  1. import FaBeer from 'react-icons/fa/FaBeer';
Module not found: Error: Cannot resolve module 'react-icons/fa/FaBeer' in /Users/bsr/testclient/src/
23:04:46 f +2ms      resolve module react-icons/fa/FaBeer in /Users/bsr/testclient/src/
23:04:46 f +2ms        looking for modules in /Users/bsr/testclient/node_modules
23:04:46 f +11ms         resolve 'file' or 'directory' fa/FaBeer in /Users/bsr/testclient/node_modules/react-icons
23:04:46 f +1ms            resolve file
23:04:46 f +0ms              /Users/bsr/testclient/node_modules/react-icons/fa/FaBeer doesn't exist
23:04:46 f +1ms              /Users/bsr/testclient/node_modules/react-icons/fa/FaBeer.webpack.js doesn't exist
23:04:46 f +0ms              /Users/bsr/testclient/node_modules/react-icons/fa/FaBeer.web.js doesn't exist
23:04:46 f +1ms              /Users/bsr/testclient/node_modules/react-icons/fa/FaBeer.js doesn't exist
23:04:46 f +8ms              /Users/bsr/testclient/node_modules/react-icons/fa/FaBeer.json doesn't exist

  1. import {MdCancel, MdChat, MdCheck} from 'react-icons/md';
    

./~/react-icons/md.js
23:05:17 f +0ms Module parse failed: /Users/bsr/testclient/node_modules/react-icons/md.js Line 1: Unexpected token
23:05:17 f +0ms You may need an appropriate loader to handle this file type.
23:05:17 f +1ms | export Md3dRotation from './md/3d-rotation';
23:05:17 f +0ms | export MdAccessAlarm from './md/access-alarm';
23:05:17 f +1ms | export MdAccessAlarms from './md/access-alarms';

only way I could work is changing the package.json of this project in my node_modules to point to the built version
"main": "icons.js", -> "main": "lib/icons.js",

I do not want to include node_modules to my webpack source directories (even though I could selectively include just this package) as it is hard to maintain and the build could be slow.

Also, there are lots of duplicate files in the npm package. the icon files are included in the src format, then the built version in lib and also a dist folder with only fa icons in it. Can you please just keep the lib.

It is a great package and appreciate your effort on this.
Cheers.
bsr

Helper components to turn them into buttons

Hey there, I think it'd be nice if there were a helper component to turn these suckers into nicely formed buttons. I'm not sure if people already have something they're already using, so I thought I'd ask.

Something like this was what I was thinking:

<CircularButton>
          <ChevronLeft>
          </ChevronLeft>
</CircularButton>

// and/or

<ButtonWrapper>
          <ChevronLeft>
          </ChevronLeft>
        </ButtonWrapper>

React 15.2.0 - Unknown prop `fit` on <svg> tag

Hi,

Just updated react to 15.2 and noticed this warning.

warning.js:44Warning: Unknown prop `fit` on <svg> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in svg (created by IconBase)
    in IconBase (created by FaUser)
    in FaUser (created by UserIcon)
    in div (created by UserIcon)
    in UserIcon (created by PostToolbar)
    in div (created by PostToolbar)
    in div (created by PostToolbar)
    in div
    in Container (created by PostToolbar)
    in PostToolbar (created by PostView)
    in div (created by PostView)
    in PostView (created by EditPostContainer)
    in EditPostContainer (created by Connect(EditPostContainer))
    in Connect(EditPostContainer) (created by RouterContext)
    in div (created by App)
    in App (created by RouterContext)
    in RouterContext (created by Router)
    in Router
    in div
    in Provider

Suggestion react-native-icons package.

Would be interesting to see a react-native-icons package that re-uses these same svg icons... I know this probably need to be used with react-native-svg with a transform to match those components... I would suggest publishing the output as a separate package only to avoid the react-native option... Not sure about react-native-web as an option either...

Set Baseline for icons

The GitHub Octicons have a baseline slightly below centre and this causes them to display slightly off when rendered through react-icons. I don't have any time at the moment to throw together a JSFiddle; but I'll try and make one tomorrow.

The GitHub Octicons have a baseline set at -18.75%(Taken from the descent divided by 1024 in the Octicons SVG.

Installation error

I'm using jspm and the command I issued is

jspm install react-icons=npm:react-icons
warn It's taking a long time to process the dependencies of npm:[email protected].
     This package may need an ignore property to indicate test or example folders for jspm to skip.


err  Error: EMFILE: too many open files, open '/home/jadedevin13/.jspm/packages/npm/[email protected]/md/markunread.js'
         at Error (native)

warn Installation changes not saved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.