728x90
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>
}
}
https://react-icons.github.io/react-icons/
React Icons
React Icons 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) npm install react-icons --save Usa
react-icons.github.io
- 어떤 아이콘들이 있는지 확인해보기 - 공식 사이트에서 검색하면 됩니다
- 아이콘을 선택하고 import 할 때 쉽게 하는 방법
icon의 이름 앞의 2글자가 import시 사용되는 폴더 이름입니다
위의 예시인 FaBeer 예로 들면 Fa + Bear로 Fa가 폴더 이름입니다. import 시에 react-icons/fa로 쉽게 import 할 수 있습니다.