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.
Include icon sets
Installation (for standard modern project)
npm install react-icons --save
Usage
import { FaBeer } from 'react-icons/fa';
class Question extends React.Component {
render() {
return <h3> Lets go for a <FaBeer />? </h3>
}
}
Installation (for meteorjs, gatsbyjs, etc)
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. Suitable
for MeteorJS, Gatsbyjs etc.
npm install @react-icons/all-files --save
Usage
import { FaBeer } from "@react-icons/all-files/fa/FaBeer";
class Question extends React.Component {
render() {
return <h3> Lets go for a <FaBeer />? </h3>
}
}
Leave a Reply