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';
class Question extends React.Component {
render() {
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';