How to Install

Get started with React Icons in your project with these simple installation methods

Standard Installation

Recommended for most React projects. Tree-shaking ensures only used icons are bundled.

Installation:

npm install react-icons --save

Usage:

import { FaBeer } from 'react-icons/fa';
function Question() {
return <h3> Lets go for a <FaBeer /> </h3>
}

Alternative Installation

For Meteor.js, Gatsby.js, or projects that need individual icon files. Slower installation but more granular control.

Installation:

npm install @react-icons/all-files --save

Usage:

import { FaBeer } from
"@react-icons/all-files/fa/FaBeer";
function Question() {
return <h3> Lets go for a <FaBeer /> </h3>
}

Package Managers

npm

npm install react-icons

yarn

yarn add react-icons

pnpm

pnpm add react-icons

TypeScript Support

React Icons includes TypeScript definitions out of the box. No additional @types packages needed.

import { IconType } from 'react-icons';
import { FaBeer } from 'react-icons/fa';
const MyIcon: IconType = FaBeer;