Include popular icons in your React projects easily with react-multiple-icons
,
which utilizes ES6 imports that allows you to include only the icons that your project is using.
npm install react-multiple-icons --save
import Icon from "react-multiple-icons";
class Question extends React.Component {
render() {
return (
<h3>
{" "}
Lets go for a <Icon iconName="fa fa-industry" />?{" "}
</h3>
);
}
}
If you want to use material design icons follow this.
<ReactIcons
iconName="material-icons"
iconStyle="custom-style"
className="zoom_out_map"
/>
.custom-style {
font-size: 1.2rem;
color: "green"
}
Any customize style can be passed in like
<Icon iconName="fa fa-industry" iconStyle="custom-style" />
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.
You can add more icons by submitting pull requests or creating issues.
key | default | memo |
---|---|---|
size | 1em | |
iconStyle | undefined | can overwrite size and color |